-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnapcraft.yaml
93 lines (85 loc) · 3.24 KB
/
snapcraft.yaml
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
85
86
87
88
89
90
91
92
93
name: tabula
title: Tabula
version: '1.2.1'
summary: Tabula helps you liberate data tables trapped inside PDF files.
description: |
If you’ve ever tried to do anything with data provided to you in PDFs,
you know how painful this is — you can’t easily copy-and-paste rows of
data out of PDF files. Tabula allows you to extract that data in CSV
format, through a simple web interface.
Caveat - Tabula only works on text-based PDFs, not (image based) scanned
documents. If you can click-and-drag to select text in your table in a
PDF viewer (even if the output is disorganized trash), then your PDF is
text-based and Tabula should work.
Security Concerns? Tabula is designed with security in mind. Your PDF
and the extracted data never touch the net -- when you use Tabula on your
local machine, as long as your browser's URL bar says "localhost" or
"127.0.0.1", all processing takes place on your local machine.
Even external version checks and the anonymous stats counter have been
disabled in the snap.
This snap starts a local web server and then automatically opens a
browser window. Close the terminal windows to stop the server.
It is a community build without support by Tabula's authors.
base: core20
grade: stable
confinement: strict
architectures: [amd64]
compression: lzo
license: MIT
environment:
JAVA_HOME: $SNAP/usr/lib/jvm/java-8-openjdk-amd64/bin
PATH: $SNAP/usr/lib/jvm/java-8-openjdk-amd64/bin:$PATH
apps:
tabula:
command: tabula.sh
plugs:
- removable-media
- home
- optical-drive
tabula-server:
command: tabula-server.sh
desktop: $SNAPCRAFT_PROJECT_DIR/tabula-desktop/tabula.desktop
extensions: [gnome-3-38]
plugs:
- network
- network-bind
parts:
get-source:
plugin: dump
source: https://github.com/tabulapdf/tabula/releases/download/v1.2.1/tabula-jar-1.2.1.zip
source-type: zip
get-desktop:
plugin: dump
source: https://github.com/digidigital/tabula-snap/raw/main/tabula-desktop.zip
source-type: zip
get-jar:
plugin: nil
build-packages:
- wget
override-build: |
wget https://github.com/tabulapdf/tabula-java/releases/download/v1.0.5/tabula-1.0.5-jar-with-dependencies.jar
cp tabula-1.0.5-jar-with-dependencies.jar $SNAPCRAFT_PART_INSTALL/tabula-1.0.5-jar-with-dependencies.jar
override-prime: |
snapcraftctl prime
echo 'java -jar $SNAP/tabula-1.0.5-jar-with-dependencies.jar "$@"' > tabula.sh
chmod +x tabula.sh
packages:
plugin: nil
stage-packages:
- openjdk-8-jre
- ca-certificates
- ca-certificates-java
- wget
build-packages:
- openjdk-8-jre
- ca-certificates
- ca-certificates-java
override-prime: |
snapcraftctl prime
echo '(trap 'kill 0' SIGINT; (wget -tries=20 --retry-connrefused http://127.0.0.1:9999 --waitretry=1 -q -P /dev/null ; xdg-open http://127.0.0.1:9999) & java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -Dtabula.disable_version_check=1 -Dtabula.disable_notifications=1 -Dwarbler.port=9999 -jar $SNAP/tabula/tabula.jar)' > tabula-server.sh
chmod +x tabula-server.sh
prime:
- -usr/lib/jvm/java-11-openjdk-amd64
layout:
/etc/wgetrc:
bind-file: $SNAP/etc/wgetrc