From a0b8826aacbaa4f5cf98e9c38d816daac2affdf8 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 21 Sep 2008 14:41:43 +0000 Subject: [PATCH 1/1] Show esc char as text. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@77 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- dotfiles2html/dotfiles2html.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index 7185b28..ff1d989 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -4,7 +4,7 @@ __version__ = "$Revision$"[11:-2] __revision__ = "$Id$"[5:-2] __date__ = "$Date$"[7:-2] __author__ = "Oleg BroytMann " -__copyright__ = "Copyright (C) 2004-2006 PhiloSoft Design" +__copyright__ = "Copyright (C) 2004-2008 PhiloSoft Design" import os, shutil, filecmp @@ -58,6 +58,13 @@ ft_len = len(file_types) for i, (fname, ftype) in enumerate(file_types): if os.path.exists('.' + fname) and not os.path.exists(fname): shutil.copy2('.' + fname, fname) + if fname == 'vimrc': + file = open('vimrc', 'r') + text = file.read() + file.close() + file = open('vimrc', 'w') + file.write(text.replace('', '')) + file.close() if os.path.exists(fname): os.system("""exec gvim -f -c "set filetype=%s" -c ":source %s/dotfile2html.vim" "%s" """ % (ftype, home_dir, fname)) @@ -74,4 +81,6 @@ for i, (fname, ftype) in enumerate(file_types): os.remove(fname + ".html") else: os.rename(fname + ".html", fname + ".tmpl") + if fname == 'vimrc' and os.path.exists('.' + fname): + shutil.copy2('.' + fname, fname) os.chmod(fname, 0644) -- 2.39.2