Pleaase share more detailed examples for porgramatically creaating H5P files.
Submitted by fishfree on Mon, 06/29/2026 - 14:10
Forums:
Could someone share example codes to show how to porgramatically creaate H5P files with https://github.com/h5p/h5p-cli or https://github.com/h5p/h5p-editor-php-library?
otacke
Tue, 06/30/2026 - 00:01
Permalink
As mentioned on github two
As mentioned on github two weeks ago: The H5P CLI is not meant to programatically creating H5P files, neither is the h5p-php-library. The former is a local development environment, the latter is the core library of H5P (you could call it a runtime engine maybe).
And also as mention, here on the forum: I'd begin by understanding what the semantics.json file is and how it works. See https://h5p.org/documentation/developers/h5p-specification for starters.
Then you will know what the content.json file is that is also described in the specification - and it's the same structure that you will find in databases of H5P integrations.
Once you get all that, you merely need to build yourself a set of functions that take input from sources and mold them into the content.json structure. Et voilà, you programmatically created H5P content.
dgcruzing
Mon, 10/05/2026 - 08:32
Permalink
Look to Lumi
They could jump into the Lumi GitHub and find a whole set of goodies that would give them this very ability.
And Oliver, thanks for the theme post, as I just came across it in the past few days.
This might interest you: a Franksten build I got going over the weekend. It still needs some tidying up, and I need to check the git licencing before I load anything, but I'm thinking of dumping the build core so others can play with it.
Noted; it's not for the faint-hearted and/or someone who is not comfortable with using the new agent and CLI-type builds
If you're interested, here are a few build notes.
https://advancedcskills.notion.site/build-notes-3efd50fbce6680d7bb8ad7f9...