diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-08-11 14:25:59 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-08-11 14:25:59 +0200 |
commit | 210e6edc8a8b7c19bdf8a3ba0499d2c559aa5116 (patch) | |
tree | 40c8ff4cafa1aae5e7566cdb48c15f183abdf1e5 | |
parent | 6c77bff3824447071cde1dd329c1c292c45b9b42 (diff) |
Update readme
-rw-r--r-- | README.md | 54 |
1 files changed, 35 insertions, 19 deletions
@@ -18,6 +18,7 @@ Application Options: -t, --test Test and print config -q, --quiet Do not print output from lftp -i, --import Build queues from stdin + -l, --local-dir=NAME Override local dir for this run -p, --lftp=NAME Path to lftp program (default: lftp) Help Options: @@ -31,6 +32,13 @@ Help Options: "Default": { "GetCmd": "mirror" }, + "LocalDirs": [ + { + "Name": "my-tv-dir", + "Parser": "show", + "Dir": "/tmp/{{ .Name }}/S{{ .Season }}/" + }, + ], "Sites": [ { "Name": "foo", @@ -38,7 +46,7 @@ Help Options: "/dir1", "/dir2" ], - "LocalDir": "/tmp/{{ .Name }}/S{{ .Season }}/", + "LocalDir": "my-tv-dir", "SkipSymlinks": true, "SkipExisting": true, "SkipFiles": true, @@ -74,18 +82,16 @@ Help Options: All options can be overridden per site. This is useful when you want to apply the same options to multiple sites. -`GetCmd` sets the lftp command to use when downloading, this can also be an -alias. For example: If you have `alias m "mirror --only-missing"` in your -`.lftprc`, then `GetCmd` can be set to `m`. +`LocalDirs` defines one or more local directory configurations. -`Sites` holds the configuration for each individual site. - -`Name` is the bookmark or URL of the site. This is passed to the `open` command in lftp. +`Name` is the name of this local directory configuration. This is used to bind a +site to a local directory. -`Dirs` is a list of remote directories from which the queue is generated. +`Parser` sets the parser to use when parsing media. Valid values are `show`, +`movie` or empty string (disable parsing). -`LocalDir` is the local directory where files should be downloaded. This can be -a template. When the `show` parser is used, the following template variables are +`Dir` is the local directory where files should be downloaded. This can be a +template. When the `show` parser is used, the following template variables are available: Variable | Description | Type | Example @@ -105,7 +111,25 @@ Variable | Description | Type | Example All variables can be formatted with `Sprintf`. For example `/mydir/{{ .Name }}/S{{ .Season | Sprintf "%02" }}/` would format the season using two decimals -and would result in `/mydir/The.Wire/S01`. +and would result in `/mydir/The.Wire/S01/`. + +`Replacements` is a list of replacements that can be used to replace +misspellings or incorrect casing in media titles. `Pattern` is a regular +expression and `Replacement` is the replacement string. If multiple replacements +are given, they will be processed in the order they are listed. + +`Sites` holds the configuration for each individual site. + +`Name` is the bookmark or URL of the site. This is passed to the `open` command in lftp. + +`GetCmd` sets the lftp command to use when downloading, this can also be an +alias. For example: If you have `alias m "mirror --only-missing"` in your +`.lftprc`, then `GetCmd` can be set to `m`. + +`Dirs` is a list of remote directories from which the queue is generated. + +`LocalDir` is the name of the local directory configuration to use from +`LocalDirs`. `SkipSymlinks` determines whether to ignore symlinks when generating the queue. @@ -136,9 +160,6 @@ earliest match is given the highest rank. For example, if the items media, then given the priorities in the example above, `Foo.1.important` would be kept and `Foo.2.less.important` would be removed from the queue. -`Parser` sets the parser to use when parsing media. Valid values are `show`, -`movie` or empty string (disable parsing). - `MaxAge` sets the maximum age of directories to consider for the queue. If a directory is older than `MaxAge`, it will always be excluded. `MaxAge` has precedence over `Patterns` and `Filters`. @@ -151,10 +172,5 @@ queue. matching any of these patterns will be excluded from the queue. `Filters` has precedence over `Patterns`. -`Replacements` is a list of replacements that can be used to replace -misspellings or incorrect casing in media titles. `Pattern` is a regular -expression and `Replacement` is the replacement string. If multiple replacements -are given, they will be processed in the order they are listed. - `PostCommand` specifies a command for post-processing of the queue. The queue will be passed to the command on stdin, in JSON format. Leave empty to disable. |