summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames R. Barlow <jim@purplerock.ca>2017-09-08 23:16:42 -0700
committerJames R. Barlow <jim@purplerock.ca>2017-09-08 23:16:42 -0700
commit222b54ae812526458ec232c3e8bd05c21d3fe88d (patch)
treec58b72dff48e2e341e85e64a787e1492e41dc359
parent3fc27ccdd45ac6ee51e5b0b411aef6cd46bd64d5 (diff)
Documentation: front page, etc.
-rw-r--r--docs/Makefile3
-rw-r--r--docs/conf.py2
-rw-r--r--docs/images/pike.jpgbin0 -> 27097 bytes
-rw-r--r--docs/index.rst25
-rw-r--r--pikepdf/__init__.py3
-rw-r--r--src/qpdf.cpp3
6 files changed, 28 insertions, 8 deletions
diff --git a/docs/Makefile b/docs/Makefile
index e47f80c..4c1a0fe 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -214,6 +214,3 @@ pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
-
-livehtml:
- sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
diff --git a/docs/conf.py b/docs/conf.py
index d3e4bc6..638e961 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -116,7 +116,7 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'alabaster'
+html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
diff --git a/docs/images/pike.jpg b/docs/images/pike.jpg
new file mode 100644
index 0000000..1596943
--- /dev/null
+++ b/docs/images/pike.jpg
Binary files differ
diff --git a/docs/index.rst b/docs/index.rst
index 26d4ee0..90cdf74 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,10 +1,29 @@
pikepdf Documentation
============================
+.. figure:: /images/pike.jpg
+ :align: right
+ :alt: A northern pike
+ :figwidth: 30%
+
+ A northern pike, or *esox lucius*. [#img1]_
+
+**pikepdf** is a Python library allowing creation, manipulation and repair of
+PDF files. It provides a wrapper around the C++ PDF content transformation
+library, `QPDF <https://github.com/qpdf/qpdf>`_.
+
+Python + QPDF = "py" + "qpdf" = "pyqpdf", which looks like a dyslexia test. Say it
+out loud, and it sounds like "pikepdf".
+
+
+
Contents:
-.. toctree::
- :maxdepth: 2
+.. toctree::
+ :maxdepth: 2
+
+ pikepdf
- pikepdf
+.. rubric:: References
+.. [#img1] `Public domain image <https://en.wikipedia.org/wiki/File:Esox_lucius1.jpg>`_. \ No newline at end of file
diff --git a/pikepdf/__init__.py b/pikepdf/__init__.py
index c25a7c1..d0ef598 100644
--- a/pikepdf/__init__.py
+++ b/pikepdf/__init__.py
@@ -4,7 +4,6 @@ from ._qpdf import Object, ObjectType, PdfError, Pdf
from collections import namedtuple
-PdfInstruction = namedtuple('PdfInstruction', ('operands', 'operator'))
class _OperandGrouper(_qpdf.StreamParser):
@@ -15,6 +14,8 @@ class _OperandGrouper(_qpdf.StreamParser):
"""
+ PdfInstruction = namedtuple('PdfInstruction', ('operands', 'operator'))
+
def __init__(self):
super().__init__()
self.instructions = []
diff --git a/src/qpdf.cpp b/src/qpdf.cpp
index f1c8264..b1481e5 100644
--- a/src/qpdf.cpp
+++ b/src/qpdf.cpp
@@ -95,6 +95,9 @@ QPDF* open_pdf(py::args args, py::kwargs kwargs)
void init_object(py::module& m);
PYBIND11_MODULE(_qpdf, m) {
+ //py::options options;
+ //options.disable_function_signatures();
+
m.doc() = "pikepdf provides a Pythonic interface for QPDF";
m.def("qpdf_version", &qpdf_get_qpdf_version, "Get libqpdf version");