You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import main
  2. from argv.checkpoints import arg_checkpoints
  3. from argv.common import arg_debug, arg_help, arg_version
  4. from argv.run.argument import arg_altered, arg_auto_rescale, arg_auto_resize, arg_auto_resize_crop, arg_color_transfer,\
  5. arg_cpu, arg_gpu, arg_ignore_size, arg_input, arg_json_args, arg_json_folder_name, arg_n_core, arg_n_run, \
  6. arg_output, arg_overlay, arg_preferences, arg_step
  7. def init_run_parser(subparsers):
  8. run_parser = subparsers.add_parser(
  9. 'run',
  10. description="Process image(s) with dreampower.",
  11. help="Process image(s) with dreampower.",
  12. add_help=False
  13. )
  14. run_parser.set_defaults(func=main.main)
  15. # conflicts handler
  16. processing_mod = run_parser.add_mutually_exclusive_group()
  17. scale_mod = run_parser.add_mutually_exclusive_group()
  18. # add run arguments
  19. arg_input(run_parser)
  20. arg_output(run_parser)
  21. arg_auto_rescale(scale_mod)
  22. arg_auto_resize(scale_mod)
  23. arg_auto_resize_crop(scale_mod)
  24. arg_overlay(scale_mod)
  25. arg_ignore_size(scale_mod)
  26. arg_color_transfer(run_parser)
  27. arg_preferences(run_parser)
  28. arg_n_run(run_parser)
  29. arg_step(run_parser)
  30. arg_altered(run_parser)
  31. arg_cpu(processing_mod)
  32. arg_gpu(processing_mod)
  33. arg_checkpoints(run_parser)
  34. arg_n_core(run_parser)
  35. arg_json_args(run_parser)
  36. arg_json_folder_name(run_parser)
  37. arg_help(run_parser)
  38. arg_debug(run_parser)
  39. arg_version(run_parser)