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.

78 lines
2.5 KiB

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