-
Notifications
You must be signed in to change notification settings - Fork 28
/
INSTALL
85 lines (64 loc) · 4.35 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
This document is intended to help you getting started.
The most recent instructions can be found at https://github.com/benjaminpick/java-thumbnailer/wiki/Installation
---
Installation
============
There are two versions of JavaThumbnailer:
* If you want to include this as a library to your own project, or use it from command-line only, you should take the **Standalone Version**.
* For integration into the regain Desktop search, take the **Regain Plugin Version**.
## Standalone Version
1. Get the recent version of JavaThumbnailer at the [Download Page](https://github.com/benjaminpick/java-thumbnailer/releases) (or [build it from source](Building from Source).)
2. To run it via the commandline: `java -jar javathumbnailer-standalone.jar input.doc [output.png]`
3. To use it in your own project, include this `.jar` in your classpath. For an example of usage (and configuration), see the code in [Main.java](https://github.com/benjaminpick/java-thumbnailer/blob/master/src/de/uni_siegen/wineme/come_in/thumbnailer/Main.java).
## Regain Plugin Version
0. Get the recent version of [regain](http://regain.sourceforge.net/download.php).
1. Get the recent version of JavaThumbnailer at the [Download Page](https://github.com/benjaminpick/java-thumbnailer/releases) (or [build it from source](Building from Source).)
### Crawler Plugin
2. Save javathumbnailer-crawlerplugin-${version}.jar it into the `/plugins/`-Folder of regain.
3. Edit `CrawlerConfiguration.xml` to suit your needs. Here are the default values:
<!--
| Create Thumbnails of the indexed documents during the thumbnailing process.
| These Thumbnails can be used in the search results.
+-->
<crawlerPlugin enabled="true">
<class>de.uni_siegen.wineme.come_in.thumbnailer.plugin.ThumbnailerPlugin</class>
<config>
<section name="thumbnailing">
<!-- Folder where the created thumbnails should be stored.
If you change this folder and there already are thumbnails indexed, only new thumbnails will go there. -->
<param name="thumbnailFolder">thumbs/</param>
<!-- Desired Image dimensions of the thumbnail. -->
<param name="imageWidth">160</param>
<param name="imageHeight">120</param>
</section>
<section name="externalHelpers">
<!-- Where is OpenOffice installed? If not available, try to auto-detect folders -->
<!-- <param name="openOfficeHome">file://c:/Programme/OpenOffice.org 3</param> -->
<!-- Where is the profile to use? If not available, a temporary profile is created (at each crawling process start) -->
<!-- <param name="openOfficeProfile">plugins/ressources/ooo-template-dir</param> -->
</section>
</config>
</crawlerPlugin>
### Search
4. Extract `web/` to your web/-Folder (Server: deployed folder). It contains:
* `search_example.jsp` : Modified version of `regain/web/common/search.jsp` . If you didn't modify it, you can overwrite the regain version of `search.jsp`.
* `img/image_missing.png` : Example of an image that is shown instead of the thumbnail when thumbnail generation failed
* `taglib/regain-thumbnailer.tld` : Tag declarations. Used only by the server version.
* `taglib/thumbnailer.jar`: Tag implementations. Used by server & desktop version.
#### Desktop Search
*(If you don't use the desktop search, you can skip this section.)*
5. Add the thumbnailer-Tag in `DesktopConfiguration.xml`:
<!-- Register namespaces for Simple Server -->
<simple_register_namespace>
<!-- Default namespaces: search, config, status -->
<namespace name="search">net.sf.regain.search.sharedlib</namespace>
<namespace name="config">net.sf.regain.ui.desktop.config.sharedlib</namespace>
<namespace name="status">net.sf.regain.ui.desktop.status.sharedlib</namespace>
<!-- For thumbnailer Plugin -->
<namespace name="thumbnailer">de.uni_siegen.wineme.come_in.thumbnailer.plugin.sharedlib</namespace>
</simple_register_namespace>
#### Server Search
*(If you don't use the tomcat server search, you can skip this section.)*
6. Copy `web/taglib/thumbnailer.jar` into the deployed application folder `WEB-INF/lib`.
7. Make sure you added `<%@taglib uri="taglib/regain-thumbnailer.tld" prefix="thumbnailer" %>` at the top of your jsp where you use the tag `<thumbnailer:img/>`.
8. Restart Tomcat or the regain-application.