1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-23 11:12:40 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Mike Fährmann
1578013efc
remove unused default config path 2019-03-04 20:53:58 +01:00
Mike Fährmann
176b7253a1
update function signature for config.load() 2019-03-01 14:13:34 +01:00
Mike Fährmann
513d807632
explicitly open config files as utf-8 2018-05-25 16:29:46 +02:00
Mike Fährmann
b50bdbf3d7
change config specifiers in input file format
Instead of a dictionary/object, input file options are now specified
by a 'key=value' pair starting with '-' for options only applying to
the next URL or '-G' for Global options applying to all following URLs.

See the docstring of parse_inputfile() for details.

Example option specifiers:

- filename = "{id}.{extension}"
- extractor.pixiv.user.directory = ["Pixiv Users", "{user[id]}"]
-spaces="are_optional"
-G keywords = {"global": "option"}
2018-02-16 03:10:41 +01:00
Mike Fährmann
057668e17e
extend input-file format with per-URL config and comments
- see docstring of parse_inputfile() for details
- TODO: unittests, recursion (currently setting for example
  {"extractor": {"key": "value"}} will override the whole "extractor"
  branch instead of merging {"key": "value"} into the already existing
  dictionary)
2018-02-07 21:47:27 +01:00
Mike Fährmann
ea8ca4cfa4
add 'util.expand_path()' 2017-10-26 00:04:28 +02:00
Mike Fährmann
b319f4bab3
smaller code and text changes 2017-10-01 18:23:40 +02:00
Mike Fährmann
004456d5d5
properly update the config-dictionary
When using 2 or more config files, the values of the second would
improperly overwrite nested dictionaries of the first one.
The new method properly combines these nested dictionaries as well.
2017-08-12 20:07:27 +02:00
Mike Fährmann
e3212dd98f
fix some smaller stuff
- remove support for old windows config paths
- catch exception if cache-database can't be opened
- fix username/password settings for unit tests
- rename variable 'max_tries' to 'retries'
2017-03-27 14:30:32 +02:00
Mike Fährmann
e4b3077168
improve config module
- speed improvements, especially in the 'interpolate' function
- 'interpolate' now prioritizes base-level values if they exist
  - "username" is chosen before "extractor.<category>.username"
  - -u/--username & co can now override config-file values
2017-03-27 11:59:27 +02:00
Mike Fährmann
27ae152f57
use logging to report errors 2017-03-11 01:47:57 +01:00
Mike Fährmann
0cfe51dc78
add '--config-yaml' option
(#8)
2017-03-08 16:57:42 +01:00
Mike Fährmann
4f123b8513
code adjustments according to pep8 2017-01-30 19:40:15 +01:00
Mike Fährmann
7c8fae62f6
update default config file paths 2016-11-10 16:24:08 +01:00
Mike Fährmann
91c446805b
replace platform.system() with os.name 2016-10-25 15:44:36 +02:00
Mike Fährmann
2418bfe91b
replace JSONDecodeError with ValueError 2016-09-24 12:06:17 +02:00
Mike Fährmann
3bcc697853
change default config paths 2016-07-25 11:12:52 +02:00
Mike Fährmann
b55870909c
properly implement -c,--config option 2015-11-14 17:22:56 +01:00
Mike Fährmann
bea33ae9cb implement config.setdefault 2015-10-07 00:58:43 +02:00
Mike Fährmann
2026223ed1 change argument format for config-calls 2015-10-05 12:42:42 +02:00
Mike Fährmann
9986a5ffb5 json-based config module 2015-10-03 20:23:55 +02:00