Edit h5p file
Submitted by agutierrez on Mon, 06/01/2015 - 16:24
I am trying to edit h5p file to add xAPI integration with Learning lockers. I am getting this error when I try to uplaod the new h5p file to my drupal site (working correctly with others h5p files) I am working on a Mac, but I try with Windows and it is not working.
I am doing the following:
- Download a h5p file from the website, for example Multiple choice (http://h5p.org/multichoice)
- Change it format for .h5p to .zip
- Extract .zip file, and I get all the directory
- Make a small change (a log for example), if I dont change anything it is not workign either
- Make a zip file from this file directory
- Change the format from .zip to .h5p
- Try to upload, and I am getting this error:
- Warning: file_get_contents(/var/www/html/drupal/sites/default/files/h5p/temp/h5p-556c66113eeb6/713/library.json): failed to open stream: No such file or directory in H5PValidator->getJsonData() (line 1174 of /var/www/html/drupal/sites/all/modules/h5p/library/h5p.classes.php).
- Could not find library.json file with valid json format for library 713
- A valid content folder is missing
- A valid main h5p.json file is missing
- The uploaded file was not a valid H5P package
Who can I create a .h5p file from a directory?How can I edit the example to add xAPI support?
Thanks in advance,
Tue, 06/02/2015 - 15:46
Normally when we see this
Normally when we see this message it's because you've been in the wrong level when you zipped the folder.. You should have H5P.Multichoice in the root of the zip file.
Also see http://h5p.org/development-environment on how you may set up a development environment for H5P where you won't have to go back and forth between .zip and .h5p. On a sub page there you'll also learn about the H5P CLI allowing you to run the h5p pack command to pack libraries from your development folder.
Thu, 08/29/2019 - 22:07
Compress files with windows command line and 7-zip
7z.exe a -tzip h5pTEST.h5p -ir!*.? -i!*.json
-t (set Type of archive) switch
-i (Include filenames) switch
<recurse_type> ::= r[- | 0]
'*' means a sequence of arbitrary characters.
'?' means any character.
To view the contents of zip folder run:
7z.exe l h5pTEST.h5p
l (List contents of archive) command
Tue, 01/19/2021 - 09:32
"7z.exe" no se reconoce como un comando interno o externo, progr
I cant use that
Sat, 04/10/2021 - 17:28
Have you tried Send to > Compressed (zipped) folder?
Instead of using 7zip, just use Send to > Compressed (zipped) folder in Windows 10. We tested it and it works.
Fri, 09/10/2021 - 06:44
Errors if zipped
I have downloaded an h5p package via the "reuse" option,
changed it to a zip
extracted the contents
rezipped the contents only, (using send to> compressed folder)
change the file extension to h5p
upload to wordpress
When I use h5pcli I'm guessing from digging the forums that we use "pack" but when I use this the h5p folder created is empty.
I cannot find clear instructions on what h5pcli command is required here. The example is very far from contextualised, and the Hello World tutorial completely glosses over this section of the process.
Any assistance would be much appreciated.