From dbb801c5d825faacfc3aeed2e03d8e8679d1cf9a Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 10 Dec 2009 15:51:25 +0000 Subject: [PATCH] Fixed title and alternate link for init.py and pdbrc.py. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@96 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- dotfiles2html/dotfiles2html.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index bcc919c..5d0d04d 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -25,16 +25,23 @@ def add_headers(fname, prev, next): 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") -- 2.39.5