principia/utils/featured-list-creator
ROllerozxa 66923575b4 Merge in featured-list-creator into utils/
Originally a C program (previously Python script) at https://github.com/principia-game/featured-list-creator for creating fl.cache files for the community site, merge into the main repository so it is with all the other util programs.
2026-06-02 00:31:44 +02:00
..
main.c Merge in featured-list-creator into utils/ 2026-06-02 00:31:44 +02:00
Makefile Merge in featured-list-creator into utils/ 2026-06-02 00:31:44 +02:00
README.md Merge in featured-list-creator into utils/ 2026-06-02 00:31:44 +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

There are two optional arguments for specifying the input JSON file and output fl.cache file. The default values are below:

./featured-list-creator data/data.json fl.cache

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.