inklayers is a command line program that exports layers from an SVG file.

Overview

General 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.

By default the exported files are in SVG format too. If Inkscape is found in the system, an automatic conversion of each single exported layer to Inkscape supported formats (png, pdf, ps, eps) can be done.

A project can be specified using a file format based on JSON, INI, or TOML formats. The project file allows to specify complex organizations of layers to be combined into "slides".

The program automatically generates the code to include the slides within a LaTeX presentation that uses the Beamer package.

If the content of an Inkscape session looks like the one in the following screenshot

the layers exported can be arranged in a slideshow, obtaining the following result:

Rationale

I 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.

I always used Inkscape for drawing pictures for my LaTeX presentations, after moving from the venerable XFig.

However, 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.

With 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.

Although the organization of a slideshow still requires some attention, it is much more affordable.

Compatibility

The extraction of layers in SVG format should work on any system. I tested it under Linux only.

The conversion with Inkscape was tested using Inkscape version 0.91 and 1.1.1 under Ubuntu 20.04.

Installing

From source:

git clone 
   

   
cd 
   

   
pip install -r requirements.txt
pip install --user .

Examples

After installing, to test an example:

cd examples

run

inklayers fishes2.json

The exported layers and their conversions are saved in output/ under the current directory.

Assuming that Imagemagick is installed in the system, the slideshow as animated GIF in the above example can be obtained with the following command:

convert -delay 75 -loop 0 output/*.png slideshow.gif

Reference to layers

Layers can be referenced by label or index (#0, #1, ...), or by layer's name. The first layer has index 0. Layer's interval is supported. Example format: #1-#9.

Layers can be selected for inclusion or exclusion. If include/exclude options collide, the latest prevails.

Project file format

An example project file look like the following:

{
  "input": {
    "filename": "fishes.svg"
  },
  "output": {
    "type": "pdf",
    "filename": "%b-%n.%e",
    "slides": [
      {"include": ["L0"]},
      {"include": ["L0", "L1"]},
      {"include": ["#0-#2"]},
      {"include": ["#0-#3"]},
      {"include": ["#0-#4"]},
      {"include": ["#0-#5"]},
      {"include": ["#0-#6"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#7"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#8"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#9"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#10"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#11"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#12"], "exclude": ["L5 msg:greetings"]},
      {"include": ["#0-#12"], "exclude": ["L5 msg:greetings", "L12 msg:reply"]}
    ]
  }
}

The project file allows to specify:

  • the input file name
  • the format of the generated slides (pdf, png, svg)
  • 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)
  • the list of slides

Each slide can be specified to include and/or exclude a set of layers.

Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
Unpacks things.

$ unp_ unp is a command line tool that can unpack archives easily. It mainly acts as a wrapper around other shell tools that you can find on v

Armin Ronacher 405 Jan 03, 2023
A Reverse Shell Python Packages

A Reverse Shell Python Packages

1 Nov 03, 2021
The most comprehensive, exhaustive, parameterized command-line wordle solver.

Wordle Solver The most comprehensive, exhaustive, parameterized command-line wordle solver. Wordle is a real

Debarghya Das 27 Nov 21, 2022
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 09, 2022
Pequeno joguinho pra você rodar no seu terminal

JokenPython Pequeno joguinho pra você rodar no seu terminal Olá! Joguinho legal pra vc rodar no seu terminal!! (rode no terminal, pra melhor experienc

Scott 4 Nov 25, 2021
Trans is a dependency-free CLI for Google Translate

Trans is a dependency-free CLI for Google Translate

11 Jan 04, 2022
spade is the next-generation networking command line tool.

spade is the next-generation networking command line tool. Say goodbye to the likes of dig, ping and traceroute with more accessible, more informative and prettier output.

Vivaan Verma 5 Jan 28, 2022
A python command line tool to calculate options max pain for a given company symbol and options expiry date.

Options-Max-Pain-Calculator A python command line tool to calculate options max pain for a given company symbol and options expiry date. Overview - Ma

13 Dec 26, 2022
This is a CLI program which can help you generate your own QR Code.

Python-QR-code-generator This is a CLI program which can help you generate your own QR Code. Single.py This will allow you only to input a single mess

1 Dec 24, 2021
A simple file transfer tools, similar to rz / sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar

trzsz A simple file transfer tools, similar to rz/sz but compatible with tmux (control mode), which works with iTerm2 and has a nice progress bar. Why

561 Jan 05, 2023
🐾 Get the nftables counters easier to read

nft-stats Get the nftables counters easier to read It kind of hard to read the output of nft list ruleset so there is a small program parcising the ou

7 Oct 08, 2022
A next-generation CLI and TUI that aims to be your personal assistant for everything competitive programming related. 🚀

Competitive Programming Tool Kit The Competitive Programming Tool Kit (cptk for short), is a command line and terminal user interface (CLI and TUI) th

Alon 4 May 21, 2022
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
Tmux Based Dropdown Dashboard For Python

sextans It's a private configuration and an ongoing experiment while I use Archlinux. A simple drop down dashboard based on tmux. It includes followin

秋葉 4 Dec 22, 2021
Python Library and CLI for exporting MySQL databases

expdb Python library and CLI for exporting MySQL databases Installation Pre-requisites MySQL server Python 3.9+ Using git Clone the repository to your

Devansh Singh 1 Nov 29, 2021
ctree - command line christmas tree

ctree ctree - command line christmas tree It is small python script that prints a christmas tree in terminal. It is colourful and always gives you a d

15 Aug 15, 2022
A Yahtzee-solving python package and command line tool.

yahtzee A Yahtzee-solving python package and command line tool. The algorithm is mathematically guaranteed to have the best strategy. That is, it maxi

David Merrell 0 Aug 19, 2022
Use case: quick JSON processing/restructuring with jq without terminal

alfred-jq Alfred workflow to conveniently process JQ on clipboard based on a jq query Also available at: packal/jq Use case: quick JSON processing/res

T on Meta Mode 5 Sep 30, 2022
A simple command line tool written in python to manage a to-do list

A simple command line tool written in python to manage a to-do list Dependencies: python Commands: todolist (-a | --add) [(-p | --priority)] [(-l | --

edwloef 0 Nov 02, 2021