This program downloads all files of a Stud.IP users current semester.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.4 KiB

6 months ago
6 months ago
6 months ago
6 months ago
1 month ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. # Stud.IP Crawler
  2. This is a program that downloads all files available for a given Stud.IP user.
  3. It only downloads and searches through the courses in the current semester.
  4. If you run the program again it only downloads files that have changed since
  5. the last time running it.
  6. ## Features/To-Dos
  7. - [x] Downloads files of given users active semester via commandline
  8. - [x] Keeping file structure of Stud.IP
  9. - [x] Specify username
  10. - [x] Specify password
  11. - [x] Specify Stud.IP-URL
  12. - [x] Specify output directory
  13. - [x] Specify chunk size to download big files
  14. - [x] Specify all important database variables
  15. - [x] Only download files after given date
  16. - [x] Save and read download date
  17. - [x] Possible reset of download date
  18. - [x] Incremental file download
  19. - [x] Store id and chdate of downloaded files
  20. - [x] Logging
  21. - [x] Console log
  22. - [x] Log file
  23. - [x] Specify log level
  24. - [x] Docker
  25. - [x] DockerHub image
  26. - [x] Docker-compose with db
  27. ## Installation
  28. - create an instance of a mysql database
  29. - `git clone https://github.com/tiyn/studip-crawler`
  30. - `cd studip-crawler/src/`
  31. - `pip3install -r requirements` - install dependencies
  32. ## Usage
  33. Just run the file via `python3 run.py [options]`.
  34. Alternatively to `python3 run.py` you can give yourself permissions using
  35. `chmod +x run.py [options]` and
  36. run it with `./run.py [options]`.
  37. There are several options required to work.
  38. Run `python3 run.py -h` for a help menu and see which ones are important for you.
  39. ### Docker
  40. #### Environment-variables
  41. Set the following variables with the -e tag.
  42. | Name | Usage | Default |
  43. | ---- |------ | ------- |
  44. | `USER` | username on the studip server | `admin` |
  45. | `PSWD` | password on the studip server | `admin` |
  46. | `URL` | url of the studip server | `admin` |
  47. | `HOST` | ip of the mysql instance to connect | `mysql` |
  48. | `DB_USER` | username of the mysql instance to connect | `root` |
  49. | `DB_PSWD` | password of the mysql instance to connect | `root` |
  50. | `INTERVAl` | update interval in seconds | `86400` |
  51. #### Volumes
  52. Set the following volumes with the -v tag.
  53. | Volume-Name | Container mount | Description |
  54. | ----------- | --------------- | ----------------------------------- |
  55. | `studip_data` | `/studip/src/data` | directory for studip files to be saved to |
  56. #### docker-compose.yml
  57. Copy `docker/docker-compose.yml` and change it to your needs.
  58. Then run `docker-compose up`.
  59. ## Tested StudIP instances
  60. - Carl von Ossietzky Universität Oldenburg