Create h5p file from other h5p files
Hi everyone, I've four H5P packages - similar structure to the Interactive Video. Each package has it's own repository and it's own CI that uses semantic-release for automatic versioning and release generation. Furthermore I created a plugin for semantic-release that updates the library.json on each release and creates a h5p file.
Finally, I've four h5p files - one for each repository. The next way would be to install them in my H5P environment but unfortunately I cannot install them because 2 of them are depending on each other - similar to the issue described here: https://h5p.org/node/936076
So does anyone know if I can "build" a new h5p file based on the h5p files I already have, e.g.:
$ h5p pack h5p-file1.h5p h5p-file2.h5p h5p-file3.h5p h5p-file.h5p final-lib.h5p
I already tried this, but it tells me "You must specify libraries".
I know it's not best practice to have circular dependencies but my H5P packages are based on the official Interactive Video which has such circular dependencies.
otacke
Thu, 02/04/2021 - 16:36
Permalink
Hi!The H5P cli tool works on
Hi!
The H5P cli tool works on git repositories, not on H5P files.
If you want to work with built H5P library files, all you would need to do is take the folders inside the H5P library archive (you know that this technically is a zip file, do you?) and put them into one H5P archive. So, for instance if you had ...
you would simple put them into one archive
Keep in mind to use the D and the X flag for zip, so e.g.
It may be more convenient, however, to clone all the repositories (e.g. library1 and library2 and library3) required into one folder and inside that folder run
where library1 is the main library and the h5p-cli tool will recursively add all the dependencies defined in library1 or run
if you want to name libraries explicitly.
Best,
Oliver
mstimvol
Thu, 02/04/2021 - 17:51
Permalink
Thank you in advance, Oliver!
Thank you in advance, Oliver! That solved my issue. I know that it would be more convenient to clone all repositories. The optimal solution would be a multi-project-pipeline (in Gitlab). Unfortunately I've no premium version, so the only way would be to use the CI of one of the repositories. But I don't like this approach yet... for the first time the automatic versioning and package creation should be enought. Maybe, sometime the multi-project pipelines become available in the Gitlab Community Edition, so I can perfectly do everything automatically :-) But for now, thank you in advance!