4 from colly
.commands
import CsvCommand
6 class FormatCommand(CsvCommand
):
8 usage
= "%prog FILE [OPTIONS]" #: overwrites baseparser
9 summary
= "Turn collated CSV file into JSON, or other format"
12 super(FormatCommand
, self
).__init
__()
15 self.parser.add_option('-f', '--format',
18 callback=headings_callback,
21 help='Convert to format (-f) from CSV.')
24 def run(self
, options
, args
):
25 print self
.objects
[0].as_json()