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.

82 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 month 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. ### Errors and workarounds
  29. - [ ] If filename is too long it currently gets skipped
  30. - [ ] Filenames get sometimes displayed wrong (probably utf8 problems)
  31. ## Installation
  32. - create an instance of a mysql database
  33. - `git clone https://github.com/tiyn/studip-crawler`
  34. - `cd studip-crawler/src/`
  35. - `pip3install -r requirements` - install dependencies
  36. ## Usage
  37. Just run the file via `python3 run.py [options]`.
  38. Alternatively to `python3 run.py` you can give yourself permissions using
  39. `chmod +x run.py [options]` and
  40. run it with `./run.py [options]`.
  41. There are several options required to work.
  42. Run `python3 run.py -h` for a help menu and see which ones are important for you.
  43. ### Docker
  44. #### Environment-variables
  45. Set the following variables with the -e tag.
  46. | Name | Usage | Default |
  47. | ---------- | ----------------------------- | ------- |
  48. | `USER` | username on the studip server | `admin` |
  49. | `PSWD` | password on the studip server | `admin` |
  50. | `URL` | url of the studip server | `admin` |
  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-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