From: Oleg Broytman Date: Tue, 8 Feb 2011 13:00:56 +0000 (+0000) Subject: Process .mailcap - replace 'mplay' with 'mplayer'. X-Git-Url: https://git.phdru.name/?p=phdru.name%2Fphdru.name.git;a=commitdiff_plain;h=48d4fe233225db8857cd7afcb76819317856daa4 Process .mailcap - replace 'mplay' with 'mplayer'. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@121 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index e7c3a41..5359b43 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -78,11 +78,11 @@ def process_dotfile(i, fname, ftype, file_types): file.write(text.replace('', '')) 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)