← Back to all projects

Lua Graph Generator

Lua · Systems · Open Source

A console application written in Lua that fetches data from an API and generates graph .png files based on the requested data.

It uses oocairo to draw pixels directly onto an image.

Generated graph

Source · 4 files

README.md
Console app that grabs data from the website API. Info is displayed on the console, while graphs are put into images.

# Dependencies (install in order):
- lua (https://www.lua.org/)
- OpenSSL (https://www.openssl.org/)
    - libssl-dev also needed
- luasec (https://github.com/lunarmodules/luasec)
    - luasocket *might* be needed, I installed it before luasec but *in theory* it doesn't need it. If you have errors using the https request then install it.
        (https://github.com/lunarmodules/luasocket)
- cairo (https://www.cairographics.org/download/)
    - libcairo2-dev also needed
- oocairo (https://github.com/awesomeWM/oocairo)
    - documentation (https://geoffrichards.co.uk/lua/oocairo/)
- cjson (https://github.com/openresty/lua-cjson)

Some of these are installed easier using LuaRocks (https://luarocks.org/)

# How to run:
    - Install the dependencies
    - Run the following command while in the root directory of the project:
        ```
        lua main.lua
        ```
← Back to all projects