<commit_before># StudDP
StudDP is a file downloader for [Stud.IP](http://studip.de/). It uses the
[Stud.IP: Rest.IP](http://studip.github.io/studip-rest.ip/) plugin to download files
when they changed or are not existent on the file system.

## SetUp

To set it up, do the following:

```sh
git clone https://github.com/MSchuwalow/StudDP
cd StudDP
cp default_config.json config.json
pip install -r requirements.txt
```

Modify the config.json:
```json
{
    "username": "",
    "base_address": "https://studip.uos.de/plugins.php/restipplugin",
    "local_path": "~/studip",
    "interval": 1200,
    "last_check": -1,
    "courses_selected": false,
    "courses": []
}
```

* `username` is your StudIP login name.
* `base_address` is the addres up to the root of your Rest.IP plugin. Leave out any trailing slashes.
* `local_path` is your local folder where files should be downloaded to.
* `interval` is the checking interval in seconds (so the default is 20 minutes).
* `last_check` is the last timestamp when checks were performed. Leave this as -1. This is set automatically.
* `courses_selected` tells the program if you have chosen your courses. This is set automatically.
* `courses` is your list of courses to download. You set this when running the program first. This is set automatically.

## Run

When running for the first time, use:

```sh
./StudDP.py
```

To get information about options, use:

```sh
./StudDP.py -h

    Usage: StudDP.py [options]

    Options:
      -h, --help       show this help message and exit
      -c, --config     change course selection
      -v, --verbose    print log to stdout
      -d, --daemonize  start as daemon
      -w, --windows    remove characters that are forbidden in windows paths
      -u, --update     update files when they are updated on StudIP
      -p, --password   force password update
```

When running it for the first time, it should prompt you for your StudIP password. It will then be stored in your login keyring. You therefore have to have
a keyring installed.\n
You will then see a ncurses interface which allows you to select the courses to download.

![](https://cdn.rawgit.com/MSchuwalow/StudDP/develop/Screenshots/Curses.png)

You can later use the -p and -c options to reconfigure your password and courses respectively.

## Running as a daemon

To run it as a daemon, use:

```sh
./StudDP.py -d&
```

To stop it the daemon, use:

```sh
./stop.sh
```

## Other information

To view the log use:

```sh
tail -f ~/.studdp/info.log
```

To uninstall use:

```sh
rm -rf StudDP
rm -rf ~/.studdp
```
<commit_msg>followup<commit_after># StudDP
StudDP is a file downloader for [Stud.IP](http://studip.de/). It uses the
[Stud.IP: Rest.IP](http://studip.github.io/studip-rest.ip/) plugin to download files
when they changed or are not existent on the file system.

## Setup

To set it up, do the following:

```sh
git clone https://github.com/MSchuwalow/StudDP
cd StudDP
cp default_config.json config.json
pip install -r requirements.txt
```

Modify the config.json:
```json
{
    "username": "",
    "base_address": "https://studip.uos.de/plugins.php/restipplugin",
    "local_path": "~/studip",
    "interval": 1200,
    "last_check": -1,
    "courses_selected": false,
    "courses": []
}
```

* `username` is your StudIP login name.
* `base_address` is the addres up to the root of your Rest.IP plugin. Leave out any trailing slashes.
* `local_path` is your local folder where files should be downloaded to.
* `interval` is the checking interval in seconds (so the default is 20 minutes).
* `last_check` is the last timestamp when checks were performed. This is set automatically.
* `courses_selected` tells the program if you have chosen your courses. This is set automatically.
* `courses` is your list of courses to download. This is set automatically.

## Run

When running for the first time, use:

```sh
./StudDP.py
```

To get information about options, use:

```sh
./StudDP.py -h

    Usage: StudDP.py [options]

    Options:
      -h, --help       show this help message and exit
      -c, --config     change course selection
      -v, --verbose    print log to stdout
      -d, --daemonize  start as daemon
      -w, --windows    remove characters that are forbidden in windows paths
      -u, --update     update files when they are updated on StudIP
      -p, --password   force password update
```

When running it for the first time, it should prompt you for your StudIP password. It will then be stored in your login keyring. You therefore have to have
a keyring installed.\n
You will then see a ncurses interface which allows you to select the courses to download.

![](https://cdn.rawgit.com/MSchuwalow/StudDP/develop/Screenshots/Curses.png)

You can later use the -p and -c options to reconfigure your password and courses respectively.

## Running as a daemon

To run it as a daemon, use:

```sh
./StudDP.py -d&
```

To stop it the daemon, use:

```sh
./stop.sh
```

## Other information

To view the log use:

```sh
tail -f ~/.studdp/info.log
```

To uninstall use:

```sh
rm -rf StudDP
rm -rf ~/.studdp
```

{'fraction_non_alphanumeric': 0.10995687965503724, 'fraction_numerical': 0.0029400235201881616, 'mean_word_length': 3.2525, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3447879', 'n_tokens_mistral': 1634, 'n_tokens_neox': 1567, 'n_words': 676}