{"id":29381027,"url":"https://github.com/toolleeo/inklayers","last_synced_at":"2025-07-10T03:06:00.157Z","repository":{"id":60487455,"uuid":"432448321","full_name":"toolleeo/inklayers","owner":"toolleeo","description":"inklayers is a command line program that exports layers from an SVG file. It can be used to create slide shows by editing a single SVG file.","archived":false,"fork":false,"pushed_at":"2022-09-30T08:07:11.000Z","size":260,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-09T13:19:45.713Z","etag":null,"topics":["command-line","inkscape","latex","python3","slideshow","svg"],"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/toolleeo.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}},"created_at":"2021-11-27T11:57:53.000Z","updated_at":"2025-06-17T20:24:31.000Z","dependencies_parsed_at":"2022-09-30T08:50:48.389Z","dependency_job_id":null,"html_url":"https://github.com/toolleeo/inklayers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toolleeo/inklayers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolleeo%2Finklayers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolleeo%2Finklayers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolleeo%2Finklayers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolleeo%2Finklayers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toolleeo","download_url":"https://codeload.github.com/toolleeo/inklayers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toolleeo%2Finklayers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264520100,"owners_count":23621879,"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":["command-line","inkscape","latex","python3","slideshow","svg"],"created_at":"2025-07-10T03:05:26.332Z","updated_at":"2025-07-10T03:06:00.151Z","avatar_url":"https://github.com/toolleeo.png","language":"Python","funding_links":[],"categories":["\u003ca name=\"graphics\"\u003e\u003c/a\u003eGraphics"],"sub_categories":[],"readme":"# General description\n\ninklayers is a command line program that exports layers from an SVG file.\nIt can be used to create slide shows by editing a single SVG file.\n\nBy default the exported files are in SVG format too.\nIf [Inkscape](https://inkscape.org/) is found in the system, an automatic conversion of each single exported layer to Inkscape supported formats (png, pdf, ps, eps) can be done.\n\nA project can be specified using a file format based on JSON, INI, or TOML formats.\nThe project file allows to specify complex organizations of layers to be combined into \"slides\".\n\nThe program automatically generates the code to include the slides within a LaTeX presentation that uses the [Beamer package](https://latex-beamer.com/).\n\nIf the content of an Inkscape session looks like the one in the following screenshot\n\n![](screenshot.png)\n\nthe layers exported can be arranged in a slideshow, obtaining the following result:\n\n![](slideshow.gif)\n\n# Rationale\n\nI developed inklayers as a tool to make it easier to work at graphical content that could be used to arrange \"animated\" content in LaTeX Beamer presentations.\n\nI always used Inkscape for drawing pictures for my LaTeX presentations, after moving from the venerable [XFig](http://mcj.sourceforge.net/).\n\nHowever, working with one file for each \"slide\" was really cumbersome, mainly because the slides typically contain very similar content (they are meant to compose a slideshow, after all...), and making changes to one slide often requires to propagate the changes to many other files, making the approach almost unfeasible.\n\nWith inklayers there is only one SVG files containing all the graphical material of the slideshow, and changes to one layer are automatically replicated to all the slides during the export.\n\nAlthough the organization of a slideshow still requires some attention, it is much more affordable.\n\n# Compatibility\n\nThe extraction of layers in SVG format should work on any system.\nI tested it under Linux only.\n\nThe conversion with Inkscape was tested using Inkscape version 0.91 and 1.1.1 under Ubuntu 20.04.\n\n# Installing\n\nFrom source:\n\n```\ngit clone \u003crepository\u003e\n```\n\n```\ncd \u003ccloned-directory\u003e\n```\n\n```\npip install -r requirements.txt\n```\n\n```\npip install --user .\n```\n\n# Examples\n\nAfter installing, to test an example:\n\n```\ncd examples\n```\n\nrun\n\n```\ninklayers fishes2.json\n```\n\nThe exported layers and their conversions are saved in `output/` under the current directory.\n\nAssuming that [Imagemagick](https://imagemagick.org/) is installed in the system, the slideshow as animated GIF in the above example can be obtained with the following command:\n\n```\nconvert -delay 75 -loop 0 output/*.png slideshow.gif\n```\n\n# Reference to layers\n\nLayers can be referenced by label or index (`#0`, #`1`, ...), or by layer's name.\nThe first layer has index 0.\nLayer's interval is supported. Example format: `#1-#9`.\n\nLayers can be selected for inclusion or exclusion.\nIf include/exclude options collide, the latest prevails.\n\n# Project file format\n\nAn example project file look like the following:\n\n```\n{\n  \"input\": {\n    \"filename\": \"fishes.svg\"\n  },\n  \"output\": {\n    \"type\": \"pdf\",\n    \"filename\": \"%b-%n.%e\",\n    \"slides\": [\n      {\"include\": [\"L0\"]},\n      {\"include\": [\"L0\", \"L1\"]},\n      {\"include\": [\"#0-#2\"]},\n      {\"include\": [\"#0-#3\"]},\n      {\"include\": [\"#0-#4\"]},\n      {\"include\": [\"#0-#5\"]},\n      {\"include\": [\"#0-#6\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#7\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#8\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#9\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#10\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#11\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#12\"], \"exclude\": [\"L5 msg:greetings\"]},\n      {\"include\": [\"#0-#12\"], \"exclude\": [\"L5 msg:greetings\", \"L12 msg:reply\"]}\n    ]\n  }\n}\n```\n\nThe project file allows to specify:\n\n- the input file name\n- the format of the generated slides (pdf, png, svg)\n- the format of the filenames of the slides (`%b` is the basename of the input file, `%n` is an increasing ordinal number, `%e` is the extension)\n- the list of slides\n\nEach slide can be specified to include and/or exclude a set of layers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolleeo%2Finklayers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoolleeo%2Finklayers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoolleeo%2Finklayers/lists"}