Linux.Desktop.Hacks [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux.Desktop.Hacks [Electronic resources] - نسخه متنی

Jono Bacon, Nicholas Petreley

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Hack 54. View Word and PDF Files from Within Mutt

Mutt is an extremely powerful
terminal-based
email client that supports IMAP, POP, and much more. No graphical
email client can come close to the configurability of Mutt.
That's why a lot of hard-core Linux users still use
Mutt in spite of the myriad GUI-based email clients.

It is certainly possible to launch a GUI application such as
OpenOffice.org or Acrobat Reader to view Word and PDF email
attachments in Mutt. But Mutt users aren't always
using a graphical desktop, so it's handy to be able
to view these documents as text, right inside the message itself.

Here's how to do it. First, you need to edit the
Mutt configuration file. The default configuration file is usually
/etc/Muttrc, but you'll most
likely want to create your own even if you do it by copying the
default and modifying it. Mutt lets you define your user
configuration file as either ~/.muttrc or
~/.mutt/muttrc. Modify your personal Mutt
configuration file to point to a custom mailcap
file. For example:

set mailcap_path="~/mailcap.mutt"

Then edit the ~/mailcap.mutt file to include
these two lines:

application/pdf; pdftohtml -q -stdout %s | w3m -T text/html; copiousoutput
application/msword; wvWare -x /usr/lib/wv/wvHtml.xml %s 2>/dev/null | w3m -T text/html;
copiousoutput

Now all attached PDF and Microsoft Word documents will appear within
the text of the email. Granted, the formatting isn't
as pretty as when you view Word or PDF documents [Hack#52] and [Hack#53], because all the output is
piped into Mutt's own display, and not in a
specialized pager, such as elinks or
w3m. But you can still read the content of the
attached file. And if it interests you enough to read it in a better
format, you can save the file and read it with whatever program you
wantincluding one of the scripts in the previously mentioned
hacks.


/ 140