{"id":13305589,"url":"https://github.com/slidoapp/sliger","last_synced_at":"2025-12-30T00:36:14.021Z","repository":{"id":169746256,"uuid":"645669709","full_name":"slidoapp/sliger","owner":"slidoapp","description":"Slide of the Tiger","archived":false,"fork":false,"pushed_at":"2024-01-09T08:55:38.000Z","size":621,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-15T06:53:46.035Z","etag":null,"topics":["automation","cli","google-slides","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slidoapp.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-26T07:07:47.000Z","updated_at":"2023-07-31T17:27:28.000Z","dependencies_parsed_at":"2023-12-19T12:15:31.323Z","dependency_job_id":"382f4cf3-2617-4d20-85dd-6dd7851c2f01","html_url":"https://github.com/slidoapp/sliger","commit_stats":null,"previous_names":["slidoapp/sliger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slidoapp%2Fsliger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slidoapp%2Fsliger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slidoapp%2Fsliger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slidoapp%2Fsliger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slidoapp","download_url":"https://codeload.github.com/slidoapp/sliger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221175739,"owners_count":16769876,"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":["automation","cli","google-slides","python"],"created_at":"2024-07-29T17:53:54.529Z","updated_at":"2025-12-30T00:36:13.994Z","avatar_url":"https://github.com/slidoapp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `sliger`\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/slidoapp/sliger/main/static/images/sliger-black.png\" /\u003e \u003cbr /\u003e\n  \u003cstrong\u003eSlide of the tiger\u003c/strong\u003e \u003cbr /\u003e\n  \u003cem\u003eSlide the power of Python (and Jinja2) into Google Slides\u003c/em\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n\n  ![PyPI](https://img.shields.io/pypi/v/sliger)\n  ![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-green.svg)\n  \u003ca href=\"https://pycqa.github.io/isort/\"\u003e\u003cimg src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat\u0026labelColor=ef8336\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" /\u003e\u003c/a\u003e\n  [![Scc Count Badge](https://sloc.xyz/github/slidoapp/sliger/)](https://github.com/slidoapp/sliger/)\n  [![Scc Count Badge](https://sloc.xyz/github/slidoapp/sliger/?category=cocomo)](https://github.com/slidoapp/sliger/)\n\n\u003c/p\u003e\n\n\n## Install\n\n    pip install sliger\n\n## Prerequisites\n\nTo use `sliger` with a specific Google Slides presentation, the following is necessary:\n\n1. Keys to a GCP Service Account (a `.json` file)\n2. The presentation needs to be shared with the email that can be found in 1.\n\n## Usage\n\nIn general, `sliger` needs two pieces of information in order for it to\ndo any automation on a specific Google Slides presentation:\n\n1. The credentials file (the first point in the previous section)\n2. The Presentation ID (assuming the presentation can be found at https://docs.google.com/presentation/d/1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ/edit the presentation ID would be `1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ`)\n\nThere are quite a few commands that the `sliger` supports:\n\n### `duplicate-presentation`\n\nTo duplicate a specific presentation (in this case the presentation with the ID `1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ`) to a new one with a specific name (in this case `'A new presentation test'`), one could run the following command:\n\n    sliger --creds-file mrshu-gslidesexperiments-7cd84ace2933.json --presentation-id 1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ duplicate-presentation --copy-title 'A new presentation test' \n\n### `delete-slide`\n\nTo delete slide number 3, one can run the following:\n\n    sliger --creds-file mrshu-gslidesexperiments-7cd84ace2933.json --presentation-id 1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ delete-slide --id 3\n\n### `duplicate-slide`\n\nTo duplicate slide number 3, one can run the following:\n\n    sliger --creds-file mrshu-gslidesexperiments-7cd84ace2933.json --presentation-id 1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ duplicate-slide --id 3\n\n### `jinjify`\n\n`sliger` also supports [Jinja Templates](https://jinja.palletsprojects.com/en/3.1.x/).\n\nIt also provides a few custom functions, such as\n[`strftime`](https://strftime.org/) which can be used to format dates. For instance the string \n\n```\nHi! Today is {{ strftime(\"%A, %O %B\", now) }}\n```\n\nWould get rendered to\n\n```\nHi! Today is Friday, 2nd September\n\n```\n\nJinjify is also able to render Python functions. Once added the function to `collector.py` and to the variable `func_dict`, `jinjify` will parse the Python output in plain text.\nFor instance the string:\n\n```\n{{ greet_pycon() }}\n```\nWould get render to\n\n```\nHi PyCon Italy! This string is generated from a Python function.\n```\n\nTo render the template directly inside a specific presentation, you can run\n\n    sliger --creds-file mrshu-gslidesexperiments-7cd84ace2933.json --presentation-id 1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ jinjify\n\nNote that for the apostrophes to be picked up correctly, you will need to turn off the **Use smart quotes** option in **Tools -\u003e Preferences**, as described in the [community docs](https://support.google.com/docs/thread/82024200/the-formatting-on-apostrophes-changes-everytime-i-use-the-grammar-spell-check?hl=en).\n\n\n### `imagify`\n\nLooks for text elements whose content is in the following format:\n\n```\n![image](\u003cIMAGE_PATH\u003e)\n```\n\nIt then replaces the found text elements with image elements containing the images found at \n`IMAGE_PATH`. The image needs to be present locally. The `IMAGE_PATH` can be templated with \nJinja. The used Jinja function should return the path to a locally present image that should be \nuploaded.\n\nFor example the following text placeholder will call the `generate_image` Jinja function which \nshould create an image on the disk and return the path to the image. \n\n```\n![image]({{ generate_image }})\n```\n\nTo replace the placeholders with actual images in the presentation, one can run:\n\n    sliger --creds-file mrshu-gslidesexperiments-7cd84ace2933.json --presentation-id 1ijjVtlf9Jq1Rr0xTOMZWcSAUbfl6oA1aaBickwpUdGQ imagify\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslidoapp%2Fsliger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslidoapp%2Fsliger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslidoapp%2Fsliger/lists"}