mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
4d1d328de9
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@5 7f574dfc-610e-0410-a909-a81674777703
31 lines
559 B
Python
31 lines
559 B
Python
#!/usr/bin/env python
|
|
|
|
import sys
|
|
|
|
if len(sys.argv) <= 1:
|
|
print >> sys.stderr, "Usage: ./changelog2html.py [changelog file]"
|
|
sys.exit(1)
|
|
|
|
f = sys.argv[1]
|
|
|
|
blah = 0
|
|
|
|
for i in open(f).read().splitlines():
|
|
# ignore empty lines
|
|
|
|
if i and i[0].isspace():
|
|
if not '*' in i:
|
|
print ' ' + i.strip()
|
|
else:
|
|
s = i.split('*', 1)[1].strip()
|
|
print ' <LI>' + s.replace('<', '<').replace('>', '>')
|
|
else:
|
|
if blah:
|
|
print '</UL>'
|
|
print '<H3>%s</H3>' % i.strip()
|
|
print '<UL>'
|
|
blah = 1
|
|
|
|
if blah:
|
|
print '</UL>'
|