Commit ad218e27 authored by Neeme Kahusk's avatar Neeme Kahusk

create_tablehead for prepare

parent d14fd860
......@@ -26,12 +26,12 @@ def make_simplepath(path: str):
return out
def read_xml(filename: str):
def create_tablehead(filename: str, outfilename: str):
raw_tabdata = {}
label_tabel = {'label': None}
labelid = []
ats = ['label', 'example', 'simplepath', 'path']
outfilename = 'labelitabel.csv'
#outfilename = 'labelitabel.csv'
parser = etree.XMLParser(remove_blank_text=True)
root = etree.parse(filename, parser)
......@@ -75,6 +75,7 @@ def main():
print('Tere maailm!')
parser = argparse.ArgumentParser(description='Avab zip faili')
parser.add_argument('infile')
parser.add_argument('outfile')
parser.add_argument("-z", "--zip", action="store_true")
args = parser.parse_args()
......@@ -83,7 +84,7 @@ def main():
with ZipFile(args.infile, 'r') as myzip:
print(myzip.namelist())
else:
a = read_xml(args.infile)
a = create_tablehead(args.infile, args.outfile)
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