sphinx_pyppeteer_builder


Namesphinx_pyppeteer_builder JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA Sphinx PDF builder using pyppeteer
upload_time2023-09-19 00:04:07
maintainerkujiu, ptitgnu
docs_urlNone
authorkujiu, ptitgnu
requires_python>=3.8
licenseNone
keywords sphinx doc pdf pyppeteer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Sphinx Pyppeteer builder
========================

Sphinx Pyppeteer builder is a PDF generator for
`Sphinx <https://www.sphinx-doc.org>`_ without usage
of LaTeX. It uses `Pyppeteer <https://github.com/pyppeteer/pyppeteer>`_,
a wrapper to control a web browser. It supports
Chromium for now.

Install
-------

You can install it with `pip`:

.. code:: bash

   pip install sphinx_pyppeteer_builder

Or with `setup.py`:

.. code:: bash

   python setup.py install
   pyppeteer-install

.. important::

   Do not forget to install chromium-headless via
   pyppeteer with command `pyppeteer-install`.
   Generation will not work without that.

Configuration
-------------

You can configure your output with these options:

- pyppeteer_basename
- pyppeteer_theme
- pyppeteer_theme_options
- pyppeteer_title
- pyppeteer_theme_path
- pyppeteer_short_title
- pyppeteer_style
- pyppeteer_css_files
- pyppeteer_show_copyright
- pyppeteer_show_sphinx

Each one has the same behavior of its equivalent
for `html` builder.

.. warning::

   Some themes need adaptation to work fine with
   this module. Check your CSS.

In addition, you can set `pyppeteer_pdf_options`
var. This dict is passed as is to
`the pdf coroutine <https://pyppeteer.github.io/pyppeteer/reference.html#pyppeteer.page.Page.pdf>`_. Default values are:

.. code:: python

   pyppeteer_pdf_options = {
       'printBackground': True,
       'format': 'A4',
       'margin': {
           'top': '20mm',
           'bottom': '20mm',
           'left': '10mm',
           'right': '10mm'
       }
   }


.. warning::

   Path option in `pyppeteer_pdf_options` is ignored.

Use
---

Just launch the following:

.. code:: bash

   make pyppeteer

Why an other PDF builder for Sphinx?
------------------------------------

LaTeX is really hard to use and to personalize.
There's also an other project to make PDF without
LaTeX but it is not based on CSS stylesheets.

Web browser to generate PDF have all new generation
CSS specs implemented. You can use
`sphinx_weasyprint_builder` instead if you
don't want a full browser.

This plugin is just `singlehtml` output with
conversion to PDF.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sphinx_pyppeteer_builder",
    "maintainer": "kujiu, ptitgnu",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Nerv Project ASBL <contact@nerv-project.eu>",
    "keywords": "sphinx,doc,pdf,pyppeteer",
    "author": "kujiu, ptitgnu",
    "author_email": "Nerv Project ASBL <contact@nerv-project.eu>",
    "download_url": "https://files.pythonhosted.org/packages/01/a5/24b0aa429ec5f07df5db45d510df77bb4283e841ec860c0d5c5b93822055/sphinx_pyppeteer_builder-1.0.0.tar.gz",
    "platform": null,
    "description": "Sphinx Pyppeteer builder\n========================\n\nSphinx Pyppeteer builder is a PDF generator for\n`Sphinx <https://www.sphinx-doc.org>`_ without usage\nof LaTeX. It uses `Pyppeteer <https://github.com/pyppeteer/pyppeteer>`_,\na wrapper to control a web browser. It supports\nChromium for now.\n\nInstall\n-------\n\nYou can install it with `pip`:\n\n.. code:: bash\n\n   pip install sphinx_pyppeteer_builder\n\nOr with `setup.py`:\n\n.. code:: bash\n\n   python setup.py install\n   pyppeteer-install\n\n.. important::\n\n   Do not forget to install chromium-headless via\n   pyppeteer with command `pyppeteer-install`.\n   Generation will not work without that.\n\nConfiguration\n-------------\n\nYou can configure your output with these options:\n\n- pyppeteer_basename\n- pyppeteer_theme\n- pyppeteer_theme_options\n- pyppeteer_title\n- pyppeteer_theme_path\n- pyppeteer_short_title\n- pyppeteer_style\n- pyppeteer_css_files\n- pyppeteer_show_copyright\n- pyppeteer_show_sphinx\n\nEach one has the same behavior of its equivalent\nfor `html` builder.\n\n.. warning::\n\n   Some themes need adaptation to work fine with\n   this module. Check your CSS.\n\nIn addition, you can set `pyppeteer_pdf_options`\nvar. This dict is passed as is to\n`the pdf coroutine <https://pyppeteer.github.io/pyppeteer/reference.html#pyppeteer.page.Page.pdf>`_. Default values are:\n\n.. code:: python\n\n   pyppeteer_pdf_options = {\n       'printBackground': True,\n       'format': 'A4',\n       'margin': {\n           'top': '20mm',\n           'bottom': '20mm',\n           'left': '10mm',\n           'right': '10mm'\n       }\n   }\n\n\n.. warning::\n\n   Path option in `pyppeteer_pdf_options` is ignored.\n\nUse\n---\n\nJust launch the following:\n\n.. code:: bash\n\n   make pyppeteer\n\nWhy an other PDF builder for Sphinx?\n------------------------------------\n\nLaTeX is really hard to use and to personalize.\nThere's also an other project to make PDF without\nLaTeX but it is not based on CSS stylesheets.\n\nWeb browser to generate PDF have all new generation\nCSS specs implemented. You can use\n`sphinx_weasyprint_builder` instead if you\ndon't want a full browser.\n\nThis plugin is just `singlehtml` output with\nconversion to PDF.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Sphinx PDF builder using pyppeteer",
    "version": "1.0.0",
    "project_urls": {
        "changelog": "https://procrastinator.nerv-project.eu/nerv-project/sphinx_pyppeteer_builder/raw/branch/main/CHANGES.rst",
        "editor": "https://www.nerv-project.eu",
        "homepage": "https://www.nerv-project.eu",
        "issues": "https://procrastinator.nerv-project.eu/nerv-project/sphinx_pyppeteer_builder/issues",
        "repository": "https://procrastinator.nerv-project.eu/nerv-project/sphinx_pyppeteer_builder"
    },
    "split_keywords": [
        "sphinx",
        "doc",
        "pdf",
        "pyppeteer"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c544fbcea12d117761c35de6b41cff337c0ee1d62bb42b2e7b9f27c5bd9805bd",
                "md5": "7dd889c416109874ca915aa95546fd6e",
                "sha256": "41aa6f3b5789d0be631256eede52190c4288626078723f975a21d1c789379bd1"
            },
            "downloads": -1,
            "filename": "sphinx_pyppeteer_builder-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7dd889c416109874ca915aa95546fd6e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 28662,
            "upload_time": "2023-09-19T00:04:05",
            "upload_time_iso_8601": "2023-09-19T00:04:05.013977Z",
            "url": "https://files.pythonhosted.org/packages/c5/44/fbcea12d117761c35de6b41cff337c0ee1d62bb42b2e7b9f27c5bd9805bd/sphinx_pyppeteer_builder-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "01a524b0aa429ec5f07df5db45d510df77bb4283e841ec860c0d5c5b93822055",
                "md5": "3bba06bc6d991ef7f7815108d15e5360",
                "sha256": "02d19d8efe54eba976afb05c245cb07a3ee97f221d0489c7fcc56448b3f168ee"
            },
            "downloads": -1,
            "filename": "sphinx_pyppeteer_builder-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3bba06bc6d991ef7f7815108d15e5360",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 139607,
            "upload_time": "2023-09-19T00:04:07",
            "upload_time_iso_8601": "2023-09-19T00:04:07.486290Z",
            "url": "https://files.pythonhosted.org/packages/01/a5/24b0aa429ec5f07df5db45d510df77bb4283e841ec860c0d5c5b93822055/sphinx_pyppeteer_builder-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-19 00:04:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sphinx_pyppeteer_builder"
}
        
Elapsed time: 0.11712s