Compare commits

...

3 Commits

Author SHA1 Message Date
9a9018751e Bump version 2021-02-06 22:54:05 +01:00
83b75e8254 syncurl: Sanitize element name on windows if it is used as folder name
Otherwise the name of the course might not be a invalid file name.
2021-02-06 22:53:26 +01:00
35c3fa205d Fixed description of activating venv (#22)
Add 'source' to the venv activate command in the readme

`source` was picked over `.` to conform to the python recommendation
(https://docs.python.org/3/library/venv.html#module-venv).

This patch also adds the `egg-info` you get when building to the
gitignore.
2021-01-28 21:24:09 +01:00
4 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ build/
.env
.vscode
ilias_cookies.txt
PFERD.egg-info/
# PyInstaller
sync_url.spec

View File

@ -37,7 +37,7 @@ Ensure that you have at least Python 3.8 installed.
To install PFERD or update your installation to the latest version, run this
wherever you want to install or have already installed PFERD:
```
$ pip install git+https://github.com/Garmelon/PFERD@v2.5.3
$ pip install git+https://github.com/Garmelon/PFERD@v2.5.4
```
The use of [venv] is recommended.
@ -59,9 +59,9 @@ A full example setup and initial use could look like:
$ mkdir Vorlesungen
$ cd Vorlesungen
$ python3 -m venv .venv
$ .venv/bin/activate
$ pip install git+https://github.com/Garmelon/PFERD@v2.5.3
$ curl -O https://raw.githubusercontent.com/Garmelon/PFERD/v2.5.3/example_config.py
$ source .venv/bin/activate
$ pip install git+https://github.com/Garmelon/PFERD@v2.5.4
$ curl -O https://raw.githubusercontent.com/Garmelon/PFERD/v2.5.4/example_config.py
$ python3 example_config.py
$ deactivate
```
@ -69,7 +69,7 @@ $ deactivate
Subsequent runs of the program might look like:
```
$ cd Vorlesungen
$ .venv/bin/activate
$ source .venv/bin/activate
$ python3 example_config.py
$ deactivate
```

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name="PFERD",
version="2.5.3",
version="2.5.4",
packages=find_packages(),
install_requires=[
"requests>=2.21.0",

View File

@ -113,7 +113,7 @@ def main() -> None:
if not element_name:
print("Error, could not get element name. Please specify a folder yourself.")
return
folder = Path(element_name)
folder = sanitize_windows_path(Path(element_name.replace("/", "-").replace("\\", "-")))
cookie_jar.save_cookies()
else:
folder = Path(args.folder)