fix #1182 add imageThumbnailGenerator/psThumbnailGenerator
This commit is contained in:
parent
12b4515d6b
commit
42915c68b9
3 changed files with 183 additions and 1 deletions
|
@ -30,6 +30,14 @@ elif [ x"$CMD_TYPE" = "xpdf" ] ; then
|
|||
check_command convert
|
||||
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
|
||||
convert -thumbnail $IMAGE_SIZE ${TARGET_FILE}[0] $OUTPUT_FILE
|
||||
elif [ x"$CMD_TYPE" = "xps" ] ; then
|
||||
check_command convert
|
||||
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
|
||||
convert -thumbnail $IMAGE_SIZE ${TARGET_FILE}[0] $OUTPUT_FILE
|
||||
elif [ x"$CMD_TYPE" = "ximage" ] ; then
|
||||
check_command convert
|
||||
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
|
||||
convert -thumbnail $IMAGE_SIZE ${TARGET_FILE}[0] $OUTPUT_FILE
|
||||
else
|
||||
echo "Unsupported type: $CMD_TYPE"
|
||||
exit 1
|
||||
|
|
|
@ -12,6 +12,12 @@
|
|||
<postConstruct name="add">
|
||||
<arg>pdfThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="add">
|
||||
<arg>psThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="add">
|
||||
<arg>imageThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.HtmlTagBasedGenerator">
|
||||
<property name="name">"htmlThumbnailGenerator"</property>
|
||||
|
@ -98,4 +104,85 @@
|
|||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
</components>
|
||||
<component name="psThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="name">"psThumbnailGenerator"</property>
|
||||
<property name="commandList">
|
||||
["${path}/generate-thumbnail",
|
||||
"ps",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
</property>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/postscript"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
<component name="imageThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="name">"imageThumbnailGenerator"</property>
|
||||
<property name="commandList">
|
||||
["${path}/generate-thumbnail",
|
||||
"image",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
</property>
|
||||
<property name="generatorList">
|
||||
["${path}/generate-thumbnail"]
|
||||
</property>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/jpeg"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/tiff"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/x-windows-bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/x-ms-bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/gif"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/png"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/vnd.adobe.photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/x-photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
</components>
|
|
@ -12,6 +12,12 @@
|
|||
<postConstruct name="add">
|
||||
<arg>pdfThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="add">
|
||||
<arg>psThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="add">
|
||||
<arg>imageThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.HtmlTagBasedGenerator">
|
||||
<property name="name">"htmlThumbnailGenerator"</property>
|
||||
|
@ -86,4 +92,85 @@
|
|||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
<component name="psThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="name">"psThumbnailGenerator"</property>
|
||||
<property name="commandList">
|
||||
["${path}/generate-thumbnail",
|
||||
"ps",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
</property>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/postscript"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
<component name="imageThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="name">"imageThumbnailGenerator"</property>
|
||||
<property name="commandList">
|
||||
["${path}/generate-thumbnail",
|
||||
"image",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
</property>
|
||||
<property name="generatorList">
|
||||
["${path}/generate-thumbnail"]
|
||||
</property>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/jpeg"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/tiff"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/x-windows-bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/x-ms-bmp"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/gif"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/png"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/vnd.adobe.photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"image/photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/x-photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
<postConstruct name="addCondition">
|
||||
<arg>"mimetype"</arg>
|
||||
<arg>"application/photoshop"
|
||||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
</components>
|
||||
|
|
Loading…
Add table
Reference in a new issue