Skip to content
justineuroPublic

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(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

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

  • needs a -f option to indicate the H5P filename to be viewed/played;
  • needs a -s option to indicate whether a PHP or Python interpreter is used for running the server; and
  • creates a temporary folder (/tmp/h5ptemp), as a server root directory from which it is run.

(The h5p-view script may start the server as php -S 0.0.0.0:8000 or python -m http.server. A versioned python or php interpreter may also be used, e.g., php8.4 -S 0.0.0.0:8000, python3.12 -m http.server.)

Instructions on use

To use,

  • Clone this repository: git clone https://github.com/justineuro/h5p-view.git
  • At a Linux command line within your h5p-view directory issue the command:
./h5p-view -f <name-of-H5P-file> -s <server starter: python or php interpreter>

(A versioned interpreter may be passed at the command line, e.g., -s python3.12 or -s php8.4.)

  • Point your browser at 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.

Contents of this repository

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.8.2 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 available 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.

MathJax use

MathJax version 4 is used to render the TeX/LaTeX codes included in the H5Ps in this repositoty.

Creative Commons License
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.

Releases

Packages

Contributors

Languages