Skip to content
/ lsvg Public

lsvg is a Lua interpreter specialized to generate SVG images.

Notifications You must be signed in to change notification settings

CDSoft/lsvg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lua scriptable SVG image generator

lsvg is a Lua interpreter specialized to generate SVG images.

It is based on LuaX and uses a pure Lua library to generate SVG images. It optionally requires ImageMagick to make PNG, JPEG or PDF images.

lsvg was initially inspired by svg-lua.

Installation

lsvg is available on Github: https://github.com/CDSoft/lsvg.

lsvg uses LuaX.

$ git clone https://github.com/CDSoft/luax && ninja -C luax install
$ git clone https://github.com/CDSoft/lsvg
$ cd lsvg
$ ninja install

If LuaX is not installed yet, the first compilation may take a while...

Precompiled LuaX binaries

In case precompiled binaries are needed (GNU/Linux, MacOS, Windows), some can be found at cdelord.fr/pub. These archives contain lsvg as well as some other softwares more or less related to LuaX.

Usage

Help

$ lsvg -h

Usage: lsvg [-h] [-v] [-o output] <input> [<input>] ...

SVG generator scriptable in LuaX

Arguments after "--" are given to the input scripts

Arguments:
   input                 Lua script using the svg module to build an SVG image

Options:
   -h, --help            Show this help message and exit.
   -v                    Print version
   -o output             Output file name (SVG, PNG, JPEG or PDF)
   --MF name             Set the dependency file name (implies `--MD`)
   --MD                  Generate a dependency file

For more information, see https://github.com/CDSoft/lsvg

Example

$ lsvg demo.lua -o demo.svg -- lsvg demo

This command stores {"lsvg", "demo"} in arg, executes demo.lua and produces demo.svg:

demo.svg

Documentation

No documentation yet. Just read the source code...

License

lsvg is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

lsvg is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with lsvg.  If not, see <https://www.gnu.org/licenses/>.

For further information about lsvg you can visit
http://cdelord.fr/lsvg

About

lsvg is a Lua interpreter specialized to generate SVG images.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published