Commit 9453afd8 authored by Neeme Kahusk's avatar Neeme Kahusk

suvaline infile liik

parent 1713ad5e
......@@ -78,18 +78,16 @@ def main():
if is_zipfile(args.infile):
tulem = zip2roots(args.infile)
tulemitabel = featured_rows(tulem, labels)
csv_out(args.outfile, tulemitabel, SIMPLE)
else:
p = Path(args.infile)
if p.is_dir():
filelist = [x for x in p.iterdir()]
for i in filelist:
print(read_xml(str(i)))
tulem = [read_xml(str(x)) for x in p.iterdir()]
else:
r = read_xml(args.infile)
print(args.xpath)
print(get_xpath(r, args.xpath))
tulem = [read_xml(args.infile)]
tulemitabel = featured_rows(tulem, labels)
csv_out(args.outfile, tulemitabel, SIMPLE)
if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment