__version__ = "$Revision$"[11:-2]
__revision__ = "$Id$"[5:-2]
__date__ = "$Date$"[7:-2]
-__author__ = "Oleg BroytMann <phd@phd.pp.ru>"
-__copyright__ = "Copyright (C) 2004-2008 PhiloSoft Design"
+__author__ = "Oleg Broytman <phd@phd.pp.ru>"
+__copyright__ = "Copyright (C) 2004-2009 PhiloSoft Design"
import os, shutil, filecmp
html = html_file.read()
html_file.close()
+ if fname in ("init.py", "pdbrc.py"):
+ dot_name = fname
+ txt_name = fname + '.txt'
+ else:
+ dot_name = '.' + fname
+ txt_name = fname
+
html_file = open(html_fname, 'w')
html_file.write("#extends phd_pp_ru\n")
html_file.write("#implements respond\n")
- html_file.write("#attr $Title = \".%s\"\n" % fname)
+ html_file.write("#attr $Title = \"%s\"\n" % dot_name)
html_file.write("#attr $Copyright = 2003\n")
if prev:
html_file.write("#attr $Prev = \"%s.html\"\n" % prev)
if next:
html_file.write("#attr $Next = \"%s.html\"\n" % next)
- html_file.write('#attr $alternates = (("text/plain", "Plain text version", "%s"),)' % fname)
+ html_file.write('#attr $alternates = (("text/plain", "Plain text version", "%s"),)' % txt_name)
html_file.write("\n")
html_file.write("#def body_html\n")
html_file.write("#raw\n")
("mailcap", "conf"), ("mime.types", "conf"),
("muttrc", "muttrc"), ("procmailrc", "procmail"),
("vimrc", "vim"), ("gvimrc", "vim"),
- ("init.py", "python"), ("init_old.py", "python"),
- ("pdbrc", "python"), ("pdbrc.py", "python"))
+ ("init.py", "python"), ("pdbrc", "python"), ("pdbrc.py", "python"))
ft_len = len(file_types)
for i, (fname, ftype) in enumerate(file_types):
os.rename(fname + ".html", fname + ".tmpl")
if fname == 'vimrc' and os.path.exists('.' + fname):
shutil.copy2('.' + fname, fname)
- os.chmod(fname, 0644)
+ if fname.endswith('.py'):
+ new_name = fname + '.txt'
+ os.rename(fname, new_name)
+ fname = new_name
+ if os.path.exists(fname):
+ os.chmod(fname, 0644)