From 9eb37f66798e04caf48dfcf7bead128c207cf4af Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 12 Nov 2014 15:57:27 +0300 Subject: [PATCH 1/1] .mc: view docx with docx2txt, edit with libreoffice --- .mc/mc.ext | 5 +++++ .mc/menu | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 -- 2.39.2