Code Monkey home page Code Monkey logo

pdf-index's Introduction

pdfindex

PDF-index is a command line tool that find important terms in a PDF document and generates a ready-to-print index.

It relies on PyPDF and NLTK libraries for extracting and mining text.

Output formats currently supported are HTML and Markdown.

It works with Python 3.

Example

For generating an html index from the input.pdf document to output.html, selecting terms with a minimum score of 0.2:

$ python3 pdfindex.py --min-score 0.2 --format html input.pdf output.html

Usage

Within a virtualenv:

$ pip3 install -r requirements.txt

Print usage:

$ python3 pdfindex.py -h
usage: pdfindex.py [-h] [-m MIN_SCORE] [-f {html,markdown}] [-p PAGE_OFFSET]
                   input_file output_file

Extract text from a PDF file and generate a ready-to-print index

positional arguments:
  input_file            the PDF file
  output_file           the output file

optional arguments:
  -h, --help            show this help message and exit
  -m MIN_SCORE, --min-score MIN_SCORE
                        the minimum tfidf score required to be included in the
                        index
  -f {html,markdown}, --format {html,markdown}
                        the output format
  -p PAGE_OFFSET, --page-offset PAGE_OFFSET
                        the start of page numbering

pdf-index's People

Contributors

dbarthe avatar viaccoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.