Git Product home page Git Product logo

studip-sync's Introduction

studip-sync

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

  1. git clone https://github.com/studip-sync/studip-sync
  2. Install all needed dependencies
  3. 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:

  1. Run ./studip_sync.py --init (see Configuration)
  2. Schedule a cron job or manually run ./studip_sync.py to sync your data.

Installation as snap

  1. If not yet installed, install snapd
  2. sudo snap install --beta studip-sync
  3. 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.

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.

History

  • 2020 - today: @lenke182 has taken over development and maintenance of the project.
  • 2015 - 2019: Developed and maintained by @woefe. During that time studip-sync was compatible with Stud.IP deployed at University of Passau.

studip-sync's People

Contributors

woefe avatar lenke182 avatar fchris avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.