]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Fixed title and alternate link for init.py and pdbrc.py.
authorOleg Broytman <phd@phdru.name>
Thu, 10 Dec 2009 15:51:25 +0000 (15:51 +0000)
committerOleg Broytman <phd@phdru.name>
Thu, 10 Dec 2009 15:51:25 +0000 (15:51 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@96 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

dotfiles2html/dotfiles2html.py

index bcc919c15ca11eee793fddbc64d0fed27d8371d5..5d0d04d2540a9ca077a5c7424adb352d7dd13461 100755 (executable)
@@ -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")