principia/utils/featured-list-creator
ROllerozxa 6ea828e4d3 Fix up usage instructions for featured-list-creator
Make it more in line with how it is for the other util programs
2026-06-02 00:38:18 +02:00
..
main.c Fix up usage instructions for featured-list-creator 2026-06-02 00:38:18 +02:00
Makefile Merge in featured-list-creator into utils/ 2026-06-02 00:31:44 +02:00
README.md Fix up usage instructions for featured-list-creator 2026-06-02 00:38:18 +02:00

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.