From: Oleg Broytman Date: Fri, 5 Jun 2020 17:26:05 +0000 (+0300) Subject: .mc: Use `pdftotext`, iconv.py` and run a pager to view PDFs X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d233a7efd2c541be29f92d94a1c6f2b467bf2bc4;p=dotfiles.git .mc: Use `pdftotext`, iconv.py` and run a pager to view PDFs --- diff --git a/.mc/mc.ext b/.mc/mc.ext index 9ee0d2d..f0b5945 100644 --- a/.mc/mc.ext +++ b/.mc/mc.ext @@ -510,7 +510,7 @@ type/^PDF Open=(see %f &) #Open=(acroread %f &) #Open=(ghostview %f &) - View=%view{ascii} pdftotext %f - + View=%view{ascii} pdftotext %f - | iconv.py -f utf-8 # The following code very ugly and should not be taken as example. # It should be cleaned up when the new format of mc.ext is developed. diff --git a/.mc/menu b/.mc/menu index c484d3c..12cccae 100644 --- a/.mc/menu +++ b/.mc/menu @@ -61,8 +61,12 @@ T fb2txt esac $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t ++ t lr & f \.(pdf|PDF)$ +v View pdf + pdftotext %f - | iconv.py -f utf-8 | ${PAGER:-more} + += t lr & f \.(pdf|PDF)$ -e View pdf +e View pdf with evince evince %f & += t lr & f \.djvu(\.bz2|\.gz)?$