Compare commits
No commits in common. "437cbcd73f7efca8ca708ead7bd1fe061f20fc2c" and "d06ea132af8e51da881e9e165ae02fb4af16cc25" have entirely different histories.
437cbcd73f
...
d06ea132af
|
@ -27,10 +27,9 @@ FANZA_ID_REGEX = re.compile('^d_[0-9]+$')
|
|||
FAKKU_ID_REGEX = re.compile('.*_FAKKU$')
|
||||
|
||||
TEXTLESS_REGEX = re.compile('(台詞|セリフ|せりふ|テキスト|文字)((な|無)し|抜き)|notext|textless', re.IGNORECASE)
|
||||
EPILOGUE_REGEX = re.compile('after|後日談|おまけ', re.IGNORECASE)
|
||||
EPILOGUE_REGEX = re.compile('after|後日談', re.IGNORECASE)
|
||||
HI_RES_REGEX = re.compile('高解像度', re.IGNORECASE)
|
||||
FRONT_COVER_REGEX = re.compile('(^|[^裏])表紙|cover|hyoushi', re.IGNORECASE)
|
||||
BACK_COVER_REGEX = re.compile('裏表紙', re.IGNORECASE)
|
||||
COVER_REGEX = re.compile('表紙|cover|hyoushi', re.IGNORECASE)
|
||||
ALT_VERSIONS = [
|
||||
'褐色',
|
||||
'日焼け',
|
||||
|
@ -526,14 +525,14 @@ def collate_from_paths(srcs, dest, start_index, exclude):
|
|||
if textless_split != False:
|
||||
return textless_split
|
||||
|
||||
cover_split = try_collate_split_regex(srcs, dest, start_index, exclude, earlier=FRONT_COVER_REGEX, later=BACK_COVER_REGEX)
|
||||
if cover_split != False:
|
||||
return cover_split
|
||||
|
||||
epilogue_split = try_collate_split_regex(srcs, dest, start_index, exclude, later=EPILOGUE_REGEX)
|
||||
if epilogue_split != False:
|
||||
return epilogue_split
|
||||
|
||||
cover_split = try_collate_split_regex(srcs, dest, start_index, exclude, earlier=COVER_REGEX)
|
||||
if cover_split != False:
|
||||
return cover_split
|
||||
|
||||
if all(src.is_file() and is_image(src) for src in srcs):
|
||||
ordering = complete_prefix_number_ordering(srcs)
|
||||
if ordering:
|
||||
|
@ -855,7 +854,7 @@ argparser.add_argument(
|
|||
)
|
||||
subparsers = argparser.add_subparsers(title="subcommands", required=True)
|
||||
|
||||
parser_extract = subparsers.add_parser('extract', aliases=['x', 'ex'], help='extract zipfiles')
|
||||
parser_extract = subparsers.add_parser('extract', help='extract zipfiles')
|
||||
parser_extract.add_argument(
|
||||
'-r', '--remove',
|
||||
action='store_true',
|
||||
|
@ -870,7 +869,7 @@ parser_extract.add_argument(
|
|||
)
|
||||
parser_extract.set_defaults(func=extract)
|
||||
|
||||
parser_fetch = subparsers.add_parser('fetch', aliases=['f', 'fet'], help='fetch metadata and thumbnails')
|
||||
parser_fetch = subparsers.add_parser('fetch', help='fetch metadata and thumbnails')
|
||||
parser_fetch.add_argument(
|
||||
'-l', '--locale',
|
||||
type=str,
|
||||
|
@ -883,7 +882,6 @@ parser_fetch.set_defaults(func=fetch)
|
|||
|
||||
parser_collate = subparsers.add_parser(
|
||||
'collate',
|
||||
aliases=['c', 'co', 'col'],
|
||||
help='collate each work into a sequence of image files',
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description=textwrap.dedent("""\
|
||||
|
@ -930,7 +928,6 @@ parser_collate.set_defaults(func=collate)
|
|||
|
||||
parser_manual_collate = subparsers.add_parser(
|
||||
'manual-collate',
|
||||
aliases=['mc', 'man', 'manual'],
|
||||
help='collate a single work manually',
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description=textwrap.dedent("""\
|
||||
|
@ -973,11 +970,11 @@ parser_manual_collate.add_argument(
|
|||
)
|
||||
parser_manual_collate.set_defaults(func=manual_collate)
|
||||
|
||||
parser_analyze = subparsers.add_parser('analyze', aliases=['a', 'an', 'anal'], help='analyze an extracted folder to assist in collation')
|
||||
parser_analyze = subparsers.add_parser('analyze', help='analyze an extracted folder to assist in collation')
|
||||
parser_analyze.add_argument('work_id')
|
||||
parser_analyze.set_defaults(func=analyze)
|
||||
|
||||
parser_metadata = subparsers.add_parser('metadata', aliases=['m', 'me', 'meta'], help='view or modify metadata for a work')
|
||||
parser_metadata = subparsers.add_parser('metadata', help='view or modify metadata for a work')
|
||||
parser_metadata.add_argument('work_id')
|
||||
parser_metadata.add_argument(
|
||||
'--virtual',
|
||||
|
@ -988,7 +985,6 @@ parser_metadata.set_defaults(func=metadata)
|
|||
|
||||
parser_generate = subparsers.add_parser(
|
||||
'generate',
|
||||
aliases=['g', 'gen'],
|
||||
help='generate HTML/CSS/JS for library site',
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description=textwrap.dedent("""\
|
||||
|
|
Loading…
Reference in a new issue