JsScraper is a simple tool to scrape the data from PDFs.
It runs in a browser (injected into webpage by bookmarklet) and works on local pdfs converted to webpages by means of other tools. Inspiration came from KimonoLabs and retyping by hand tons of pdfs (hooray to public-but-not-open-data).
-
Convert your pdf using
pdftohtml -c doc.pdf out/doc.html
. You can find PdfToHtml here. TODO(pdf2htmlex exactly) -
Insert script and styles references (soon to be swapped by bookmarklet)
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/sha1.js"></script> <script src="../keys.js"></script> <script src="../analyze.js"></script> <link rel="stylesheet" href="../js-scraper.css"/>
-
Open the first page you want to parse in your browser!
In process..
MVC approach to keep things simple. To extract data with given rules UI is not needed.
- Database - keeps all the data, is feeded by Processor
- Processor - keeps the rules, process stream of pages, feeds database with data
- UI - panel to help user create the rules and visualize the data processed
- Bookmarklet Bootstrap - just click to enable the app on any webpage, inspired by VisualEvent
While draft of this app was written in pure JS, it would kill the project continuing this approach. So welcome CoffeeScript.
UI is planned to be written in EmberJS.
Please post an issue with one of the labels:
- Bug
- Feature request
Post an issue to discuss proposed changes. See the roadmap below to see my proposition of directions in which the project could grow.
- Create bookmarklet to ease the usage
- Create webservice that will process uploaded PDFs and allow to scrape them online.
- Expand to processing normal webpages
- API stub generation [Create swagger API spec from data (which then enables creating clients, server stubs, etc.)]