1010from .constants import DEFAULT_INTERVAL
1111from .constants import DEFAULT_OUTPUT
1212from .constants import DEFAULT_SKIP
13+ from .constants import DEFAULT_WORKERS
1314
1415# Help messages of the particular option of the CLI.
1516HELP_BASE = "The prefix of the thumbnails path can be customized."
1819HELP_FORMAT = "Output format. Default is %s." % DEFAULT_FORMAT
1920HELP_COMPRESS = "The image scale coefficient. A number from 0 to 1."
2021HELP_INTERVAL = "The interval between neighbor thumbnails in seconds."
22+ HELP_WORKERS = "Workers number for concurrent processing. Default is calculated automatically."
2123
2224# This defines a choice of supported values for the '--format' option of the CLI.
2325format_choice = click .Choice (ThumbnailFactory .thumbnails .keys (), case_sensitive = False )
@@ -27,6 +29,7 @@ def cli(func):
2729 @click .command ()
2830 @click .option ("--compress" , "-C" , default = DEFAULT_COMPRESS , help = HELP_COMPRESS )
2931 @click .option ("--interval" , "-I" , default = DEFAULT_INTERVAL , help = HELP_INTERVAL )
32+ @click .option ("--workers" , "-W" , default = DEFAULT_WORKERS , help = HELP_WORKERS )
3033 @click .option ("--base" , "-B" , default = DEFAULT_BASE , help = HELP_BASE )
3134 @click .option ("--skip" , "-S" , default = DEFAULT_SKIP , help = HELP_SKIP , is_flag = True )
3235 @click .option ("--output" , "-O" , default = DEFAULT_OUTPUT , type = click .Path (), help = HELP_OUTPUT )
0 commit comments