-
Notifications
You must be signed in to change notification settings - Fork 24
Commandline arguments
You might want to read the README first.
Tell
glyrc
where you want to get your metadata from.
You can get a full list of providers for each getter by runningglyrc -L
The string you can pass here looks like this example for cover:
lastfm;google
This would querylastfm
and
Alternatively you may use the stringall
in it:all;-lastfm;
All providers exceptlastfm
(therefore the minus) are used.
By default all built-in providers are used.
The directory where glyr will output the found items.
By default everything is written to the current working directory.
There are three special files:
stdout
Outputs file to stdoutstderr
Outputs file to stderrnull
Outputs item nowhereIf the given path is instead a regular filename, it will save the item at this exact path.
For example:--write /tmp/cover.png
→ write to /tmp/cover.png even with —number > 1
How many items should be delivered, by default only one item is searched.
The number of results is not guaranteed to be num, but should be at max. num
A value of 0 will causelibglyr
to deliver everything it finds.
Some providers offer localized content, or content only being available in certain countries.
Examples are: last.fm, amazon and google.
The language is given in ISO 639-1 codes like ‘de’ or ‘en’.
Alternatively you can set it to ‘auto’, which will causelibglyr
to guess your language by your locale.
This is the default behavior.
Only query providers that offer language-specific content. (Only useful with —lang)
libglyr
features fuzzy matching to enhance searchresults.
Look at the string “Carl” and the accidentally misstyped version “Kalr”:
Those strings will be compares using the Levenshtein distance which basically counts
the number of edit, substitute and delete operations to transfrom “Carl” into “Kalr”.
The distance in this case is 3 since three substitutions are needed.
The fuzzyness parameter is the maximum distance two strings may have to match.
A high distance (like about 10) matches even badly misstyped strings, but also introduces bad results.
Low settings however will omit some good results.The default values is currently 4.
To be more secure some correction is applied:
- Adele – 19
- Adele – 21
- lv-distance = 2 which is <= 4
- But since the lv-distance is the same as the length “21” it won’t match.
The easiest way to prevent this, is to tag your music.
A float in the range [0.0..1.0].
It tellslibglyr
how to weight quality and speed.
A value of 0.0 prefers fast providers, 1.0 high-quality providers.
The default is 0.85.
The maximum number of items a provider may retrieve.
Use this to split up your search over several sources.
{color:red}Note: This might be removed in future releases.
How many providers may be queried in parallel,
this is not necessarily the number of actual parallel downloads.
The default is 0 where glyr will adjust this value itself.
The useragent that is used during HTTP requests.
This should be not empty, since it may break some providers.
The number of redirects that are allowed.
A value of 0 is possible but might break some providers.
The maximum number of seconds to wait till a connection is canceled.
Generally, you shouldn’t use this anyway.
The proxy to use, if any.
It is passed in the form: [protocol://][user:pass@]yourproxy.domain[:port]
Example:
- Proxy.fh-hof.de:3128
- http://hman:rootroot@godserve.com:666
Since internally libcurl is used the proxy may also read from env_vars like http_proxy automagically.
For the getters
cover
andartistphoto
only.
Will cause to libglyr to download found images,
which is also the default.
For the getters
cover
andartistphoto
only.
Do not download images, but return the full URL to them.
This makes libglyr act a bit like a search engine.
The artist you want to search for, it is needed for every getter.
Libglyr
will apply some basic formatting to strip things like “feat. XYZ”
The album you want to search for, it is needed for the following getters:
- cover
- albumreview
- tracklist
Optional for these:
- tags
- relations
Libglyr
will apply some basic formatting to strip things like “CD01”
The songtitle you want to search for, it is needed for the following getters:
- lyrics
- similarsongs
Optional for these:
- tags
- relations
Libglyr
will apply some basic formatting to strip things like “feat. (remix blahblah)”
For the getters
cover
andartistphoto
only.
The maximum size an image may have, assuming it to be quadratic.
For the getters
cover
andartistphoto
only.
The minimum size an image may have, assuming it to be quadratic.
For the getters
cover
andartistphoto
only.
The allowed formats for images, in a comma separated list.
Example:
- “png;jpeg”
- “png;jpeg;tiff;jpg;” (default)
‘jpeg’ and ‘jpg’ because some websites return strange mimetypes (should be ‘jpeg’ only)
For textitems only.
Some providers (like_metrolyrics_) might return text with strange encodings,
that can not be converted to regular UTF8, but might return a subset of UTF8.
This options forceslibglyr
to prohibit those.
Cache all items you search in a file called metadata.db in the directory
.
If you ask for this item more than once it gets fetched from the cache, which is obviously much faster.
Selects data from the cache; you can use any other option behind this.
Example: Search for two items in cache and print them.
glyrc cache select lyrics -a Knorkator -t 'A' -n 2 --cache /tmp them
Deletes data from the cache; you can use any other option behind this.
Example: Delete artist/album
glyrc cache delete cover -a Equilibrium -b Sagas --cache /tmp
Lists all data in the cache.
Example:
glyrc cache list --cache /tmp
Whenever a item is retrieved the command cmd is executed.
The command might contain the special string ‘’ that is
expanded with the path to the item at runtime.Examples:
cat <path>; echo
Prints the items to the terminal.rm <path>
same as-w null
List all compiled in providers and the corresponding getter.
The verbosity level that is used by libglyr:
- 0: No output, but fatal errors.
- 1: Basic warnings.
- 2: Normal informal output
- 3: Basic debug output
- 4: Full debug output
The very short version of this text.
Print version string and exit.