From: Oleg Broytman Date: Wed, 12 Nov 2014 12:57:27 +0000 (+0300) Subject: .mc: view docx with docx2txt, edit with libreoffice X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;ds=sidebyside;h=9eb37f66798e04caf48dfcf7bead128c207cf4af;p=dotfiles.git .mc: view docx with docx2txt, edit with libreoffice --- diff --git a/.mc/mc.ext b/.mc/mc.ext index e2d36e3..2f9d08b 100644 --- a/.mc/mc.ext +++ b/.mc/mc.ext @@ -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 diff --git a/.mc/menu b/.mc/menu index 730357a..7a303a7 100644 --- 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