Skip to content

Commit ad13447

Browse files
authored
Merge pull request #139 from MideTechnology/feature/xml2ebml_no_header
Adding a -n option to skip the standard EBML header when using tools.xml2ebml
2 parents 10568b8 + 0c31e00 commit ad13447

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ebmlite/tools/xml2ebml.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ def main():
2626
'-c', '--clobber', action="store_true",
2727
help="Clobber (overwrite) existing files.",
2828
)
29+
argparser.add_argument(
30+
'-n', '--no_header', action="store_true",
31+
help="Do not write the standard EBML header segment.",
32+
)
2933
args = argparser.parse_args()
3034

35+
header = not args.no_header # Removing some naming confusion, if no_header=false, header argument should be true
3136
with utils.load_files(args, binary_output=True) as (schema, out):
32-
ebmlite.util.xml2ebml(args.input, out, schema) # , sizeLength=4, headers=True, unknown=True)
37+
ebmlite.util.xml2ebml(args.input, out, schema, headers=header) # , sizeLength=4, headers=True, unknown=True)
3338

3439

3540
if __name__ == "__main__":

0 commit comments

Comments
 (0)