mirror of https://github.com/captn3m0/pystitcher
Switch to PyPDF3
parent
d047844ad0
commit
044d21b8bc
18
README.rst
18
README.rst
|
@ -2,8 +2,7 @@
|
|||
pystitcher
|
||||
==========
|
||||
|
||||
|
||||
pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input file.
|
||||
pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input in the form of a markdown file. It is written in pure python and uses `PyPDF3 <https://pypi.org/project/PyPDF3/>`_ for reading and writing PDF files.
|
||||
|
||||
|
||||
Description
|
||||
|
@ -12,6 +11,10 @@ Description
|
|||
Given this input::
|
||||
|
||||
existing_bookmarks: flatten
|
||||
title: Complete Guide to the Personal Data Protection Bill
|
||||
author: Medianama
|
||||
keywords: privacy, surveillance, personal data protection
|
||||
subject: Personal Data Protection Bill
|
||||
# A Complete Guide to the Personal Data Protection Bill
|
||||
|
||||
- [Cover](cover.pdf)
|
||||
|
@ -35,10 +38,17 @@ Will generate a PDF with proper bookmarks:
|
|||
|
||||
.. image:: https://i.imgur.com/qPVpZGt.png
|
||||
|
||||
And the correct metadata::
|
||||
|
||||
Title: Complete Guide to the Personal Data Protection Bill
|
||||
Subject: Personal Data Protection Bill
|
||||
Keywords: privacy, surveillance, personal data protection
|
||||
Author: Medianama
|
||||
Creator: pystitcher/0.0.1
|
||||
Producer: pystitcher/0.0.1
|
||||
|
||||
Configuration options can be specified with Meta data at the top of the file. These include:
|
||||
|
||||
|
||||
|
||||
.. _pyscaffold-notes:
|
||||
|
||||
Note
|
||||
|
|
|
@ -41,7 +41,7 @@ python_requires = >=3.6
|
|||
install_requires =
|
||||
importlib-metadata; python_version<"3.8"
|
||||
# Read and write bookmarks from PDF
|
||||
PyPDF2>=1.26.0
|
||||
PyPDF3>=1.0.4
|
||||
# Read the input file and convert it to HTML
|
||||
Markdown>=3.3.4
|
||||
# Parse the HTML to generate bookmarks
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import markdown
|
||||
from .bookmark import Bookmark
|
||||
import html5lib
|
||||
from PyPDF2 import PdfFileWriter, PdfFileReader
|
||||
from PyPDF3 import PdfFileWriter, PdfFileReader
|
||||
from pystitcher import __version__
|
||||
import tempfile
|
||||
import logging
|
||||
|
|
Loading…
Reference in New Issue