Commits

Anonymous committed 83e92fd

Create --force-parser option to choose the parser

  • Participants
  • Parent commits 1e6a677

Comments (0)

Files changed (2)

File hachoir-metadata/ChangeLog

    to display files metadata
  * Create ISO image extractor
  * Hide Hachoir warnings by default (use --verbose to show them)
+ * Create --force-parser option to choose the parser
 
 What's new in hachoir-metadata 1.2.1?
 =====================================

File hachoir-metadata/hachoir-metadata

         action="store_true", default=False)
     parser.add_option("--bench", help=_("Run benchmark"),
         action="store_true", default=False)
+    parser.add_option("--force-parser",help=_("List all parsers then exit"),
+        type="str")
     parser.add_option("--parser-list",help=_("List all parsers then exit"),
         action="callback", callback=displayParserList)
     parser.add_option("--profiler", help=_("Run profiler"),
 
     # Create parser
     try:
-        parser = createParser(filename, real_filename=real_filename)
+        if values.force_parser:
+            tags = [ ("id", values.force_parser), None ]
+        else:
+            tags = None
+        parser = createParser(filename, real_filename=real_filename, tags=tags)
     except InputStreamError, err:
         error(unicode(err))
         return False