File indexing completed on 2025-01-19 03:59:51
0001 from ..parsers.baseporter import Baseporter, Loader, ExtraOption, io_progress 0002 0003 0004 class ExporterLoader(Loader): 0005 def __init__(self): 0006 super().__init__(__file__, __name__, "export") 0007 0008 @property 0009 def exporters(self): 0010 return self.items 0011 0012 def set_options(self, parser): 0013 group = parser.add_argument_group("Generic output options") 0014 group.add_argument( 0015 "--pretty", "-p", 0016 action="store_true", 0017 help="Pretty print (for formats that support it)", 0018 ) 0019 group.add_argument( 0020 "--frame", 0021 type=int, 0022 default=0, 0023 help="Frame to extract (for single-image formats)", 0024 ) 0025 0026 super().set_options(parser) 0027 0028 return group 0029 0030 0031 exporters = ExporterLoader() 0032 exporter = exporters.decorator