Skip to content
/ lsvg Public

Moved to Codeberg, this repo is just a (temporary) mirror -- 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

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

Releases

It is strongly recommended to build Lsvg from source, as this is the only reliable way to install the exact version you need.

However, if you do require precompiled binaries, this page offers a selection for various platforms: https://cdelord.fr/pub.

Installation

lsvg is available on Codeberg: https://codeberg.org/cdsoft/lsvg.

lsvg uses LuaX and Bang.

LuaX

$ git clone https://codeberg.org/cdsoft/luax
$ cd luax
$ ./bootstrap.sh
$ ninja install

Bang

$ git clone https://codeberg.org/cdsoft/bang
$ cd bang
$ ./boot.lua
$ ninja install

Lsvg

$ git clone https://codeberg.org/cdsoft/lsvg
$ cd lsvg
$ bang
$ ninja install

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

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://codeberg.org/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
https://codeberg.org/cdsoft/lsvg

About

Moved to Codeberg, this repo is just a (temporary) mirror -- lsvg is a Lua interpreter specialized to generate SVG images.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published