Skip to content

Commit

Permalink
[DEL] rebase fluke
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed May 9, 2017
1 parent c5d3148 commit 3d24cf8
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions invoice2data/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,3 @@ def extract_lines(self, content, output):

if lines:
output['lines'] = lines


def dict_to_yml(dict_in, identifier):
"Convert old templates to new yml format."

dict_in['fields'] = {t[0]: t[1] for t in dict_in['data']}
dict_in.pop('data')
yaml_str = yaml.dump(dict_in, default_flow_style=False, allow_unicode=True)
with open('templates/{}.yml'.format(identifier), 'w') as f:
f.write(yaml_str)

if __name__ == '__main__':
for t in templates:
dict_to_yml(t, t['keywords'][0].lower().replace(' ', ''))

0 comments on commit 3d24cf8

Please sign in to comment.