41 PKG =
'diagnostic_analysis'
43 roslib.load_manifest(PKG)
46 from optparse
import OptionParser
50 if __name__==
'__main__':
52 parser = OptionParser()
53 parser.add_option(
"-l",
"--length", dest=
"length",
54 help=
"Set length of output CSV", metavar=
"LEN",
55 default=
None, action=
"store")
56 parser.add_option(
"-s",
"--skip", dest=
"skip",
57 help=
"Skip every nth row. If length set, will ignore this value.",
58 metavar=
"SKIP", default=10, action=
"store")
59 parser.add_option(
"-m",
"--max", dest=
"max",
60 help=
"Make largest possible file for Open Office (65k lines). If selected, other options ignored.",
61 metavar=
"MAX", default=
False, action=
"store_true")
63 options, args = parser.parse_args()
67 print(
'No CSV file given.')
72 if not csv_file.endswith(
'.csv'):
73 print(
'File %s is not a CSV file. Aborting.' % csv_file)
78 elif options.length
is None:
83 print(
'Created sparse CSV %s' % output_file)