A bash script implementing https://github.com/tunapanda/h5p-standalone to view/play H5P files
(Before using this bash script, note that a convenient way to view H5Ps is probably by using a free H5P viewer/editor app such as Lumi.)
h5p-view is a bash script that processes (through a linux command line), for viewing/playing, H5P zipped files by implementing h5p-standalone.
This bash script
-f
option to indicate the H5P filename to be viewed/played;-s
option to indicate whether php or python is used for runninng the server (python or php); and/tmp/h5ptemp
), as a server root directory from which it is run.(The server is started either as php -S 0.0.0.0:8000
or python -m http.server
.)
To use,
git clone https://github.com/justineuro/h5p-view.git
h5p-view
directory issue the command:
./h5p-view -f <name-of-H5P-file> -s <server starter: python or php>
http://0.0.0.0:8000
to play the H5P.For example, to view/play the H5P Quiz (Question Set) example from the Examples and Downloads page at https://h5p.org and use python -m http.server
to start the server:
./h5p-view -f question-set-616.h5p -s python
The H5P can now be viewed/played at http://0.0.0.0:8000
.
Use Ctrl-C
to stop the server; the script consequently removes the temporary files in the /tmp/h5ptemp
folder.
This folder includes (among others):
h5p-view
or h5p-play
- a bash script to create/start the server for playing the H5P file.dist
- a folder (and very important resource) from the h5p-standalone v.3.7.0 distribution that contains the essential files that allow the H5P content to be rendered in a standalone HTML page (i.e., independent of a platform such as certain Learning Management Systems (LMSs)).h5p-all92-check.txt
- a checklist containing information regarding:
a) the 92 H5P examples (of the 54 different types of H5Ps) that are avaliable and may be *re-used* from [h5p.org's Examples and Downloads](https://h5p.org/content-types-and-applications) page as of 2024-February-26 and
b) the success of this script in playing each of these 92 H5P examples. (Note that there are two versions of `Impressive Presentation`; one version has both the `FontAwesome-4.5` and `FontAwesome-4.3` folders. Also, the script fails on four H5Ps: `AR Scavenger`, `Audio Recorder`, `Dialog Cards`, and one example of `Game Map`.)
h5p-view-all
or h5p-play-all
- a bash script that allows you to view/play all the 93 H5P examples in this repository; simply use Ctrl-C
at the command line to end the current example and restart the server for the next H5P example in this directory.
h5p-view by Justine Leon A. Uro is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://github.com/justineuro/h5p-view.