#589 modify thumnail settings
This commit is contained in:
parent
efd2cc48a3
commit
c4a0cdb340
4 changed files with 16 additions and 15 deletions
4
pom.xml
4
pom.xml
|
@ -304,6 +304,7 @@
|
|||
<includes>
|
||||
<include>bin/fess</include>
|
||||
<include>bin/fess.in.sh</include>
|
||||
<include>bin/generate-thumbnail</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
@ -348,6 +349,7 @@
|
|||
<includes>
|
||||
<include>bin/fess</include>
|
||||
<include>bin/fess.in.sh</include>
|
||||
<include>bin/generate-thumbnail</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
@ -490,6 +492,7 @@
|
|||
<paths>
|
||||
<path>${project.basedir}/src/main/assemblies/files/fess</path>
|
||||
<path>${project.basedir}/src/main/assemblies/files/fess.in.sh</path>
|
||||
<path>${project.basedir}/src/main/assemblies/files/generate-thumbnail</path>
|
||||
</paths>
|
||||
<dst>${packaging.fess.bin.dir}</dst>
|
||||
<mapper>
|
||||
|
@ -736,6 +739,7 @@
|
|||
<includes>
|
||||
<include>fess</include>
|
||||
<include>fess.in.sh</include>
|
||||
<include>generate-thumbnail</include>
|
||||
</includes>
|
||||
</source>
|
||||
</sources>
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
CMD_TYPE=$1
|
||||
URL=$2
|
||||
OUTPUT_FILE=$3
|
||||
|
||||
if [ x"$CMD_TYPE" = "xmsoffice" ] ; then
|
||||
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
|
||||
TMP_FILE=/tmp/thumbnail.$$.pdf
|
||||
unoconv -o $TMP_FILE -f pdf $TARGET_FILE
|
||||
convert -thumbnail 200x150! $TMP_FILE $OUTPUT_FILE
|
||||
rm $TMP_FILE
|
||||
else
|
||||
echo "Unsupported type: $CMD_TYPE"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Unsupported type: $CMD_TYPE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
<postConstruct name="add">
|
||||
<arg>htmlThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
<!--
|
||||
<postConstruct name="add">
|
||||
<arg>msofficeThumbnailGenerator</arg>
|
||||
</postConstruct>
|
||||
-->
|
||||
</component>
|
||||
<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.WebDriverGenerator">
|
||||
<property name="webDriverCapabilities">
|
||||
|
@ -29,8 +27,7 @@
|
|||
<!--
|
||||
<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="commandList">
|
||||
["bash",
|
||||
"/usr/share/fess/bin/generate-thumbnail",
|
||||
["/usr/share/fess/bin/generate-thumbnail",
|
||||
"html",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
|
@ -44,11 +41,9 @@
|
|||
</postConstruct>
|
||||
</component>
|
||||
-->
|
||||
<!--
|
||||
<component name="msofficeThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
|
||||
<property name="commandList">
|
||||
["bash",
|
||||
"/usr/share/fess/bin/generate-thumbnail",
|
||||
["/usr/share/fess/bin/generate-thumbnail",
|
||||
"msoffice",
|
||||
"${url}",
|
||||
"${outputFile}"]
|
||||
|
@ -96,5 +91,4 @@
|
|||
</arg>
|
||||
</postConstruct>
|
||||
</component>
|
||||
-->
|
||||
</components>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<c:forEach var="doc" varStatus="s" items="${documentItems}">
|
||||
<li id="result${s.index}">
|
||||
<c:if test="${thumbnailSupport}">
|
||||
<div class="col-md-3 thumbnailBox">
|
||||
<div class="thumbnailBox">
|
||||
<a class="link" href="${doc.url_link}" data-uri="${doc.url_link}"
|
||||
data-id="${doc.doc_id}" data-order="${s.index}">
|
||||
<img
|
||||
|
@ -37,11 +37,11 @@
|
|||
</a>
|
||||
</div>
|
||||
</c:if>
|
||||
<h3 class="col-md-9 title ellipsis">
|
||||
<h3 class="title ellipsis">
|
||||
<a class="link" href="${doc.url_link}" data-uri="${doc.url_link}"
|
||||
data-id="${doc.doc_id}" data-order="${s.index}">${f:h(doc.content_title)}</a>
|
||||
</h3>
|
||||
<div class="col-md-9 body">
|
||||
<div class="body">
|
||||
<div class="description">${doc.content_description}</div>
|
||||
<div class="site ellipsis">
|
||||
<cite>${f:h(doc.site_path)}</cite>
|
||||
|
|
Loading…
Add table
Reference in a new issue