mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 05:01:43 +00:00
add converters for fulltext search
This commit is contained in:
parent
4a7d572f95
commit
27162a7926
|
@ -1,5 +1,33 @@
|
||||||
Conversion to pdf
|
Conversion to text for fulltext search
|
||||||
=================
|
=======================================
|
||||||
|
|
||||||
|
text/plain
|
||||||
|
text/csv
|
||||||
|
cat '%s'
|
||||||
|
|
||||||
|
application/pdf
|
||||||
|
pdftotext -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||||
|
docx2txt '%s' -
|
||||||
|
|
||||||
|
application/msword
|
||||||
|
catdoc %s
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||||
|
xlsx2csv %s
|
||||||
|
|
||||||
|
application/vnd.ms-excel
|
||||||
|
xls2csv %s
|
||||||
|
|
||||||
|
text/html
|
||||||
|
html2text %s
|
||||||
|
|
||||||
|
Many office formats
|
||||||
|
unoconv -d document -f txt --stdout '%s'
|
||||||
|
|
||||||
|
Conversion to pdf for pdf preview
|
||||||
|
==================================
|
||||||
|
|
||||||
text/plain
|
text/plain
|
||||||
text/csv
|
text/csv
|
||||||
|
@ -22,8 +50,16 @@ application/vnd.ms-excel
|
||||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||||
unoconv -d spreadsheet -f pdf --stdout -v '%f' > '%o'
|
unoconv -d spreadsheet -f pdf --stdout -v '%f' > '%o'
|
||||||
|
|
||||||
Preview
|
Conversion to png for preview images
|
||||||
========
|
=====================================
|
||||||
|
|
||||||
|
If you have problems running convert on PDF documents then read this page
|
||||||
|
https://askubuntu.com/questions/1081895/trouble-with-batch-conversion-of-png-to-pdf-using-convert
|
||||||
|
It basically instructs you to comment out the line
|
||||||
|
|
||||||
|
<policy domain="coder" rights="none" pattern="PDF" />
|
||||||
|
|
||||||
|
in /etc/ImageMagick-6/policy.xml
|
||||||
|
|
||||||
image/jpg
|
image/jpg
|
||||||
image/jpeg
|
image/jpeg
|
||||||
|
@ -46,5 +82,5 @@ application/rtf
|
||||||
application/vnd.ms-powerpoint
|
application/vnd.ms-powerpoint
|
||||||
text/csv
|
text/csv
|
||||||
application/vnd.wordperfect
|
application/vnd.wordperfect
|
||||||
/usr/bin/unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- '%o'
|
unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- '%o'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user