]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - dotfiles2html/dotfiles2html.py
Process .mailcap - replace 'mplay' with 'mplayer'.
[phdru.name/phdru.name.git] / 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)