Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Synchronization script for lecture notes on is.muni.cz

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages