diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3781681 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +# .env +STUDY_MATERIAL_ROOT_DIR=YOUR_STUDY_MATERIAL_ROOT_DIRECTORY +MOODLE_USERNAME=YOUR_MOODLE_USERNAME +MOODLE_PASSWORD=YOUR_MOODLE_PASSWORD diff --git a/.gitignore b/.gitignore index 432df37..28ad1d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ # Temporary files **/*.log **/data +**/out -**/.env +**.env +**!.env.example # IDE **/.idea/ @@ -47,3 +49,9 @@ # Latex !**/out/*.pdf **/auxil/* + +# python +**/__pycache__/ +**/.pytest_cache/ +**/.mypy_cache/ +**/.coverage diff --git a/README.md b/README.md new file mode 100644 index 0000000..60831ac --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Moodle Scraper +## Installation + +### Windows +```bash +python -m venv .venv +.venv\Scripts\activate +``` + +### MacOS/Linux +```bash +python -m venv .venv +source .venv/bin/activate +``` + +```bash +pip install -r requirements.txt +``` + +## Usage +1. Make a .env file in which you specify the path to save the files and the username and password for your moodle account. + +2. Run the program with: +```bash +python main.py +``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bce0958 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +python-dotenv==1.0.1 +Requests==2.32.3 +selenium==4.28.1 +webdriver_manager==4.0.2