Question about automation with scripts
Submitted by Vulnin on Tue, 07/09/2019 - 12:35
Forums:
Hi there,
I like to ask you about the following idea. I got multiple choice questions in an arbitrary format and I like to code a script which uses H5P to implement these in a video. I got the time stamps for the places of the questions in a separate way. So my questions are: Is it ok for you to have a script which uses H5P and do you think this is even possible?
Thanks a lot for your answers,
regards
Vulnin
otacke
Wed, 07/10/2019 - 09:26
Permalink
Hi Vulnin!You can unzip an
Hi Vulnin!
You can unzip an H5P file and inside will find the file content/content.json. It's a a plain text file in JSON format holding all the parameters for the content type, and the structure is defined by the semantics.json file of each content type. You can learn more about it in the H5P specification.
So in short: Yes, it's possible build H5P content programmatically and it's not that complicated. Sebastian Rettig did exactly that for Flash Cards. I am not sure what the real question behind "Is it ok for you to have a script which uses H5P" is, but of course you're welcome to write your own scripts if you want to.
Cheers,
Oliver
Shake
Fri, 06/03/2022 - 17:51
Permalink
more details
hi otacke, where can i get more details on how to create content programatically? do you have any developers you can recommend? we are trying to use H5P for a project
otacke
Fri, 06/03/2022 - 21:57
Permalink
Hi!You could reach out to
Hi!
You could reach out to Sebastian, for instance, who wrote the cli script that allows to create some contents programmatically.
Best,
Oliver
Shake
Sat, 06/04/2022 - 17:26
Permalink
Where is Sebastians Info
Hi Oliver. thanks for taking the time to reply. I dont know how to get in touch with Sebastian.
Can you help out?
otacke
Mon, 06/06/2022 - 11:49
Permalink
Check https://lumi.education
Check https://lumi.education for contact info.
Shake
Sat, 06/04/2022 - 17:29
Permalink
i think i did
i actually think i did reach out to him
https://h5p.org/comment/20554#comment-20554
lets see if he helps out.
leturf123
Thu, 09/12/2019 - 16:49
Permalink
In Drupal, I built a wizard
In Drupal, I built a wizard for teachers that automatically creates large pieces of h5p content using various content types.
It's laborious but not that complicated to build out the JSON array that H5P uses. Maybe there was a better way but you can basically just reverse-engineer what a finished H5P's JSON array looks like.
Try saving a video with some time-stamps, and look at the JSON. Create a form that creates that JSON and saves a new node, or whatever it's called in Wordpress etc.
Not much more I can say. It's just a manual approach that ended working really well for me. Teachers can create content with 60+ questions in around two minutes.