r16479 - meta/scripts - output into files of the form <year/mon/year-mon-day.html>.
Josh Sled
jsled at cvs.gnucash.org
Wed Aug 29 18:17:01 EDT 2007
Author: jsled
Date: 2007-08-29 18:16:59 -0400 (Wed, 29 Aug 2007)
New Revision: 16479
Trac: http://svn.gnucash.org/trac/changeset/16479
Modified:
meta/scripts/irc_log_htmlizer.py
Log:
output into files of the form <year/mon/year-mon-day.html>.
Modified: meta/scripts/irc_log_htmlizer.py
===================================================================
--- meta/scripts/irc_log_htmlizer.py 2007-08-28 23:51:50 UTC (rev 16478)
+++ meta/scripts/irc_log_htmlizer.py 2007-08-29 22:16:59 UTC (rev 16479)
@@ -124,7 +124,11 @@
''')
def __init__(self, date):
- filename = os.path.join(cfg['output.dir'], '%s.html' % (date))
+ year,mon,day = date.split('-')
+ filedir = os.path.join(cfg['output.dir'], year, mon)
+ filename = os.path.join(cfg['output.dir'], year, mon, '%s.html' % (date))
+ if not os.path.exists(filedir):
+ os.makedirs(filedir)
if not os.path.exists(filename):
# create
self._f = open(filename, 'w')
More information about the gnucash-changes
mailing list