]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Process .mailcap - replace 'mplay' with 'mplayer'.
authorOleg Broytman <phd@phdru.name>
Tue, 8 Feb 2011 13:00:56 +0000 (13:00 +0000)
committerOleg Broytman <phd@phdru.name>
Tue, 8 Feb 2011 13:00:56 +0000 (13:00 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@121 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

dotfiles2html/dotfiles2html.py

index e7c3a41bb57d38fe876de100fd1d7e9b8344c64f..5359b4352b7e66cc83dd50dfd8d752b4f1a4efa6 100755 (executable)
@@ -78,11 +78,11 @@ def process_dotfile(i, fname, ftype, file_types):
       file.write(text.replace('\e', '<Esc>'))
       file.close()
 
-   elif fname == 'menu' and os.path.exists(fname):
-      file = open('menu', 'r')
+   elif fname in('mailcap', 'menu') and os.path.exists(fname):
+      file = open(fname, 'r')
       text = file.read()
       file.close()
-      file = open('menu', 'w')
+      file = open(fname, 'w')
       text = text.replace('mplay', 'mplayer')
       text = text.replace('mplayerer', 'mplayer')
       file.write(text)