{"id":16589174,"url":"https://github.com/ixjlyons/qtgallery","last_synced_at":"2025-10-29T09:31:42.283Z","repository":{"id":38388499,"uuid":"289828704","full_name":"ixjlyons/qtgallery","owner":"ixjlyons","description":"sphinx-gallery scraper for Qt examples and tutorials","archived":false,"fork":false,"pushed_at":"2023-12-11T22:29:35.000Z","size":47,"stargazers_count":3,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-02T00:31:49.174Z","etag":null,"topics":["documentation","qt","sphinx-extension"],"latest_commit_sha":null,"homepage":"https://qtgallery.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ixjlyons.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-24T04:35:53.000Z","updated_at":"2024-08-30T07:56:11.000Z","dependencies_parsed_at":"2022-08-25T03:00:46.018Z","dependency_job_id":null,"html_url":"https://github.com/ixjlyons/qtgallery","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixjlyons%2Fqtgallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixjlyons%2Fqtgallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixjlyons%2Fqtgallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ixjlyons%2Fqtgallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ixjlyons","download_url":"https://codeload.github.com/ixjlyons/qtgallery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238803222,"owners_count":19533273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","qt","sphinx-extension"],"created_at":"2024-10-11T23:08:00.100Z","updated_at":"2025-10-29T09:31:41.881Z","avatar_url":"https://github.com/ixjlyons.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\nqtgallery\n=========\n\n.. image:: https://badge.fury.io/py/qtgallery.svg\n   :target: https://badge.fury.io/py/qtgallery\n   :alt: PyPI Package\n\n.. image:: https://readthedocs.org/projects/qtgallery/badge/?version=latest\n   :target: https://qtgallery.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n.. image:: https://github.com/ixjlyons/qtgallery/actions/workflows/tests.yml/badge.svg\n   :target: https://github.com/ixjlyons/qtgallery/actions?workflow=Tests\n   :alt: Tests\n\nScraper for generating a `sphinx-gallery`_ of Qt windows.\n\nThis repository serves both as a library for grabbing renderings of Qt windows\nto add to your own ``sphinx-gallery`` config as well as an example of its usage.\n\n\nInstallation\n============\n\n``qtgallery`` is available on PyPI_, so it can be installed with pip::\n\n    $ pip install qtgallery\n\nTo try out the repository and get a feel for how it is configured, clone the\nrepository and install a few extra requirements to build the documentation\nlocally::\n\n    $ git clone git@github.com:ixjlyons/qtgallery.git\n    $ cd qtgallery/docs\n    $ pip install -r requirements\n    $ make html\n\nOpen up ``docs/_build/html/index.html`` to see built docs. They're currently\nbeing hosted by Read the Docs as well:\n\nhttps://qtgallery.readthedocs.io/\n\n\nConfiguration\n=============\n\nTo use ``qtgallery`` in your own documentation, start by setting up a normal\n`sphinx-gallery`_. Setting up a simple matplotlib example to get started might\nbe a good idea.\n\nNext, add ``qtgallery`` to ``extensions``:\n\n.. code-block:: python\n\n   # sphinx conf.py\n   extensions = {\n       ...\n       'sphinx_gallery.gen_gallery',\n       'qtgallery',\n    }\n\nNext, add the ``qtgallery`` `image scraper`_ and `reset function`_ to\n``sphinx_gallery_conf`` as follows:\n\n.. code-block:: python\n\n   # sphinx conf.py\n   import qtgallery\n\n   sphinx_gallery_conf = {\n       ...\n       'image_scrapers': (qtgallery.qtscraper, ...),\n       'reset_modules': (qtgallery.reset_qapp, ...),\n   }\n\nThe image scraper is responsible for generating a rendering of all currently\nshown top level windows.\n\nThe reset function is for handling ``QApplication``, allowing you to instantiate\nthe ``QApplication`` singleton in each example and preventing the Qt event loop\nfrom running and hanging the docs build. That is, examples that run ok standalone\nshould behave ok in generating the gallery.\n\nDisplay Configuration\n---------------------\n\n``qtgallery`` also has its own sphinx configuration variable\n(``qtgallery_conf``) for configuring the virtual display used. The defaults are\nlisted below (also found in ``qtgallery/__init__.py``). The values are passed\nalong in constructing a PyVirtualDisplay_ ``Display``:\n\n.. code-block:: python\n\n   # sphinx conf.py\n   qtgallery_conf = {\n        \"xvfb_size\": (640, 480),\n        \"xvfb_color_depth\": 24,\n        \"xfvb_use_xauth\": False,\n        \"xfvb_extra_args\": [],\n    }\n\n\nUsage\n=====\n\nUsage pretty much follows `sphinx-gallery`_, but one tip is that you can control\n*where* the window is rendered via ``show()``. See the `iterative\nexample`_ to see how this works.\n\nRead the Docs\n-------------\n\nOn Read the Docs, ``xvfb`` is required. See their documentation for `installing\napt packages`_. This repository also serves as an example (see\n``.readthedocs.yml``).\n\n\n.. _sphinx-gallery: https://sphinx-gallery.github.io/stable/index.html\n.. _PyPI: https://pypi.org/project/qtgallery/\n.. _image scraper: https://sphinx-gallery.github.io/stable/configuration.html#image-scrapers\n.. _reset function: https://sphinx-gallery.github.io/stable/configuration.html#resetting-modules\n.. _PyVirtualDisplay: https://github.com/ponty/PyVirtualDisplay\n.. _iterative example: https://qtgallery.readthedocs.io/en/latest/auto_examples/iterative.html#sphx-glr-auto-examples-iterative-py\n.. _installing apt packages: https://docs.readthedocs.io/en/stable/config-file/v2.html#build-apt-packages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixjlyons%2Fqtgallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fixjlyons%2Fqtgallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fixjlyons%2Fqtgallery/lists"}