Mailcap for .docx files (using docx2txt or similar)

2021-01-22 Thread Chris Green
I just saw a note from someone on a Linux list asking about simple
programs to convert .docx files to text.  It turns out that there are
several docx2txt programs out there.

So, it would be handy to have mutt configured to use one to view .docx
files.  I'm sure somebody must have done this already so what does the
~/.mailcap entry have to look like?

-- 
Chris Green


Re: Mailcap for .docx files (using docx2txt or similar)

2021-01-22 Thread Chinmaya Nagpal
On Fri, Jan 22, 2021 at 12:35:46PM +, Chris Green wrote:
> So, it would be handy to have mutt configured to use one to view .docx
> files.  I'm sure somebody must have done this already so what does the
> ~/.mailcap entry have to look like?

This works for pandoc:  
application/vnd.openxmlformats-officedocument.wordprocessingml.document; pandoc 
--from docx --to markdown %s; copiousoutput

Source:  
https://raymii.org/s/articles/Viewing_PDF_docx_and_odt_files_in_Mutt.html


Re: Mailcap for .docx files (using docx2txt or similar)

2021-01-22 Thread meine
> So, it would be handy to have mutt configured to use one to view .docx
> files.  I'm sure somebody must have done this already so what does the
> ~/.mailcap entry have to look like?

in my .mutt/mailcap (FreeBSD)

application/ms-word; catdoc %s

//meine


Re: Mailcap for .docx files (using docx2txt or similar)

2021-01-22 Thread meine
> This works for pandoc:
> application/vnd.openxmlformats-officedocument.wordprocessingml.document; 
> pandoc --from docx --to markdown %s; copiousoutput
>
> Source:
> https://raymii.org/s/articles/Viewing_PDF_docx_and_odt_files_in_Mutt.html

Thanks for this! not only makes this work in mutt, but could also be
used fore a rule how to handle those filetypes in a file manager,
without the need for the application itself.

//meine


Re: Mailcap for .docx files (using docx2txt or similar)

2021-01-22 Thread Chris Green
On Fri, Jan 22, 2021 at 06:24:22PM +0530, Chinmaya Nagpal wrote:
> On Fri, Jan 22, 2021 at 12:35:46PM +, Chris Green wrote:
> > So, it would be handy to have mutt configured to use one to view .docx
> > files.  I'm sure somebody must have done this already so what does the
> > ~/.mailcap entry have to look like?
> 
> This works for pandoc:  
> application/vnd.openxmlformats-officedocument.wordprocessingml.document; 
> pandoc --from docx --to markdown %s; copiousoutput 
> 
Wonderful!  I'd never come across pandoc before, it seems to be able
to do almost anything!  ... and it's maintained/up to date.

Thank you.

> Source:  
> https://raymii.org/s/articles/Viewing_PDF_docx_and_odt_files_in_Mutt.html

-- 
Chris Green