Skip to content

Commit

Permalink
update readme to note busted AMIs. update build scripts to have a jar…
Browse files Browse the repository at this point in the history
… file distribution for Linux, etc. update readme (for dists) with running instructions.
  • Loading branch information
mtigas committed Jul 8, 2013
1 parent 820370f commit a928eaf
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Tabula helps you liberate data tables trapped inside PDF files.
© 2012-2013 Manuel Aristarán. Available under MIT License. See
[`AUTHORS.md`](AUTHORS.md) and [`LICENSE.md`](LICENSE.md).

**Notice: July 8, 2013** --- If you are using the Amazon EC2 AMI for Tabula (released
earlier this year), it will cease to function on next reboot. You should terminate
all instances using this AMI. See the *Using Tabula* section below for instructions
on using the new, desktop-oriented version of Tabula.

## Why Tabula?

If you’ve ever tried to do anything with data provided to you in PDFs, you
Expand All @@ -23,34 +28,33 @@ First, make sure you have a recent copy of Java installed. You can
[download Java here][jre_download]. Tabula requires
a Java Runtime Environment compatible with Java 6 or Java 7.

{**TODO**: Download links are not yet ready.}

* **Windows** -- Download `tabula-win.zip` from {TODO}. Unzip the whole thing
* **Windows** -- Download `tabula-win.zip` from [the download site][tabula_dl]. Unzip the whole thing
and open the `tabula.exe` file inside. A browser should automatically open
to http://127.0.0.1:8080/ . If not, open your web browser of choice and
visit that link.

To close Tabula, just go back to the console window and press "Control-C"
(as if to copy).

* **Mac OS X** -- Download `tabula-mac.zip` from {TODO}. Unzip and open
* **Mac OS X** -- Download `tabula-mac.zip` from [the download site][tabula_dl]. Unzip and open
the Tabula app inside. A browser should automatically open
to http://127.0.0.1:8080/ . If not, open your web browser of choice and
visit that link.

To close Tabula, find the Tabula icon in your dock, right-click (or
control-click) on it, and press "Quit".

* **Other platforms** -- Download `tabula-jar.zip` from {TODO} and unzip it
* **Other platforms** -- Download `tabula-jar.zip` from [the download site][tabula_dl] and unzip it
to the directory of your choice. Open a terminal window, and `cd` to inside
the `tabula` directory you just unzipped. Then run:

`java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar build/tabula.jar`
`java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar tabula.jar`

If the program fails to run, double-check that you have [Java installed][jre_download]
and then try again.

[jre_download]: https://www.java.com/download/
[tabula_dl]: http://jazzido.github.io/tabula/

## Running Tabula from source (for developers)

Expand Down
48 changes: 48 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,54 @@ Warbler::Task.new("war",
########## distribution bundles ##########


task :jardist => [:war] do |t|
tabula_dir = File.expand_path(File.dirname(__FILE__))
build_dir = File.join(tabula_dir, "build")
dist_dir = File.join(build_dir, "jardist", "tabula")

if File.exist?(File.join(build_dir, "jardist"))
FileUtils.rm_rf(File.join(build_dir, "jardist"))
end

puts "\n======================================================"
puts "Building jar zip file bundle..."
puts "======================================================\n\n"

Dir.mkdir(File.join(build_dir, "jardist"))
Dir.mkdir(File.join(build_dir, "jardist", "tabula"))

jar_src = File.join(build_dir, "tabula.jar")
jar_dst = File.join(dist_dir, "tabula.jar")
FileUtils.mv(jar_src, jar_dst)

readme_src = File.join(build_dir, "dist-README.txt")
readme_dst = File.join(dist_dir, "README.txt")
FileUtils.cp(readme_src, readme_dst)

lic_src = File.join(build_dir, "dist-LICENSE.txt")
lic_dst = File.join(dist_dir, "LICENSE.txt")
FileUtils.cp(lic_src, lic_dst)

authors_src = File.join(tabula_dir, "AUTHORS.md")
authors_dst = File.join(dist_dir, "AUTHORS.txt")
FileUtils.cp(authors_src, authors_dst)

cd File.join(build_dir, "jardist")
output = File.join(build_dir, "tabula-jar.zip")
if File.exists?(output)
File.delete(output)
end

IO.popen("zip -r9 #{output} tabula") { |f|
f.each { |line| puts line }
}
FileUtils.rm_rf(dist_dir)
puts "\n======================================================"
puts "Zip file saved to #{output}"
puts "======================================================\n\n"
end


task :macosx => [:war] do |t|
tabula_dir = File.expand_path(File.dirname(__FILE__))
build_dir = File.join(tabula_dir, "build")
Expand Down
27 changes: 27 additions & 0 deletions build/dist-README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,30 @@ Tabula helps you liberate data tables trapped inside PDF files.

© 2012-2013 Manuel Aristarán. Available under MIT License.
See `AUTHORS.txt` and `LICENSE.txt`.

---

## Using Tabula

First, make sure you have a recent copy of Java installed. You can
download Java at https://www.java.com/download/ . Tabula requires
a Java Runtime Environment compatible with Java 6 or Java 7.

### Windows (tabula-win.zip)

Open tabula.exe and a browser should automatically open to
http://127.0.0.1:8080/ . If not, open your web browser of choice and visit
that URL.

### Mac OS X (tabula-mac.zip)

Open the Tabula app and a browser should automatically open to
http://127.0.0.1:8080/ . If not, open your web browser of choice and visit
that URL.

### JAR file for Linux/Other (tabula-jar.zip)

Open a terminal window, and `cd` to inside this `tabula` directory,
then run the following command

java -Dfile.encoding=utf-8 -Xms256M -Xmx1024M -jar tabula.jar

0 comments on commit a928eaf

Please sign in to comment.