{"id":15020671,"url":"https://github.com/pibooth/pibooth-picture-template","last_synced_at":"2025-10-26T04:30:54.388Z","repository":{"id":40331010,"uuid":"273341458","full_name":"pibooth/pibooth-picture-template","owner":"pibooth","description":"Pibooth plugin to customize the final picture layout using Flowchart Maker","archived":false,"fork":false,"pushed_at":"2023-05-17T05:56:01.000Z","size":2580,"stargazers_count":22,"open_issues_count":3,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T14:22:03.240Z","etag":null,"topics":["flowchart","photo-booth","photobooth","plugin","raspberry-pi","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pibooth.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-06-18T21:14:55.000Z","updated_at":"2024-12-14T15:02:47.000Z","dependencies_parsed_at":"2022-08-09T17:30:46.186Z","dependency_job_id":null,"html_url":"https://github.com/pibooth/pibooth-picture-template","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pibooth%2Fpibooth-picture-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pibooth%2Fpibooth-picture-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pibooth%2Fpibooth-picture-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pibooth%2Fpibooth-picture-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pibooth","download_url":"https://codeload.github.com/pibooth/pibooth-picture-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238258990,"owners_count":19442511,"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":["flowchart","photo-booth","photobooth","plugin","raspberry-pi","raspberrypi"],"created_at":"2024-09-24T19:55:25.054Z","updated_at":"2025-10-26T04:30:47.878Z","avatar_url":"https://github.com/pibooth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n========================\npibooth-picture-template\n========================\n\n|PythonVersions| |PypiPackage| |Downloads|\n\n``pibooth-picture-template`` is a plugin for the `pibooth`_ application.\n\nIt permits to define the **captures/texts positions and sizes** using a template. The template file\n(XML based on `mxGraphModel definition \u003chttps://jgraph.github.io/mxgraph/docs/tutorial.html\u003e`_)\ncan be easily created/edited using the free online diagram software `Flowchart Maker`_. Note that \n\n.. image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/FlowchartMaker.png?raw=true\n   :align: center\n   :width: 500\n   :alt: Flowchart Maker\n   :target: https://app.diagrams.net\n\n\nA set of templates can be found on `GitHub \u003chttps://github.com/pibooth/pibooth-picture-template/tree/master/templates\u003e`_.\n\nThe `fancy.xml \u003chttps://github.com/pibooth/pibooth-picture-template/blob/master/templates/fancy.xml?raw=true\u003e`_\ntemplate is automatically installed by this plugin in ``~/.config/pibooth/picture_template.xml``.\n\nBelow are the pictures generated with this one (learn here how to `Create a template`_):\n\n+---------------------------------------+---------------------------------------+\n|          |fancy1_landscape|           |          |fancy3_landscape|           |\n+---------------------------------------+---------------------------------------+\n|          |fancy2_landscape|           |          |fancy4_landscape|           |\n+-------------------+-------------------+-------------------+-------------------+\n\n+-------------------+-------------------+-------------------+-------------------+\n| |fancy1_portrait| | |fancy2_portrait| | |fancy3_portrait| | |fancy4_portrait| |\n+-------------------+-------------------+-------------------+-------------------+\n\nInstall\n-------\n\n::\n\n    $ pip3 install pibooth-picture-template\n\nConfiguration\n-------------\n\nHere below the new configuration options available in the `pibooth`_ configuration.\n**The keys and their default values are automatically added to your configuration after first** `pibooth`_ **restart.**\n\n.. code-block:: ini\n\n    [PICTURE]\n\n    # Pictures template path, it should contain 8 pages (4 capture numbers and 2 orientations)\n    template = picture_template.xml\n\n.. note:: Edit the configuration by running the command ``pibooth --config``.\n\nPicture rendering\n-----------------\n\nOnly **captures**, **texts** and **images** position/size are rendered. It means that, in addition to the template,\nthe following configuration keys are still taken in account to render the final picture:\n\n* ``[PICTURE][footer_text1]``\n* ``[PICTURE][footer_text2]``\n* ``[PICTURE][text_colors]``\n* ``[PICTURE][text_fonts]``\n* ``[PICTURE][text_alignments]``\n* ``[PICTURE][overlays]``\n* ``[PICTURE][backgrounds]``\n\nPicture orientation\n-------------------\n\nA ``TemplateParserError`` is raised if the requested orientation for the selected\ncaptures number can not be found in the template file.\n\nIf ``[PICTURE][orientation] = auto`` the best orientation is chosen following these\nrules:\n\n* find a template with the correct number of captures and placeholders with same orientation\n  than the captures.\n* find a template with the correct number of captures.\n* find a template with portrait orientation\n\nCreate a template\n-----------------\n\nThe steps below will show how to create a basic template file from scratch using\nthe `Flowchart Maker`_ application.\n\nThis file may contain several templates to define the picture layout for ``1`` /\n``2`` / ``3`` / ``4`` captures and ``portrait`` / ``landscape`` orientations.\n\nStep 1: create a new file\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step1_1|   Click on ``Create New Diagram``.\n\n |step1_2|   Choose a blank diagram. Modify the name of the diagram, it will be\n             the name of the exported file. Click on ``Create``.\n\n |step1_3|   Select the appropriated paper size. A custom one can be defined in\n             *inches*.\n===========  ==================================================================\n\n.. note:: It could be easier to start from an existing file. Click on ``Open Existing Diagram``\n          to load the default template file located in ``~/.config/pibooth/picture_template.xml``\n\nStep 2: placeholder for captures\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step2_1|   Choose a rectangle to define a capture placeholder. Other shapes\n             have no effect and will be considered as rectangles.\n\n |step2_2|   Resize the rectangle to fit the desired size. The rectangle can\n             overflow the border of the page to make design effects. Up to 4\n             rectangles can be drawn.\n\n |step2_3|   The captures placeholders shall be numbered (``1`` to ``4``) to\n             define the captures to be placed inside. Colored shapes give a\n             better overview of the layout but they are not rendered on the\n             final picture.\n===========  ==================================================================\n\n.. note:: Images can also be inserted in the template. Use the option ``To back``\n          or ``To Front`` to chose the displayed order (PNG and JPG format accepted).\n\nStep 3: placeholder for texts\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step3_1|   Choose a text box to represent a text placeholder.\n\n |step3_2|   Resize the text box to fit the desired size. Up to 2 text boxes\n             can be drawn depending on the  `pibooth`_ configuration.\n\n |step2_3|   The text placeholders shall be numbered (``1``, ``2``,\n             ``footer_text1`` or ``footer_text2``) to define the text to be\n             placed inside.\n===========  ==================================================================\n\nStep 4: picture resolution\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step4_1|   Extra properties can be set to the template. Click on the button\n             ``Edit Data`` (close to the paper size settings). Type ``dpi`` in\n             the entry box and click on ``Add Property``.\n\n |step4_2|   By default a resolution of ``600`` DPI is used. It means that the\n             picture size will be 2400x3600 pixels for a resolution of 4x6\n             inches. Set it to the desired value and click on ``Apply``.\n===========  ==================================================================\n\nStep 5: add new a template\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step5_1|   Once the template is created. A new one can be defined for an\n             other captures number or other orientation. Click on ``+`` to add\n             a new page.\n\n|step5_2|    The same picture can be used several times in the template to\n             allows a symmetric template for example (one copy for you, one for\n             your guests).\n===========  ==================================================================\n\nStep 6: save the template file\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n===========  ==================================================================\n |step6_1|   Generate the XML file by clicking ``File``, ``Export as``,\n             ``XML...``.\n\n |step6_2|   Click on ``Export`` (unselect ``Compressed`` if you want to edit\n             the file manually later).\n===========  ==================================================================\n\n.. note:: Instead of running `pibooth`_ each time you want to test the result of\n          your template, use the command ``pibooth-regen``. It will regenerate\n          the existing pictures present in ``~/Pictures/pibooth`` using the new\n          template.\n\n\n.. --- Links ------------------------------------------------------------------\n\n.. _`pibooth`: https://pypi.org/project/pibooth\n\n.. _`Flowchart Maker`: https://app.diagrams.net\n\n.. |PythonVersions| image:: https://img.shields.io/badge/python-3.6+-red.svg\n   :target: https://www.python.org/downloads\n   :alt: Python 3.6+\n\n.. |PypiPackage| image:: https://badge.fury.io/py/pibooth-picture-template.svg\n   :target: https://pypi.org/project/pibooth-picture-template\n   :alt: PyPi package\n\n.. |Downloads| image:: https://img.shields.io/pypi/dm/pibooth-picture-template?color=purple\n   :target: https://pypi.org/project/pibooth-picture-template\n   :alt: PyPi downloads\n\n.. --- Examples ---------------------------------------------------------------\n\n.. |fancy1_landscape| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy1_landscape.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy1_landscape\n\n.. |fancy2_landscape| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy2_landscape.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy2_landscape\n\n.. |fancy3_landscape| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy3_landscape.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy3_landscape\n\n.. |fancy4_landscape| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy4_landscape.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy4_landscape\n\n.. |fancy1_portrait| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy1_portrait.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy1_portrait\n\n.. |fancy2_portrait| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy2_portrait.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy2_portrait\n\n.. |fancy3_portrait| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy3_portrait.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy3_portrait\n\n.. |fancy4_portrait| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/examples/fancy4_portrait.jpg?raw=true\n   :width: 90 %\n   :align: middle\n   :alt: fancy4_portrait\n\n.. --- Tuto -------------------------------------------------------------------\n\n.. |step1_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step1_1_create.png?raw=true\n   :width: 80 %\n   :alt: step1_1_create\n\n.. |step1_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step1_2_blank.png?raw=true\n   :width: 80 %\n   :alt: step1_2_blank\n\n.. |step1_3| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step1_3_size.png?raw=true\n   :width: 80 %\n   :alt: step1_3_size\n\n.. |step2_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step2_1_rectangle.png?raw=true\n   :width: 80 %\n   :alt: step2_1_rectangle\n\n.. |step2_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step2_2_rectangle_resize.png?raw=true\n   :width: 80 %\n   :alt: step2_2_rectangle_resize\n\n.. |step2_3| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step2_3_numbering.png?raw=true\n   :width: 80 %\n   :alt: step2_3_numbering\n\n.. |step3_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step3_1_text.png?raw=true\n   :width: 80 %\n   :alt: step3_1_text\n\n.. |step3_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step3_2_text_resize.png?raw=true\n   :width: 80 %\n   :alt: step3_2_text_resize\n\n.. |step4_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step4_1_property.png?raw=true\n   :width: 80 %\n   :alt: step4_1_property\n\n.. |step4_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step4_2_dpi.png?raw=true\n   :width: 80 %\n   :alt: step4_2_dpi\n\n.. |step5_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step5_1_new_template.png?raw=true\n   :width: 80 %\n   :alt: step5_1_new_template\n\n.. |step5_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step5_2_symetric.jpg?raw=true\n   :width: 80 %\n   :alt: step5_2_symetric\n\n.. |step6_1| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step6_1_xml.png?raw=true\n   :width: 80 %\n   :alt: step6_1_xml\n\n.. |step6_2| image:: https://github.com/pibooth/pibooth-picture-template/blob/master/docs/images/step6_2_export.png?raw=true\n   :width: 80 %\n   :alt: step6_2_export\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpibooth%2Fpibooth-picture-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpibooth%2Fpibooth-picture-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpibooth%2Fpibooth-picture-template/lists"}