Metadata-Version: 2.1
Name: document-contents-extractor
Version: 1.1
Summary: A simple script to extract contents section from a PDF or DJVU document
Home-page: https://github.com/dalanicolai/pdf-contents-extractor
Author: Daniel Nicolai
Author-email: dalanicolai@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: POSIX
Description-Content-Type: text/markdown
Requires-Dist: Pillow
Requires-Dist: PyMuPDF
Requires-Dist: pytesseract (==0.2.7)

# pdf-contents-extractor 
Extract Table of Contents (TOC) as text from a pdf- or djvu-document (for use in e.g. handyoutliner)

requires:
* for PDF, pytesseract and PyMuPDF (both can be easily installed with pip)
* for DJVU, the ddjvu command available in the path

After installation type in a terminal: extract_contents /path/filename startpage lastpage
(e.g.: `extract_contents example.djvu 3 6`)
where startpage and lastpage are pagenumbers of the content pages.
The script automatically recognizes the format (pdf or djvu)

The default tesseract language is english. Another language(s) can be set with -l flag (e.g.: `-l eng+nld` for english and dutch) but it requires the correct tesseract langpack to be installed.

for extra options and help type: extract_contents -h

The contents can be further edited in a text-editor and added to the pdf-file with handyoutliner (http://handyoutlinerfo.sourceforge.net/)



