def gen_technique(name,tab_name,tab_nb,first_technique):
if first_technique:
intro="""
""".format(name)
else:
intro=""
pass
if __name__ == '__main__':
# filen=sys.argv[1]
filen="cyberpnk.txt"
def parse(filen):
tab,subtab="",""
tab_nb,subtab_nb=0,0
first_technique=True
try:
with open(filen) as f:
for line in f.readlines():
if line[0]=="#": # section
first_technique=True
subtab_content=gen_tab(line[1:],tab_nb)
tab=printable(line[1:])
print(tab,subtab_content)
tab_nb+=1
elif line[0]=="@":
# first_technique=True
subtab_content=gen_subtab(line[1:],tab,tab_nb,subtab_nb)
subtab=printable(line[1:])
print(subtab,subtab_content)
elif line[0]==":":
tech_content=gen_technique(line[1:],tab,tab_nb,first_technique)
# tech=printable()
except FileNotFoundError:
print(filen,"was not found")
parse(filen)