-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Awesome tool! Just ran into a minor issue with the argument parsing clashing with jinja2 templates, it may be worthwhile to use some existing library to handle all the edgecase for this or the ability to pass templates as files.
Anything using = and , breaks immediately due to the logic in parse_and_set, quoting is also rather cumbersome.
For now I added a limit of 1 to the split here https://github.com/cdaller/multi_anonymizer/blob/main/multi_anonymizer.py#L127
and am avoiding commas by writing
'./file.csv:(type=city,column=15,template={% if __original_value__ == "_____" or __original_value__ == "Dummy" or __original_value__ == "_" %}{{ __original_value__ }}{% else %}{{ __value__ }}{% endif %})'
instead of
'./file.csv:(type=city,column=15,template={% if __original_value__ in ["_____", "Dummy", "_"] %}{{ __original_value__ }}{% else %}{{ __value__ }}{% endif %})'