]> git.phdru.name Git - dotfiles.git/commitdiff
.mc: view docx with docx2txt, edit with libreoffice
authorOleg Broytman <phd@phdru.name>
Wed, 12 Nov 2014 12:57:27 +0000 (15:57 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 12 Nov 2014 12:57:27 +0000 (15:57 +0300)
.mc/mc.ext
.mc/menu

index e2d36e39bc394fe0fd972593b5ee86b1d2cf8692..2f9d08bbc7d6360c57e22f24d267459f36239d39 100644 (file)
@@ -713,6 +713,11 @@ regex/\.([rR][tT][fF])$
 regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
    Include=msoffice
 
+regex/\.([Dd][oO][cC][Xx])$
+   Edit=libreoffice %f &
+   Open=libreoffice %f &
+   View=%view{ascii} docx2txt %f - | iconv -f utf-8
+
 type/^Microsoft\ Word
    Include=msoffice
 
index 730357a2aa3ec095ebc9a881749d902607e468d6..7a303a7379f0785462c429d97b0c5387df39ffaf 100644 (file)
--- a/.mc/menu
+++ b/.mc/menu
@@ -79,7 +79,11 @@ e  Edit doc with libreoffice
 
 += t r & f \.(docx|DOCX)$
 d  View docx with docx2txt
-   docx2txt %f - | ${PAGER:-more}
+   docx2txt %f - | iconv -f utf-8 | ${PAGER:-more}
+
++ t r & f \.(docx|DOCX)$
+e  Edit docx with libreoffice
+   libreoffice %f &
 
 += t r & f \.(xls|XLS)$
 x  View xls with xls2csv