- Python 100%
| .github/workflows | ||
| scripts | ||
| studip_sync | ||
| .editorconfig | ||
| .gitignore | ||
| .pylintrc | ||
| Pipfile | ||
| Pipfile.lock | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
| snapcraft.yaml | ||
| studip_sync.py | ||
| tox.ini | ||
| UNLICENSE | ||
studip-sync
Download and synchronize files and media from Stud.IP -- the campus management platform deployed at several German universities.
Note that this project supports currently only the University of Göttingen and the University of Passau but could work at other universities with similar authentication methods. Also, StudIP version 4.6 is the only fully supported version (but most features will still work with StudIP 4.5).
Installation
Installation from source
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/mediato sync files to/path/to/filesand 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.pyto sync your data.
Installation as snap
- If not yet installed, install snapd
sudo snap install --beta studip-syncsudo 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.
Installation on Arch Linux
Install studip-sync-git from the AUR.
Configuration
To create a new configuration file execute:
./studip_sync.py --init
Example
{
"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.
Usage
Full sync instead of incremental sync
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
Only sync the last semester
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
Running studip-sync manually
# 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
Automation using a cron job
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
Plugin support
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.
Google Tasks API
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.