Home

Awesome

<p align="center"> <img src="https://raw.githubusercontent.com/camelot-dev/excalibur/master/docs/_static/excalibur-logo.png" width="200"> </p>

Excalibur: A web interface to extract tabular data from PDFs

Documentation Status image image image Gitter chat image image

Excalibur is a web interface to extract tabular data from PDFs, written in Python 3! It is powered by Camelot.

Note: Excalibur only works with text-based PDFs and not scanned documents. (As Tabula explains, "If you can click and drag to select text in your table in a PDF viewer, then your PDF is text-based".)

Using Excalibur

Note: You need to install ghostscript before moving forward.

After installing Excalibur with pip, you need to initialize the metadata database using:

<pre> $ excalibur initdb </pre>

And then start the webserver using:

<pre> $ excalibur webserver </pre>

That's it! Now you can go to http://localhost:5000 and start extracting tabular data from your PDFs.

  1. Upload a PDF and enter the page numbers you want to extract tables from.

  2. Go to each page and select the table by drawing a box around it. (You can choose to skip this step since Excalibur can automatically detect tables on its own. Click on "Autodetect tables" to see what Excalibur sees.)

  3. Choose a flavor (Lattice or Stream) from "Advanced".

    a. Lattice: For tables formed with lines.

    b. Stream: For tables formed with whitespaces.

  4. Click on "View and download data" to see the extracted tables.

  5. Select your favorite format (CSV/Excel/JSON/HTML) and click on "Download"!

Note: You can also download executables for Windows and Linux from the releases page and run them directly!

usage.gif

Why Excalibur?

Installation

Using pip

After installing ghostscript, which is one of the requirements for Camelot (See install instructions), you can simply use pip to install Excalibur:

<pre> $ pip install excalibur-py </pre>

From the source code

After installing ghostscript, clone the repo using:

<pre> $ git clone https://www.github.com/camelot-dev/excalibur </pre>

and install Excalibur using pip:

<pre> $ cd excalibur $ pip install . </pre>

Documentation

Fantastic documentation is available at http://excalibur-py.readthedocs.io/.

Development

The Contributor's Guide has detailed information about contributing code, documentation, tests and more. We've included some basic information in this README.

Source code

You can check the latest sources with:

<pre> $ git clone https://www.github.com/camelot-dev/excalibur </pre>

Setting up a development environment

You can install the development dependencies easily, using pip:

<pre> $ pip install excalibur-py[dev] </pre>

Testing (soon)

After installation, you can run tests using:

<pre> $ python setup.py test </pre>

Versioning

Excalibur uses Semantic Versioning. For the available versions, see the tags on this repository. For the changelog, you can check out HISTORY.md.

License

This project is licensed under the MIT License, see the LICENSE file for details.

Support the development

You can support our work on Excalibur with a one-time or monthly donation on OpenCollective. Organizations who use Excalibur can also sponsor the project for an acknowledgement on our official site and this README.

Special thanks to all the users and organizations that support Excalibur!

<a href="https://opencollective.com/excalibur/backer/0/website" target="_blank"><img src="https://opencollective.com/excalibur/backer/0/avatar.svg"></a> <a href="https://opencollective.com/excalibur/sponsor/0/website" target="_blank"><img src="https://opencollective.com/excalibur/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/excalibur/backer/1/website" target="_blank"><img src="https://opencollective.com/excalibur/backer/1/avatar.svg"></a>