Open uriyay opened 7 years ago
Oh someone already did that :) http://d0cs4vage.blogspot.co.il/2015/08/pfp-python-interpreter-for-010-templates.html Installation: pip install pfp
Usage: import pfp with open(''png_template.bt') as f: template = f.read()
png = pfp.parse( data_file="~/Documents/image.png", template_file='png_template.bt', )
desc = png._pfp__show() print desc
with open("/tmp/test.png", "wb") as f: png._pfp__build(f)
010 Editor has already many templates for parsing data. Also, its template programming language is very similar to c language, so it can be used in c/c++ without much effort.