Giter VIP home page Giter VIP logo

jsscraper's Introduction

JsScraper

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).

How to

  1. Convert your pdf using pdftohtml -c doc.pdf out/doc.html. You can find PdfToHtml here. TODO(pdf2htmlex exactly)

  2. 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"/>
    
  3. Open the first page you want to parse in your browser!

Usage

In process..

Architecture

MVC approach to keep things simple. To extract data with given rules UI is not needed.

  1. Database - keeps all the data, is feeded by Processor
  2. Processor - keeps the rules, process stream of pages, feeds database with data
  3. UI - panel to help user create the rules and visualize the data processed
  4. Bookmarklet Bootstrap - just click to enable the app on any webpage, inspired by VisualEvent

Technology behind

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.

Bugs / feature request

Please post an issue with one of the labels:

  1. Bug
  2. Feature request

Want to help?

Post an issue to discuss proposed changes. See the roadmap below to see my proposition of directions in which the project could grow.

Roadmap

  1. Create bookmarklet to ease the usage
  2. Create webservice that will process uploaded PDFs and allow to scrape them online.
  3. Expand to processing normal webpages
  4. API stub generation [Create swagger API spec from data (which then enables creating clients, server stubs, etc.)]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.