From: Oleg Broytman Date: Fri, 5 Jun 2020 13:52:58 +0000 (+0300) Subject: Feat(.mc): Add commands to view/edit XLSX files X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=8f43d8b72650643db198c9076c354e7614de89db;p=dotfiles.git Feat(.mc): Add commands to view/edit XLSX files --- diff --git a/.mc/mc.ext b/.mc/mc.ext index 2efbc07..8ccf478 100644 --- a/.mc/mc.ext +++ b/.mc/mc.ext @@ -550,7 +550,7 @@ shell/.abw regex/\.([xX][lL][sSwW])$ Open=(gnumeric %f >/dev/null 2>&1 &) View=%view{ascii} xls2csv %f || strings %f -type/^Microsoft\ Excel +type/^Microsoft\ Excel$ Open=(gnumeric %f >/dev/null 2>&1 &) View=%view{ascii} xls2csv %f || strings %f @@ -728,6 +728,12 @@ type/^Microsoft\ Word type/^Microsoft\ Office\ Document Include=msoffice-doc +regex/\.([xX][lL][sS][xX])$ + Include=msoffice-xlsx + +type/^Microsoft\ Excel 2007+ + Include=msoffice-xlsx + type/^Composite\ Document\ File Include=msoffice-doc @@ -782,6 +788,11 @@ include/msoffice-doc Open=libreoffice %f & View=%view{ascii} catdoc %f +include/msoffice-xlsx + Edit=libreoffice %f & + Open=libreoffice %f & + View=%view{ascii} xlsx2csv %f | iconv -f utf-8 + include/video Open=mplayer %f & View=%view{ascii} %f diff --git a/.mc/menu b/.mc/menu index d337562..6179a67 100644 --- a/.mc/menu +++ b/.mc/menu @@ -90,6 +90,9 @@ o View OpenDoc with odt2txt d View docx with docx2txt docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more} ++= t lr & f \.(xls|XLS|xlsx|XLSX)$ +o View OpenXlsx with xlsx2csv + xlsx2csv %f | iconv -f utf-8 | ${PAGER:-more} += t lr & f \.(xls|XLS)$ x View xls with xls2csv