👨‍💻 about me home CV/Resume 🖊️ Contact Github LinkedIn I’m a Haskeller 📝 Blog Freedom, privacy, tutorials… 🏆 Best of Fizzbuzz makex LuaX lsvg Calculadoira panda upp Haskell todo pwd TPG Nextcloud Git

🆕 February 2023: lsvg is a Lua interpreter specialized to generate SVG images.
🆕 since August 2022: LuaX is a Lua eXtended interpreter/cross compiler providing a bunch of useful modules (statically linked, no dependency). Nice integration with upp (new functions and modules available to extend upp macros) and Pandoc (LuaX can by loaded by the Pandoc Lua interpreter). LuaX was initially made for a soon released but yet confidential project about actor oriented programming!
💣 Kick GAFAMs out (✔️ ǝlƃooפ, ✔️ ʞooqǝɔɐℲ, ✔️ uozɐɯ∀): Stop giving our soul and money to evils, be free and respectful!
📰 Friday 2. April 2021: upp is a panda companion. It’s a Lua-scriptable lightweight text preprocessor.
🆕 since December 2020: Playing with the actor model in an embedded multicore context. C imperative components become C stream pure functions with no side effect ➡️ C low level programming with high level pure functional programming properties 🏆
📰 Saturday 30. January 2021: Playing with Pandoc Lua filters in Lua. panda is a lightweight alternative to abp providing a consistent set of Pandoc filters (text substitution, file inclusion, diagrams, scripts, …).
🆕 Sunday 24. May 2020: Working at EasyMile for more than 6 years. Critical real-time software in C, simulation and monitoring in Haskell ➡️ perfect combo! It’s efficient and funny ;-)

Lua scriptable SVG image generator

Christophe Delord - http://cdelord.fr/lsvg

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

lsvg was initially inspired by svg-lua.

Installation

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

lsvg uses LuaX and makex. All dependencies are installed by make.

$ git clone https://github.com/CDSoft/lsvg
$ cd lsvg
$ make install

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

Usage

Help

$ lsvg

lsvg <Lua scripts> <output files> [-- <other args>]

<Lua scripts>
    Lua script using the svg module
    to build an SVG image in a global variable (img)

<output files>
    Output file names where the image is saved
    (SVG, PNG or PDF)

<other args>
    Arguments given the to input Lua scripts
    through the arg global variable

Example

$ lsvg demo.lua 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