From: Oleg Broytman Date: Tue, 11 Jul 2023 17:12:51 +0000 (+0300) Subject: Feat(dotfiles2html.py): Process `mc.ext.ini` X-Git-Url: https://git.phdru.name/?p=phdru.name%2Fphdru.name.git;a=commitdiff_plain;h=ee424085d4a516ac2e599e66f023f05dd3a7b7b9 Feat(dotfiles2html.py): Process `mc.ext.ini` --- diff --git a/dotfiles2html/dotfiles2html.py b/dotfiles2html/dotfiles2html.py index a5065cd..af0076e 100755 --- a/dotfiles2html/dotfiles2html.py +++ b/dotfiles2html/dotfiles2html.py @@ -21,7 +21,7 @@ home_file_types = ( ("gitconfig", "gitconfig"), ("vimrc", "vim"), ) -mc_file_types = (("mc.ext", "conf"), ("menu", "conf")) +mc_file_types = (("mc.ext", "conf"), ("mc.ext.i", "conf"), ("menu", "conf")) python_file_types = ( ("init.py", "python"), @@ -83,7 +83,7 @@ def process_dotfile(i, fname, ftype, file_types): text = re.sub('cgmem_nice \\d+ ', '', text) - if fname in ('mailcap', 'mc.ext', 'menu'): + if fname in ('mailcap', 'mc.ext', 'mc.ext.ini', 'menu'): text = text.replace('mplay', 'mplayer') text = text.replace('mplayerer', 'mplayer') if fname == 'mailcap': @@ -136,6 +136,11 @@ def process_files(file_types): if not os.path.exists(fname): continue + if fname == 'mc.ext.i' and not os.path.exists('mc.ext.ini'): + os.rename('mc.ext.i', 'mc.ext.ini') + if fname == 'mc.ext.i': + fname = 'mc.ext.ini' + process_dotfile(i, fname, ftype, file_types) diff --git a/dotfiles2html/mc.ext.head b/dotfiles2html/mc.ext.head index 17e526a..a52ba0f 100644 --- a/dotfiles2html/mc.ext.head +++ b/dotfiles2html/mc.ext.head @@ -1,5 +1,5 @@
-# My *additions* to Midnight Commander 3.0 extension file
+# My *additions* to Midnight Commander 3 extension file
 #
 # Text version here
 #
diff --git a/dotfiles2html/mc.ext.ini.head b/dotfiles2html/mc.ext.ini.head
new file mode 100644
index 0000000..685c5cb
--- /dev/null
+++ b/dotfiles2html/mc.ext.ini.head
@@ -0,0 +1,8 @@
+
+# My *additions* to Midnight Commander 4 extension file
+#
+# Text version here
+#
+# Generated by gvim :runtime syntax/2html.vim
+#
+