mirror of
https://github.com/Bithack/principia.git
synced 2026-06-24 02:04:08 +00:00
|
|
||
|---|---|---|
| .. | ||
| main.c | ||
| Makefile | ||
| README.md | ||
Featured List Creator
This is a C program that generates a featured list file (fl.cache) from JSON data and images, which is served by the Principia community site to display featured levels and getting started links in the main menu.
The program requires the jansson library for JSON parsing, and will attempt to statically link against it by default. You can do make STATIC=0 to link dynamically instead.
Usage
featured-list-creator <input-json> <output-file>
JSON Format
The format of the input JSON file is as follows:
{
"featured_levels": [
{
"id": 1,
"name": "Name",
"author": "Author",
"jpeg_image": "level_thumbnail.jpg"
}
[...]
],
"gettingstarted_list": [
{
"name": "Link 1",
"link": "https://example.org"
}
[...]
]
}
The paths to the JPEG images are relative to the current working directory when running the program.