Esempio n. 1
0
    def configure(self):
        '''
        Defines the command arguments.
        '''
        datasets = DatabaseRepository.listYears()
        raw_formats = FormatRepository.listExportableFormatNames()
        minifiable_formats = FormatRepository.listMinifiableFormatNames()

        self.addArgument('-d', '--datasets',
                         metavar='DATASET',
                         nargs='*',
                         default=datasets,
                         help=('Datasets to build.\n'
                               'Defaults to all available: {}' \
                                   .format(', '.join(datasets))))
        self.addArgument('-r', '--raw',
                         metavar='FORMAT',
                         nargs='*',
                         default=raw_formats,
                         help=('Raw formats to build the dataset.\n'
                               'Defaults to all available: {}' \
                                    .format(', '.join(raw_formats))))
        self.addArgument('-m', '--min',
                         metavar='FORMAT',
                         nargs='*',
                         default=minifiable_formats,
                         help=('Minifiable formats to build the dataset.\n'
                               'Defaults to all available: {}' \
                                   .format(', '.join(minifiable_formats))))
Esempio n. 2
0
    def configure(self):
        '''
        Defines the command arguments.
        '''
        datasets = DatabaseRepository.listYears()
        raw_formats = FormatRepository.listExportableFormatNames()
        minifiable_formats = FormatRepository.listMinifiableFormatNames()

        self.addArgument('-d', '--datasets',
                         metavar='DATASET',
                         nargs='*',
                         default=datasets,
                         help=('Datasets to build.\n'
                               'Defaults to all available: {}' \
                                   .format(', '.join(datasets))))
        self.addArgument('-r', '--raw',
                         metavar='FORMAT',
                         nargs='*',
                         default=raw_formats,
                         help=('Raw formats to build the dataset.\n'
                               'Defaults to all available: {}' \
                                    .format(', '.join(raw_formats))))
        self.addArgument('-m', '--min',
                         metavar='FORMAT',
                         nargs='*',
                         default=minifiable_formats,
                         help=('Minifiable formats to build the dataset.\n'
                               'Defaults to all available: {}' \
                                   .format(', '.join(minifiable_formats))))
Esempio n. 3
0
 def configure(self):
     '''
     Defines the command arguments.
     '''
     self.addArgument('-b', '--base',
                      help='Database year to export.')
     self.addArgument('-f', '--format',
                      metavar='FORMAT',
                      choices=FormatRepository.listExportableFormatNames(),
                      help=('Format to export the database.\n'
                            'Options: %(choices)s'))
     self.addArgument('-m', '--minify',
                      dest='minify',
                      action='store_true',
                      help='Minifies output file whenever possible.')
     self.addArgument('-o', '--out',
                      dest='filename',
                      nargs='?',
                      help=('Specify a file to write the export to.\n'
                            'If none are specified, %(prog)s writes data to '
                            'standard output.'))
Esempio n. 4
0
 def configure(self):
     '''
     Defines the command arguments.
     '''
     self.addArgument('-b', '--base', help='Database year to export.')
     self.addArgument('-f',
                      '--format',
                      metavar='FORMAT',
                      choices=FormatRepository.listExportableFormatNames(),
                      help=('Format to export the database.\n'
                            'Options: %(choices)s'))
     self.addArgument('-m',
                      '--minify',
                      dest='minify',
                      action='store_true',
                      help='Minifies output file whenever possible.')
     self.addArgument(
         '-o',
         '--out',
         dest='filename',
         nargs='?',
         help=('Specify a file to write the export to.\n'
               'If none are specified, %(prog)s writes data to '
               'standard output.'))