Coder Social home page Coder Social logo

is.muni-sync's Introduction

IS.MUNI-sync

A script to synchronize directories from IS.MUNI to your local machine.

Setup

  1. Clone the repository:

    git clone https://github.com/your-username/IS.MUNI-sync.git
    cd IS.MUNI-sync
  2. Copy the example configuration file and customize it:

    cp config.ini.example config.ini
  3. Open config.ini in your favorite text editor and update the values as needed. Here's a brief explanation of each setting:

    • ROOT_DIR: The root directory on your local machine where the synchronized directories will be stored.
    • LOG_LEVEL: The logging level for script execution. Valid values are DEBUG, INFO, WARNING, ERROR, and CRITICAL.
    • Under [Channels], each entry represents a channel you want to synchronize. The key is the name of the local directory (relative to ROOT_DIR), and the value is the path on the server after https://is.muni.cz/auth/.

    Example:

    [Settings]
    ROOT_DIR = ~/muni_sync
    LOG_LEVEL = INFO
    
    [Channels]
    IA174 = /el/fi/podzim2023/IA174/um/slides_plain/before_lecture/
    PV079 = /el/fi/podzim2023/PV079/um/lectures/
    # Add more directories as needed
  4. Set up environment variables for authentication:

    • IS_USERNAME: Your non-personal UCO.
    • IS_PASSWORD: Your non-personal is.muni.cz password.

    It's recommended to use a non-personal account for this synchronization to ensure security, but your personal account will work. See the IS.MUNI API in the IS help for more information.

    export IS_USERNAME='your-username'
    export IS_PASSWORD='your-password'
  5. Run the script:

    python3 main.py

Usage

usage: main.py [-h] [--log LOG] [--config CONFIG]

Directory synchronization script.

optional arguments:
  -h, --help       show this help message and exit
  --log LOG        Set log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
  --config CONFIG  Path to the config.ini.

Plugins

To utilize plugins, specify them under the [Plugins] section in the config.ini file, with the format plugin_name = channels. Here, plugin_name is the name of the plugin, and channels is a comma-separated list of channel names where the plugin should be applied.

[Plugins]
EmbedFonts = PV079

EmbedFonts

Automatically embeds fonts in downloaded PDF files ensuring visual consistency across different systems. Requires Ghostscript (command gs) and pdffonts tool installed.

is.muni-sync's People

Contributors

k11m1 avatar

Watchers

 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.