Trying to pack content package h5p.json using h5pcli
Submitted by aeromac on Fri, 05/17/2024 - 17:04
Forums:
Hello,
I'm very new to h5p. I'm trying to use the cli tools to pack a content package instead of manutally but I keep getting "You must specify libraries".
I can sucessfully package a library with librrary.json, but not a content package with h5p.json.
Thanks for your help!
otacke
Fri, 05/17/2024 - 21:49
Permalink
The H5P CLI tool is meant for
The H5P CLI tool is meant for developing libraries and thus does not add an h5p.json file or a content folder. If you want to build content files, you'll have to add your built h5p.json file + content folder to the archive afterwards.
Tugeev
Wed, 11/06/2024 - 13:39
Permalink
Clarification
I am trying to figure out how to create a basic h5p file based on h5p 'hello world' boilerplate. Packaging via h5p CLI is not an issue, I figured that out, but adding content folder and h5p.json is something I where I am stuck now.
{ "title": "Greeting card", "language": "en", "author": "Tutorial user", "license": "CC BY-SA", "licenseVersion": "4.0", "authors":[{ "name":"The author name", "role":"Author" }], "preloadedDependencies": [{ "machineName": "H5P.HelloWorld", "majorVersion": 1, "minorVersion": 0 }], "mainLibrary": "H5P.HelloWorld", "embedTypes": ["iframe"] }I have tried to create an h5p.json based on some of the tutorials with the followingplaced it inside of the packaged .h5p archive, but I am getting an error 'Missing main library @library' when trying to upload the package to Moodle. Could you please tell me what I am missing if that is not too much trouble? The content of the h5p.json are as follows: