# Stud.IP Backend for rclone This project provides an rclone backend for accessing files from Stud.IP instances. Although it should work with all Stud.IP instances, it has currently only been tested with the [University of Bremen](https://elearning.uni-bremen.de) installation. ## Build 1. Install Mage (one-time): ```bash go install github.com/magefile/mage@latest ``` 2. Build plugin and standalone binaries: ```bash mage ``` Build output: - `build/librcloneplugin_backend_studip.so` - `build/rclone-studip` ## Load plugin in rclone To use the plugin artifact with an existing rclone binary: ```bash cp build/librcloneplugin_backend_studip.so "$RCLONE_PLUGIN_PATH/" ``` Notes: - All plugins in `$RCLONE_PLUGIN_PATH` are loaded. - If `RCLONE_PLUGIN_PATH` is not set, plugin support is disabled. - Plugin and rclone must be built from compatible source versions. ## Configuration Create a remote with `rclone config`, then choose storage type `Stud.IP`. Backend options: - `base_url`: Base URL of the Stud.IP JSON API v1 endpoint. Example: `https://elearning.uni-bremen.de/jsonapi.php/v1/` - `username`: Stud.IP login username. - `password`: Stud.IP login password (stored obscured by rclone config). - `course_id`: Stud.IP course ID (UUID/hash-like ID, not course title). Example: `59e88658b39093836455413bd1f24f29` - `license`: License ID applied to uploaded files. Default: `UNDEF_LICENSE`. Supported `license` values: - `FREE_LICENSE` - `SELFMADE_NONPUB` - `NON_TEXTUAL` - `TEXT_NO_LICENSE` - `WITH_LICENSE` - `UNDEF_LICENSE` Important: - If `UNDEF_LICENSE` is used, uploaded files are not readable until a valid license is chosen. ## Usage examples ```bash # List directories / files at remote root rclone lsd studip-bremen-ma1: rclone ls studip-bremen-ma1: rclone lsf studip-bremen-ma1: # Create a directory in the configured course rclone mkdir studip-bremen-ma1:uploads # Upload a directory recursively rclone copy ./localdir studip-bremen-ma1:uploads/localdir # Upload a single file to an exact destination path rclone copyto ./report.pdf studip-bremen-ma1:uploads/report.pdf # Stream text into a remote file printf "hello from rclone\n" | rclone rcat studip-bremen-ma1:uploads/hello.txt # Download files back to local disk rclone copy studip-bremen-ma1:uploads ./downloads/uploads # Show file content rclone cat studip-bremen-ma1:uploads/hello.txt # Remove files / empty directories rclone deletefile studip-bremen-ma1:uploads/hello.txt rclone rmdir studip-bremen-ma1:uploads/empty-dir rclone mount studip-bremen-ma1: ./mount ```