API Documentation Generator for PyGObject https://lazka.github.io/pgi-docs/
  • Python 88.5%
  • HTML 5.7%
  • JavaScript 3%
  • Shell 1.5%
  • CSS 0.9%
  • Other 0.4%
Find a file
2025-03-06 20:56:40 +01:00
.github/workflows run apt update (??) 2025-02-10 19:05:52 +01:00
docker Port deployment to GHA 2023-04-22 16:22:38 +02:00
misc more https in various places 2023-04-22 16:31:41 +02:00
pgidocgen search config: port from cookies to localStorage 2025-03-06 20:56:40 +01:00
tests Fix gst-plugins-base source root path 2020-10-01 21:25:51 +02:00
tools Add a helper for starting a server 2023-04-27 09:25:54 +02:00
.codecov.yml Add codecov support 2017-12-19 10:49:10 +01:00
.dockerignore Make things build in a docker container 2019-06-19 20:35:02 +02:00
.gitignore Drop setup.py 2023-04-21 12:35:23 +02:00
LICENSE Add license file 2017-04-26 21:01:17 +02:00
pgi-docgen Fix shebangs to use correct python interpreter 2020-11-01 01:03:12 +02:00
poetry.lock Update deps 2025-03-06 20:40:28 +01:00
pyproject.toml Update to sphinx 6 2025-01-26 18:31:42 +01:00
README.rst search config: port from cookies to localStorage 2025-03-06 20:56:40 +01:00
setup.cfg flake8: exlcude the theme 2023-04-23 17:30:38 +02:00

.. image:: https://codecov.io/gh/pygobject/pgi-docgen/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/pygobject/pgi-docgen

What is this?
=============

A tool to create Sphinx documentation for GI modules using Python
introspection.

``pgi-docgen create`` introspects the GI module, pulls in the GIR docs and
creates a Sphinx environment.

``pgi-docgen build`` builds HTML documentation using Sphinx.

How do I get started?
---------------------

::

    poetry install
    poetry shell
    # API docs for Gtk/Gst:
    ./tools/build.sh Gtk-3.0 Gst-1.0

The resulting docs can be found in ``_docs/_build``


How do I build docs for private libraries?
------------------------------------------

The following creates docs for the in gnome-music included libgd::

    XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share/gnome-music/ \
    GI_TYPELIB_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/girepository-1.0/ \
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gnome-music/ ./build.sh Gd-1.0


Intersphinx
-----------

There are two ways to reference the online API reference from sphinx
generated documentation:

1) Including the sidebar (needs JavaScript)

   ::

        intersphinx_mapping = {
            'gtk': ('https://lazka.github.io/pgi-docs/#Gtk-3.0/',
                    'https://lazka.github.io/pgi-docs/Gtk-3.0/objects.inv'),
        }

2) Without the sidebar

   ::

        intersphinx_mapping = {
            'gtk': ('https://lazka.github.io/pgi-docs/Gtk-3.0', None),
        }


Licenses
--------

Everything in the ``pgidocgen/gen/data/theme`` sub directory:

    https://github.com/rtfd/readthedocs.org

    MIT License

Fonts in ``pgidocgen/gen/data/theme/static/fonts``

    Lato:
        https://www.latofonts.com

        SIL Open Font License 1.1

    DejaVu Sans Mono:
        https://dejavu-fonts.github.io/

        Public Domain

    FontAwesome:
        https://fontawesome.io

        SIL OFL 1.1

``pgidocgen/gen/data/ext/devhelp_fork.py``

    https://bitbucket.org/birkenfeld/sphinx/

    BSD

``pgidocgen/gen/data/index/jquery-2.2.0.min.js``

    https://jquery.org/

    MIT License

Everything else:

    GNU Lesser General Public License 2.1 or later