-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f69cd0c
Showing
24 changed files
with
15,513 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.git | ||
src/* | ||
test/* | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
/bower_components/ | ||
/node_modules/ | ||
/doc/ | ||
/.idea/ | ||
/junitReport/test-report.xml | ||
/dist | ||
/coverage/ | ||
/test/build | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- "8" | ||
cache: | ||
directories: | ||
- "node_modules" | ||
install: | ||
- npm install | ||
script: | ||
- npm test | ||
before_deploy: | ||
- npm run build:polymer | ||
- echo "$HEROKU_API" | docker login -u "$HEROKU_USER" --password-stdin registry.heroku.com | ||
deploy: | ||
provider: script | ||
skip_cleanup: true | ||
script: bash travis-heroku-deploy.sh | ||
on: | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM nginx:alpine | ||
MAINTAINER eterna2 <[email protected]> | ||
|
||
ARG tika_version=1.17 | ||
ENV TIKA_VERSION=$tika_version | ||
ENV TIKA_SERVER_URL=https://www.apache.org/dist/tika/tika-server-$tika_version.jar | ||
|
||
# gdal package is at edge branch | ||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories | ||
|
||
RUN apk --update --no-cache add \ | ||
openjdk8-jre-base \ | ||
tesseract-ocr \ | ||
tesseract-ocr-data-enm \ | ||
gdal | ||
|
||
RUN apk --update add --virtual build-dependencies curl gnupg \ | ||
&& curl -sSL https://people.apache.org/keys/group/tika.asc -o /tmp/tika.asc \ | ||
&& gpg --import /tmp/tika.asc \ | ||
&& curl -sSL "$TIKA_SERVER_URL.asc" -o /tmp/tika-server-${TIKA_VERSION}.jar.asc \ | ||
&& NEAREST_TIKA_SERVER_URL=$(curl -sSL http://www.apache.org/dyn/closer.cgi/${TIKA_SERVER_URL#https://www.apache.org/dist/}\?asjson\=1 \ | ||
| awk '/"path_info": / { pi=$2; }; /"preferred":/ { pref=$2; }; END { print pref " " pi; };' \ | ||
| sed -r -e 's/^"//; s/",$//; s/" "//') \ | ||
&& echo "Nearest mirror: $NEAREST_TIKA_SERVER_URL" \ | ||
&& curl -sSL "$NEAREST_TIKA_SERVER_URL" -o /tika-server-${TIKA_VERSION}.jar \ | ||
&& apk del build-dependencies | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
COPY ./nginx/* /etc/nginx/ | ||
COPY ./nginx/includes /etc/nginx/includes | ||
COPY ./nginx/cert /etc/nginx/ssl | ||
COPY ./build/default /var/www | ||
|
||
COPY start.sh /scripts/ | ||
RUN chmod +x /scripts/start.sh | ||
|
||
CMD ["./scripts/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tika-app | ||
=== | ||
[](https://shields.io/) | ||
[](https://travis-ci.org/PolymerVis/tika-app) | ||
[](https://github.com/prettier/prettier) | ||
|
||
`tika-app` is a Polymer 3 app for [Apache Tika](https://tika.apache.org/), where text and meta-data can be extracted from various formats (e.g. `doc`, `docx`, `pdf`, `images`, ...). | ||
|
||
The demo is hosted at [Heroku](https://tika-app.herokuapp.com). | ||
|
||
## Quick start | ||
```bash | ||
# clone repo | ||
git clone [email protected]:PolymerVis/tika-app.git | ||
# enter tika-app project folder | ||
cd tika-app | ||
# install dependencies | ||
npm install | ||
# build app | ||
npm run build:polymer | ||
# build docker images | ||
docker-compose build | ||
# run service with docker-compose | ||
docker-compose up | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: "3" | ||
|
||
networks: | ||
tika-service: | ||
|
||
services: | ||
# tika: | ||
# image: logicalspark/docker-tikaserver | ||
# container_name: tika | ||
# restart: always | ||
# expose: | ||
# - 9998 | ||
# networks: | ||
# - tika-service | ||
|
||
nginx: | ||
build: | ||
context: . | ||
args: | ||
tika_version: 1.17 | ||
container_name: tika-app | ||
# restart: always | ||
# depends_on: | ||
# - tika | ||
ports: | ||
- 80:80 | ||
- 443:443 | ||
networks: | ||
- tika-service | ||
# command: ls -al /etc/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"> | ||
|
||
<title>tika-app</title> | ||
<meta name="description" content="Polymer 3.0 app for Apache Tika."> | ||
|
||
<!-- See https://goo.gl/OOhYW5 --> | ||
<link rel="manifest" href="/manifest.json"> | ||
|
||
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> | ||
<script> | ||
if ('serviceWorker' in navigator) { | ||
// Register a service worker hosted at the root of the | ||
// site using the default scope. | ||
navigator.serviceWorker.register('./sw.js').then(function(registration) { | ||
console.log('Service worker registration succeeded:'); | ||
}).catch(function(error) { | ||
console.log('Service worker registration failed:', error); | ||
}); | ||
} else { | ||
console.log('Service workers are not supported.'); | ||
} | ||
</script> | ||
<script type="module" src="/src/tika-app/tika-app.js"></script> | ||
</head> | ||
<body> | ||
<style> | ||
html { | ||
background-color: #eaeaea; | ||
} | ||
</style> | ||
<tika-app></tika-app> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "tika-app", | ||
"short_name": "tika-app", | ||
"description": "Polymer 3.0 app for Apache Tika.", | ||
"start_url": "/", | ||
"display": "standalone", | ||
"theme_color": "#3f51b5", | ||
"background_color": "#3f51b5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-----BEGIN DH PARAMETERS----- | ||
MIIBCAKCAQEAwY+s+Vz1DEnr5usx5cuZ5wKmXTXcMOpZ/Ea7N8yEzF8bJKqUT53n | ||
gr70hzzLgoeftotectS59lR0wGfBQZYyIP/xhybkFfJ9QYpmYeTq0wHK4dMvtb/P | ||
ZedpPnDxhxuZ/C2G2Y5DNlA5J0a+1I0xXqT8HnYkhjnRB3f7qJlrZWv195ce9YCb | ||
BvVadM2K+A++YJwgZqiwnM7bh6yLvEImTFvRqIxSt5KkcXhBDIjQcLTCz5dOqqAt | ||
3wRIqYZxilF78WgGdYNbZyhsonKL2J+kZveCaejq8nq1zUu3b+ApHA9DQNKcS5Dl | ||
QzOBrynwa7CVRJFETOkaexf6xzGF7weK8wIBAg== | ||
-----END DH PARAMETERS----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIEJTCCAw2gAwIBAgIJAMj4J6s4ZNVqMA0GCSqGSIb3DQEBCwUAMIGoMQswCQYD | ||
VQQGEwJTRzESMBAGA1UECAwJU2luZ2Fwb3JlMRIwEAYDVQQHDAlTaW5nYXBvcmUx | ||
EDAOBgNVBAoMB0dvdlRlY2gxHjAcBgNVBAsMFURhdGEgU2NpZW5jZSBEaXZpc2lv | ||
bjEeMBwGA1UEAwwVc2VudGltZW50LmdvdnRleHQuY29tMR8wHQYJKoZIhvcNAQkB | ||
FhB0ZXh0QGRhdGEuZ292LnNnMB4XDTE3MTIxMjAxMzU0OFoXDTE4MDExMTAxMzU0 | ||
OFowgagxCzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlTaW5nYXBvcmUxEjAQBgNVBAcM | ||
CVNpbmdhcG9yZTEQMA4GA1UECgwHR292VGVjaDEeMBwGA1UECwwVRGF0YSBTY2ll | ||
bmNlIERpdmlzaW9uMR4wHAYDVQQDDBVzZW50aW1lbnQuZ292dGV4dC5jb20xHzAd | ||
BgkqhkiG9w0BCQEWEHRleHRAZGF0YS5nb3Yuc2cwggEiMA0GCSqGSIb3DQEBAQUA | ||
A4IBDwAwggEKAoIBAQCvF74/0EyXZ6u41w3sImp5G/5A/SEJF39eynDZRdDaK8Ix | ||
jw+dCQmGl18VPF5RqIlC6Av4fvmvtZVaD32lu34nYCMyyixo8IXHjx0nPu74yAFR | ||
Cya/rEHN4DpkRukC3cwMjHK/zCO/Kjfbm92XOfIii2oAjuy3XE02cyXm1O7tTL/v | ||
TKZ8D1unOgDjkVXN35ZmsZqNnvfmiWgLDD8fdCZwdwSti7UZL4u34ExNfu9/J7oi | ||
WBiJ5CoHWd01chfEHIoJe2xQ2LWr6mcMKGK0o0bWGBvfyR2ecXhiGzUfnGxNy64S | ||
+NxCUd3Gg8S+hM7TKv194y8W3utbGcZsJuktEgcVAgMBAAGjUDBOMB0GA1UdDgQW | ||
BBThWIB0FldwqqtljGDnkX9Xs4IrbDAfBgNVHSMEGDAWgBThWIB0FldwqqtljGDn | ||
kX9Xs4IrbDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBUzFhqiEFi | ||
VMRtxm9vhUDdQ0WHFXOihhaMD7HULQjssgZdQd1/BkFqotSoeaqBDtP3DZQ6ovhM | ||
jMxtum1rjdMoFvK5byTrmGbzHaz5kXB6EJznBkRqBZmQwMpo6fX9/5ldaXOAwAk9 | ||
keCGALsA7OU9H7EpZO6Re6sJcSOcKHfKRRiiu+ALg1YmA2BUhXYLhrCRC7nDA0/q | ||
VcMNbRpBjiYED9i444xgvQhbmwetN70h5v/FyF2T6ctbx2693s3NL+EJHgFfCW/J | ||
7njuAvIGtz+zQNosXpVI46Vj1Kpzn5VdlGKpVV+qJjAjhzOyV7vGTZ2yUe1Z/6a9 | ||
NB/8+cColRBy | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCvF74/0EyXZ6u4 | ||
1w3sImp5G/5A/SEJF39eynDZRdDaK8Ixjw+dCQmGl18VPF5RqIlC6Av4fvmvtZVa | ||
D32lu34nYCMyyixo8IXHjx0nPu74yAFRCya/rEHN4DpkRukC3cwMjHK/zCO/Kjfb | ||
m92XOf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||
ZfxTy9I67upLKDeDXN/XESZM2Ejn9lx+XGwfdIgGvdeDOc5TR3rAfy/ZAoGBAI+2 | ||
jakJ5zxN5ABVvK5pBbXrLW+UtRjDXIhWKDjesVjCNkJKtrE5B04hGjtLG+aFw40t | ||
Hb8bloVJnOzAeXRMYcttP3kHrmdQoIWDveVBNwYtQHQZU8SBGn4DSChnxD7CmcV7 | ||
L4f6xsKoXJ6wMzD4TordxCvJrT3wGHpIi/oKWIgRAoGAR6PH9wvpiDmDGqVQB6aW | ||
mwIhTMumGTC+vJygjC6TpSYovUDTpH3ePS/2Aosq4riNxq+ej+990hFjX1RMkR81 | ||
DmITP1oMDu0hi8dVJcFe62uYXrA3M5g+7jFnLKd9LcYoAREmGgKdQe4MdmTxS/G5 | ||
ITFvCR0EjwP5o1wSMqZF2iE= | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
location /api/ { | ||
rewrite ^/api/(.*) /$1 break; | ||
proxy_pass http://127.0.0.1:9998; | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection "upgrade"; | ||
proxy_connect_timeout 3000s; | ||
proxy_send_timeout 3000s; | ||
proxy_read_timeout 3000s; | ||
send_timeout 3000s; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
|
||
types { | ||
text/html html htm shtml; | ||
text/css css; | ||
text/xml xml; | ||
image/gif gif; | ||
image/jpeg jpeg jpg; | ||
application/javascript js; | ||
application/atom+xml atom; | ||
application/rss+xml rss; | ||
|
||
text/mathml mml; | ||
text/plain txt; | ||
text/vnd.sun.j2me.app-descriptor jad; | ||
text/vnd.wap.wml wml; | ||
text/x-component htc; | ||
|
||
image/png png; | ||
image/svg+xml svg svgz; | ||
image/tiff tif tiff; | ||
image/vnd.wap.wbmp wbmp; | ||
image/webp webp; | ||
image/x-icon ico; | ||
image/x-jng jng; | ||
image/x-ms-bmp bmp; | ||
|
||
application/font-woff woff; | ||
application/java-archive jar war ear; | ||
application/json json; | ||
application/mac-binhex40 hqx; | ||
application/msword doc; | ||
application/pdf pdf; | ||
application/postscript ps eps ai; | ||
application/rtf rtf; | ||
application/vnd.apple.mpegurl m3u8; | ||
application/vnd.google-earth.kml+xml kml; | ||
application/vnd.google-earth.kmz kmz; | ||
application/vnd.ms-excel xls; | ||
application/vnd.ms-fontobject eot; | ||
application/vnd.ms-powerpoint ppt; | ||
application/vnd.oasis.opendocument.graphics odg; | ||
application/vnd.oasis.opendocument.presentation odp; | ||
application/vnd.oasis.opendocument.spreadsheet ods; | ||
application/vnd.oasis.opendocument.text odt; | ||
application/vnd.openxmlformats-officedocument.presentationml.presentation | ||
pptx; | ||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | ||
xlsx; | ||
application/vnd.openxmlformats-officedocument.wordprocessingml.document | ||
docx; | ||
application/vnd.wap.wmlc wmlc; | ||
application/x-7z-compressed 7z; | ||
application/x-cocoa cco; | ||
application/x-java-archive-diff jardiff; | ||
application/x-java-jnlp-file jnlp; | ||
application/x-makeself run; | ||
application/x-perl pl pm; | ||
application/x-pilot prc pdb; | ||
application/x-rar-compressed rar; | ||
application/x-redhat-package-manager rpm; | ||
application/x-sea sea; | ||
application/x-shockwave-flash swf; | ||
application/x-stuffit sit; | ||
application/x-tcl tcl tk; | ||
application/x-x509-ca-cert der pem crt; | ||
application/x-xpinstall xpi; | ||
application/xhtml+xml xhtml; | ||
application/xspf+xml xspf; | ||
application/zip zip; | ||
|
||
application/octet-stream bin exe dll; | ||
application/octet-stream deb; | ||
application/octet-stream dmg; | ||
application/octet-stream iso img; | ||
application/octet-stream msi msp msm; | ||
|
||
audio/midi mid midi kar; | ||
audio/mpeg mp3; | ||
audio/ogg ogg; | ||
audio/x-m4a m4a; | ||
audio/x-realaudio ra; | ||
|
||
video/3gpp 3gpp 3gp; | ||
video/mp2t ts; | ||
video/mp4 mp4; | ||
video/mpeg mpeg mpg; | ||
video/quicktime mov; | ||
video/webm webm; | ||
video/x-flv flv; | ||
video/x-m4v m4v; | ||
video/x-mng mng; | ||
video/x-ms-asf asx asf; | ||
video/x-ms-wmv wmv; | ||
video/x-msvideo avi; | ||
} |
Oops, something went wrong.