{"id":46018880,"url":"https://github.com/pierreay/scapex","last_synced_at":"2026-03-01T02:03:30.464Z","repository":{"id":285578155,"uuid":"958591846","full_name":"pierreay/scapex","owner":"pierreay","description":"ScapeX — The command-line Inkscape eXporter, Makefile and LaTeX friendly","archived":false,"fork":false,"pushed_at":"2025-11-25T08:52:19.000Z","size":354,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T05:58:13.725Z","etag":null,"topics":["animation","builder","exporter","inkscape","latex","makefile"],"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/pierreay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-01T12:57:41.000Z","updated_at":"2025-11-25T08:52:23.000Z","dependencies_parsed_at":"2025-04-01T15:21:57.566Z","dependency_job_id":"b4ee5895-6368-4a3f-960e-015033b4e113","html_url":"https://github.com/pierreay/scapex","commit_stats":null,"previous_names":["pierreay/inkscape2latex"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/pierreay/scapex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreay%2Fscapex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreay%2Fscapex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreay%2Fscapex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreay%2Fscapex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierreay","download_url":"https://codeload.github.com/pierreay/scapex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreay%2Fscapex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29958406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animation","builder","exporter","inkscape","latex","makefile"],"created_at":"2026-03-01T02:03:29.822Z","updated_at":"2026-03-01T02:03:30.449Z","avatar_url":"https://github.com/pierreay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/pierreay/scapex\"\u003e\n        \u003cimg align=\"center\" src=\"https://github.com/pierreay/scapex/raw/master/doc/logo.svg\" width=\"300\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eScapeX\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eThe command-line Inkscape eXporter, Makefile and LaTeX friendly\u003c/h4\u003e\n\n\u003c!-- TODO: When the screencast is done... --\u003e\n\u003c!-- \u003cp align=\"center\"\u003e --\u003e\n\u003c!--     \u003ca href=\"https://github.com/pierreay/scapex/raw/master/doc/demo.gif\"\u003e --\u003e\n\u003c!--         \u003cimg src=\"https://github.com/pierreay/scapex/raw/master/doc/demo.gif\"/\u003e --\u003e\n\u003c!--     \u003c/a\u003e --\u003e\n\u003c!-- \u003c/p\u003e --\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://inkscape.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Inkscape-e0e0e0?style=for-the-badge\u0026logo=inkscape\u0026logoColor=080A13\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.latex-project.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/latex-%23008080.svg?style=for-the-badge\u0026logo=latex\u0026logoColor=white\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.python.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54\"\u003e\u003c/a\u003e\n    \u003cbr\u003e\n    \u003ca href=\"https://pypi.org/project/scapex/\"\u003e\u003cimg src=\"https://badge.fury.io/py/scapex.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**ScapeX** is a **Python** utility that invokes **Inkscape** to export an **SVG** drawing into a single **PDF** file or a set of **PDFs**.\n\nIt is designed to export **high-quality drawings**, graphics, and diagrams, hence the choice of the PDF format for vector graphics.\nThe design of the command-line interface makes it suitable for on-the-fly usage or integration in a **Makefile**-based build system (*e.g.*, for **LaTeX**).\nIn addition, thanks to its `fragments` export feature, this tool can be used to **create animated slides** (*e.g.*, using **Beamer**).\n\n# Features\n\n- Command-line interface with **autocompletion**\n- Each **figure export** can be **configured via a sidecar TOML** file\n- The `fragments` export mode **creates multiple PDFs** based on **arbitrary layer combinations**\n- **Fonts rendering** can be performed either by **Inkscape** during *export* or by **LaTeX** during *compilation*\n- **Out-of-tree** export capability\n\n# Installation\n\nThe easiest way to install ScapeX is to use [PipX](https://pipx.pypa.io/stable/), a [Pip](https://pip.pypa.io/en/stable/) wrapper that automatically creates a [virtual environment](https://docs.python.org/3/library/venv.html).\n\n```bash\npipx install scapex\n````\n\nTo enable Zsh autocompletion, add the following to your `~/.zshrc`:\n\n\u003e [!WARNING]\n\u003e This must be added **before** the very first call to `compinit` (which initializes the autocompletion system).\n\n```zshrc\nwhich scapex \u003e/dev/null \u0026\u0026 fpath+=($(scapex --completions-zsh))\n```\n\nRestart your shell and you are ready to go!\n\n\u003e [!TIP]\n\u003e Want to try it directly from the repository? See [CONTRIBUTING.md](./CONTRIBUTING.md)!\n\n# Usage\n\nThe simplest usage is to export a single PDF file, optionally into another build directory:\n\n```bash\nscapex -o BUILD_DIRECTORY INPUT.svg\n```\n\n## Fragments (animations)\n\nTo create animated exports, first generate a TOML configuration file for your diagram:\n\n```bash\nscapex --generate INPUT.svg\n```\n\nOpen the file and adjust its configuration according to the layer identifiers defined in Inkscape:\n\n```bash\nvim INPUT.toml\n```\n\nOnce ready, perform the `fragments` export:\n\n```bash\nscapex --fragments INPUT.svg\n```\n\n## Interfacing with LaTeX (fonts rendering)\n\nFonts rendering can be delegated to LaTeX using the `--fonts-engine=latex` option.\nThis will create a `.pdf_tex` sidecar file to the `.pdf`, containing the text that will be processed by LaTeX when including the exported PDF with `\\input{FILE.pdf_tex}`:\n\n```bash\nscapex --fonts-engine=latex INPUT.svg\n```\n\n## Interfacing with Makefile\n\nScapeX can also be used inside a Makefile, enabling automatic export when a drawing is modified and proper dependency handling.\nSee the self-documented example under [examples/Makefile](./examples/Makefile).\n\n## Getting help\n\nFor additional usage, see `scapex -h`:\n\n```bash\nusage: scapex [-h] [-v] [-o OUTPUT_DIR] [--generate]\n              [--fonts-engine {latex,inkscape}] [--fragments | --no-fragments]\n              [--completions-zsh]\n              [SVG_FILE]\n\nThe command-line Inkscape eXporter, Makefile and LaTeX friendly\n\npositional arguments:\n  SVG_FILE              Inkscape drawing in SVG format to export\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --verbose         Increase verbosity if set\n  -o, --output-dir OUTPUT_DIR\n                        Set the output directory [default = .]\n  --generate            Generate a TOML template configuration file for input\n                        SVG file (instead of exporting)\n  --fonts-engine {latex,inkscape}\n                        Set the font rendering engine [default = inkscape]\n  --fragments, --no-fragments\n                        Enable (or disable) fragments exportation (instead of\n                        full exportation) [default = False]\n  --completions-zsh     Print the path of the directory containing the Zsh\n                        autocompletion script (instead of exporting)\n```\n\n# Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreay%2Fscapex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierreay%2Fscapex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreay%2Fscapex/lists"}