]> git.phdru.name Git - dotfiles.git/commitdiff
.mc/menu: View (Open)Docs with `libreoffice --cat`
authorOleg Broytman <phd@phdru.name>
Fri, 29 Nov 2019 10:20:55 +0000 (13:20 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 29 Nov 2019 10:20:55 +0000 (13:20 +0300)
.mc/menu

index a63f044a7cb4c891b874a52ea67c2cccf7886a99..7acb98247c8fda0a5ae6488466c13e6b8ddaad0b 100644 (file)
--- a/.mc/menu
+++ b/.mc/menu
@@ -85,6 +85,11 @@ d  View doc with catdoc
 d  View docx with docx2txt
    docx2txt %f - | iconv.py -f utf-8 | ${PAGER:-more}
 
++ t r & f \.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg|doc|DOC|rtf|docx|DOCX|xls|XLS|xlsx|XLSX)$
+v  View (Open)Docs with libreoffice
+   #libreoffice --headless --convert-to "txt:Text (encoded):UTF8" %f
+   libreoffice --cat %f | ${PAGER:-more}
+
 += t r & f \.(xls|XLS)$
 x  View xls with xls2csv
    xls2csv %f | ${PAGER:-more}