-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: configuration, subs & renaming
- Loading branch information
Showing
6 changed files
with
176 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
title: Configuration | ||
menu: true | ||
weight: 2 | ||
--- | ||
Learn how to configure supper | ||
|
||
You can specify the configuration of how supper function in a `.yaml` configuration file. | ||
The configuration file can be located in different places according to operating system and precendence. | ||
Here is an overview: | ||
|
||
* Global configuration | ||
- Unix: `/etc/supper/supper.yaml` | ||
- Windows: `%HOMEPATH%\AppData\Roaming\Supper\supper.yaml` | ||
* Local configuration | ||
- `.supper.yaml` found in current working directory | ||
|
||
The local configuration has precendence over the global configuration. If supper is run with | ||
the `--config` argument, then that configuration file is used above all else. | ||
|
||
## Example | ||
Below the default configuration for supper is shown. Most of the configuration is | ||
self-explanatory, however some details will be covered in the following sections. | ||
```yaml | ||
# Supper configuration file | ||
|
||
# Satisfy the following languages when downloading subtitles | ||
languages: | ||
- en | ||
- es | ||
- de | ||
|
||
# Path to store application logs | ||
logfile: /var/log/supper/supper.log | ||
|
||
# Download only hearing impaired subtitles | ||
impared: false | ||
|
||
# Bind web server to port | ||
port: 5670 | ||
|
||
# Base path for reverse proxy | ||
proxypath: "/" | ||
|
||
# Movie collection configuration | ||
movies: | ||
# Directory to store movie collection | ||
directory: /media/movies | ||
|
||
# Template to use for renaming movies | ||
template: > | ||
{{ .Movie }} ({{ .Year }})/ | ||
{{ .Movie }} ({{ .Year }}) {{ .Quality }} | ||
# TV show collection configuration | ||
tvshows: | ||
# Directory to store TV shows | ||
directory: /media/tvshows | ||
|
||
# Template to use for renaming TV shows | ||
template: > | ||
{{ .TVShow }}/Season {{ .Season | pad }}/ | ||
{{ .TVShow }} - S{{ .Season | pad }}E{{ .Episode | pad }} - {{ .Name }} | ||
# Plugins are run after downloading a subtitle. The plugin is a simple shell | ||
# command which is given the .srt file path in the SUBTITLE environment variable | ||
plugins: | ||
# - name: my-plugin-name | ||
# exec: echo $SUBTITLE | ||
``` | ||
|
||
## Templates | ||
Templates are used to rename movie and TV series into folder/file names. The templating | ||
scheme uses the golang templating language and is highly customizable. You may define | ||
subfolders in your templating scheme using the path seperator `/`. | ||
|
||
### Movies | ||
The following directives are available for movie templates: | ||
|
||
| Directive | Description | Example | | ||
| :-------: | :-------------------------------: | :---------------: | | ||
| `.Movie` | The name of the movie | `Inception` | | ||
| `.Year` | The release year of the movie | `2010` | | ||
| `.Quality` | Quality of the movie release | `720p` | | ||
| `.Codec` | Codec of the movie release | `h264` | | ||
| `.Source` | Source of the movie release | `BluRay` | | ||
| `.Group` | Release group of the movie | N/A | | ||
|
||
**Example:** | ||
```handlebars | ||
{{ .Movie }} ({{ .Year }})/{{ .Movie }} ({{ .Year }}) {{ .Quality }} | ||
``` | ||
|
||
|
||
## TV shows | ||
The following directovies are available for tv show templates: | ||
|
||
| Directive | Description | Example | | ||
| :-------: | :-------------------------------: | :---------------: | | ||
| `.TVShow` | The name of the TV show | `Game of Thrones` | | ||
| `.Name` | The name of the episode | `Pilot` | | ||
| `.Season` | Season number | `1` | | ||
| `.Episode` | Episode number | `1` | | ||
| `.Quality` | Quality of the movie release | `720p` | | ||
| `.Codec` | Codec of the movie release | `h264` | | ||
| `.Source` | Source of the movie release | `BluRay` | | ||
| `.Group` | Release group of the movie | N/A | | ||
|
||
**Example:** | ||
```handlebars | ||
{{ .TVShow }}/Season {{ .Season | pad }}/ | ||
{{ .TVShow }} - S{{ .Season | pad }}E{{ .Episode | pad }} - {{ .Name }} | ||
``` | ||
|
||
## Template Functions | ||
You can utilize template functions to manipulate with the data in your templating schemes | ||
|
||
#### `pad` | ||
Pads the number with zeros to make up exactly two characters total. Useful for padding season and episode numbers. | ||
|
||
**Example** | ||
```handlebars | ||
{{ .Season | pad }} | ||
``` | ||
will output `01` for season one instead of just `1`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
title: Subtitles | ||
menu: true | ||
weight: 3 | ||
--- | ||
How to download subtitles with supper | ||
|
||
You can download subtitles with supper for individual files of whole directories easily | ||
|
||
## Examples: | ||
Download subtitles for all media in the `/media/movies` folder in english, german and spanish for files | ||
added or modified in the last 24 hours: | ||
```bash | ||
supper sub -len -lde -les -m 24h /media/movies | ||
``` | ||
|
||
Download english subtitles for the file `tvshow.mp4` if the subtitles has a score better than 75%: | ||
```bash | ||
supper sub -len -s 75 tvshow.mp4 | ||
``` | ||
|
||
Download and overwrite existing english subtitles for all media in `/media/tvshows` | ||
```bash | ||
supper sub -len --force /media/tvshows | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Renaming | ||
menu: true | ||
weight: 4 | ||
--- | ||
How to rename and organize media | ||
|
||
You can organize and rename individual files or whole directories with supper | ||
|
||
### Examples: | ||
Rename all media in the `/media/downloads` folder using hardlink (default action): | ||
```bash | ||
supper ren /media/downloads | ||
``` | ||
|
||
Rename only movies in the `/media/downloads` folder using copy: | ||
```bash | ||
supper ren --action copy --movies /media/downloads | ||
``` | ||
|
||
Rename all media in the `/media/downloads` folder and extract media from archives (rar/zip): | ||
```bash | ||
supper ren --extract /media/downloads | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters