Download and synchronize files and media from Stud.IP -- the campus management platform deployed at several German universities.
Note that this project currently only supports the University of Göttingen and the University of Passau but could work at other universities with similar authentication methods.
Make sure you have pipx installed. Then run
pipx install git+https://github.com/studip-sync/studip-sync.git
git clone https://github.com/studip-sync/studip-sync
- Install all needed dependencies
- Then run
./studip_sync.py -d /path/to/files -m /path/to/media
to sync files to/path/to/files
and media to/path/to/media
. (see Usage)
To create a permanent configuration:
- Run
./studip_sync.py --init
(see Configuration) - Schedule a cron job or manually run
./studip_sync.py
to sync your data.
- If not yet installed, install snapd
sudo snap install --beta studip-sync
sudo snap connect studip-sync:home
Important Note: If you install studip-sync as a snap, you cannot use ~
to reference your home directory in the
config file. If you ignore this note, the files will be synced to snap/studip-sync/current/...
Limitation: The snap can only write to non-hidden directories in you home directory. If you omit Step 3, it cannot write to your home directory at all.
Install studip-sync-git from the AUR.
To create a new configuration file execute:
./studip_sync.py --init
{
"user": {
"login": "bob42",
"password": "password"
},
"files_destination": "/home/bob/Documents/Uni",
"media_destination": "/home/bob/Videos/Uni",
"base_url": "https://studip.uni-goettingen.de"
}
The files_destination
and media_destination
option are optional. If you omit one of them, the corresponding feature is disabled. You can also specify both options on the commandline. (Using -d
implies automatically --full
if no config is present)
If you omit the login
or password
, studip-sync will ask for them interactively.
studip-sync checks if new files have been edited since the last sync to limit the data which needs to be downloaded on every sync. If you don't want this to happen and prefer to always download all data, use:
./studip_sync.py --full
To sync only the last semester and skip older courses, use the --recent
flag. (This option will be ignored if --full
is supplied).
./studip_sync.py --recent
# Synchronizes files to /path/to/sync/dir
# and uses a non-default location for the config file (here: ./config.json)
./studip_sync.py -c ./ -d /path/to/sync/dir
# Reads all parameters from ~/.config/studip-sync/config.json
./studip_sync.py
Run crontab -e
and add the following lines:
# Run at 8:00, 13:00 and 19:00 every day.
0 8,13,19 * * * /path/to/studip-sync/studip_sync.py
studip-sync supports the feature to load plugins to enable more features.
To enable a plugin run studip-sync --enable-plugin PLUGIN
and to disable studip-sync --disable-plugin PLUGIN
.
To reconfigure a plugin run studip-sync --reconfigure-plugin PLUGIN
.
This plugin can add a new task on each successful media download into a list at Google Tasks.
To use this plugin you need to have a Google Cloud project with Tasks API enabled.
Download the credentials.json
from Google Cloud and place it at .config/studip-sync/google-tasks/credentials.json
.
Then run studip-sync --enable-plugin google-tasks
and authenticate this plugin over OAuth with your Google account.
Finally, enter the task list id of your specified task list. For this you need to create a task list at Google Tasks first.