diff --git a/README.md b/README.md index 0deaab3..1d8a677 100644 --- a/README.md +++ b/README.md @@ -1 +1,56 @@ -# Moodle assigment upload +# KTU Moodle assignment upload + +This will automatically open up moodle and upload/update any assignment file. + +It works by using selenium to access the moodle website by emulating what a +normal person would do. + +## Why? +So I could use this together with ["KTU OOP Report Generator"](https://github.com/RokasPuzonas/ktu-oop-report-generator) +and [Github Actions](https://github.com/features/actions) to automatically generate +a report and upload it to moodle whenever I push a commit or tag. + +And also because I love automating everyday tasks. + +## Usage + +1. Clone repository +```shell +git clone https://github.com/RokasPuzonas/ktu-moodle-assignment-upload +``` + +2. Setup [virtualenv](https://pythonbasics.org/virtualenv) +```shell +python -m venv venv +``` + +4. Active enviroment +```shell +source venv/bin/activate +``` + +4. Install dependencies +```shell +pip install -r requirements.txt +``` + +5. Determine your assignment +For this script to work, it needs to know to what assignment you want to upload +the file. Luckily this is super simple to do, just open up the webpage where +the you can view the assignment and take a look at the url. + +![Where to find assignment id](./assignment-id-location.png) + +6. That's it, you're done! +Now you can run the script! + +```shell +./main.py --username --password +``` + +## Example + +```shell +./main.py 1610 report.pdf IF-1-1_Bob_Bobby.pdf --username bob --password ilovecats +``` + diff --git a/assignment-id-location.png b/assignment-id-location.png new file mode 100644 index 0000000..4192590 Binary files /dev/null and b/assignment-id-location.png differ