Skip to content

Instantly share code, notes, and snippets.

@stucka
Last active October 16, 2018 09:05
Show Gist options
  • Save stucka/5342652 to your computer and use it in GitHub Desktop.
Save stucka/5342652 to your computer and use it in GitHub Desktop.
Tabula installation instructions for Ubuntu 12.04. Tabula turns PDFs into CSVs! http://source.mozillaopennews.org/en-US/articles/introducing-tabula/
Yeah, this all got outmoded when serious dependency problems with Tabula were removed.
No need to use this. Get Tabula directly. http://tabula.nerdpower.org/
In Linux, everyone has their own way of doing stuff. Here's mine.
This will only work with Ubuntu 12.04 and derivatives. If you're on 12.10, you'll need to get your own OpenCV. And good luck with that hot mess.
This thing will require you to run lots of programs. So your first run is to the liquor store. Seriously. Go. Now. Try Woodford Reserve if you like stuff strong. If you like fruit, try Lindemann's Kriek (cherry).
Run as root for a while:
sudo bash
Speed downloads up:
apt-get install software-properties-common python-software-properties
add-apt-repository ppa:apt-fast/stable
apt-get update
apt-get install apt-fast aria2
Find us a maybe-working copy of OpenCV:
add-apt-repository ppa:philip5/extra
Find us a maybe-working copy of MuPDF:
add-apt-repository ppa:mupdf/stable
Now install entirely too much crap. That opencv2.4 package may appear deceptively simple, but that got a clean system more than 200 other packages. apt-fast is worth every penny.
apt-get update
apt-fast install opencv2.4 build-essential python2.7 curl libavformat-dev ffmpeg libcv-dev libcvaux-dev libhighgui-dev openjdk-7-jre mupdf redis-server libopencv-gpu-dev opencv2.4-doc libopencv-photo-dev libopencv-contrib-dev libopencv-legacy-dev libopencv-objdetect-dev libopencv-nonfree-dev mupdf-tools libmupdf-dev git lynx-cur libopencv-photo-dev zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev libxml2-dev libxslt1-dev python-dev
curl http://python-distribute.org/distribute_setup.py | python2.7
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python2.7
pip install numpy
Now, we just need to install all the rest of the stuff at user level. So let's get out of root and get to business:
exit
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL -l
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 1.9.3-p392
rbenv install jruby-1.7.3
git clone git://github.com/carsomyr/rbenv-bundler.git ~/.rbenv/plugins/bundler
cd $HOME
git clone git://github.com/jazzido/tabula.git
cd tabula
rbenv local 1.9.3-p392
gem install bundler
ruby -r bundler -e "puts RUBY_VERSION" 1.9.3
rbenv rehash
bundle install
cp local_settings-example.rb local_settings.rb
Next, edit your settings file:
nano local_settings.rb
JRUBY_PATH = '/home/stucka/.rbenv/versions/jruby-1.7.3/bin'
MUDRAW_PATH = '/usr/bin/mudraw'
sudo redis-server /etc/redis/redis.conf
Start your engines:
bundle exec foreman start
See what you've done:
firefox http://127.0.0.1:9292/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment