File indexing completed on 2024-05-12 15:49:58
0001 #!/usr/bin/env python 0002 0003 from __future__ import print_function 0004 0005 tokens = [] 0006 with open("makensiscmdhelp.output") as f: # output from `makensis /cmdhelp` 0007 for line in f: 0008 if line.startswith(" "): 0009 continue # line continuation 0010 0011 tokens.append(line.split()[0]) 0012 0013 keywords = [x[1:] for x in tokens if x.startswith("!")] 0014 basefuncs = [x for x in tokens if not x.startswith("!")] 0015 0016 print("KEYWORDS") 0017 for keyword in keywords: 0018 print("<item> %s </item>" % keyword) 0019 print() 0020 0021 print("BASEFUNCS") 0022 for basefunc in basefuncs: 0023 print("<item> %s </item>" % basefunc)