---
+++
@@ -231,10 +231,12 @@
if __name__ == "__main__":
opt_parser = OptionParser(usage="usage: %prog [options] file_to_view")
- opt_parser.add_option("-s", "--skip", help="skip the first X fields of each line (default: 3)",
+ opt_parser.add_option("-s", "--skip", help="Skip the first X fields of each line (default: 3)",
dest="skipped_fields", metavar="X")
+ opt_parser.add_option("-p", "--plaintext", help="Output plaintext tree to stdout (no GUI)",
+ action="store_true", dest="plaintext", default=False)
(opt, args) = opt_parser.parse_args()
-
+
if opt.skipped_fields is None:
opt.skipped_fields = 3
else:
@@ -243,6 +245,10 @@
if len(args) == 0:
opt_parser.print_help()
exit(1)
+
log = LogFile(args[0], opt)
- #log.display()
- gui.start(log, opt)
+
+ if opt.plaintext:
+ log.tree.display()
+ else:
+ gui.start(log, opt)
Generated with KisssPM