add '-K' as shortcut for '--list-keywords'

pull/40/head
Mike Fährmann 7 years ago
parent 54c0715135
commit 81877bb5f6
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -156,8 +156,8 @@ general pattern specifically for ``PixivUserExtractor`` instances.
The ``category`` and ``subcategory`` of all extractors are included in the The ``category`` and ``subcategory`` of all extractors are included in the
output of ``gallery-dl --list-extractors``. For a specific URL these values output of ``gallery-dl --list-extractors``. For a specific URL these values
can also be determined by using the ``--list-keywords`` command-line option can also be determined by using the ``-K``/``--list-keywords`` command-line
(see the example below). option (see the example below).
extractor.*.filename extractor.*.filename
-------------------- --------------------
@ -169,12 +169,12 @@ Description A `format string`_ to build the resulting filename
The available replacement keys depend on the extractor used. A list The available replacement keys depend on the extractor used. A list
of keys for a specific one can be acquired by calling *gallery-dl* of keys for a specific one can be acquired by calling *gallery-dl*
with the ``--list-keywords`` command-line option. with the ``-K``/``--list-keywords`` command-line option.
For example: For example:
.. code:: .. code::
$ gallery-dl --list-keywords http://seiga.nicovideo.jp/seiga/im5977527 $ gallery-dl -K http://seiga.nicovideo.jp/seiga/im5977527
Keywords for directory names: Keywords for directory names:
----------------------------- -----------------------------
category category

@ -119,6 +119,10 @@ def build_parser():
"-j", "--dump-json", dest="list_data", action="store_true", "-j", "--dump-json", dest="list_data", action="store_true",
help="Print JSON information", help="Print JSON information",
) )
output.add_argument(
"-K", "--list-keywords", dest="list_keywords", action="store_true",
help="Print a list of available keywords for the given URLs",
)
output.add_argument( output.add_argument(
"--list-modules", dest="list_modules", action="store_true", "--list-modules", dest="list_modules", action="store_true",
help="Print a list of available extractor modules", help="Print a list of available extractor modules",
@ -128,10 +132,6 @@ def build_parser():
help=("Print a list of extractor classes " help=("Print a list of extractor classes "
"with description, (sub)category and example URL"), "with description, (sub)category and example URL"),
) )
output.add_argument(
"--list-keywords", dest="list_keywords", action="store_true",
help="Print a list of available keywords for the given URLs",
)
downloader = parser.add_argument_group("Downloader Options") downloader = parser.add_argument_group("Downloader Options")
downloader.add_argument( downloader.add_argument(

@ -67,6 +67,7 @@ skip = [
"archivedmoe", "archiveofsins", "thebarchive", "archivedmoe", "archiveofsins", "thebarchive",
# temporary issues # temporary issues
"imgtrex", # 504 "imgtrex", # 504
"mangazuki", # 403
] ]
# enable selective testing for direct calls # enable selective testing for direct calls
if __name__ == '__main__' and len(sys.argv) > 1: if __name__ == '__main__' and len(sys.argv) > 1:

Loading…
Cancel
Save