#/bin/bash
################################################################################
# Build the H5PEditor.ScormFile H5P file.
################################################################################
# Go to the Desktop.
cd ~/Desktop/
# Clone the repo.
git clone https://github.com/pavloshevchuk/h5p-editor-scorm
# Go into that cloned repo.
cd ~/Desktop/h5p-editor-scorm
# Clean up cruft that is not needed for the H5P file.
find . -type f \( -name '.DS_Store' -o -name '.gitignore' -o -name 'LICENSE' -o -name 'README.md' \) -exec rm {} \;
find . -type d -name '.git' -exec rm -rf {} \;
# Create the library directory and copy files into it.
mkdir H5PEditor.ScormFile && mv {scripts,styles,*.json} H5PEditor.ScormFile
# Create the 'h5p.json' file.
echo '{
"title": "H5PEditor.ScormFile",
"language": "en",
"author": "Pavlo Shevchuk",
"license": "cc-by-sa",
"preloadedDependencies": [
{
"machineName": "H5PEditor.ScormFile",
"majorVersion": 1,
"minorVersion": 0,
"patchVersion": 8
}
],
"mainLibrary": "H5PEditor.ScormFile",
}' > h5p.json
# Now Zip that all up into a compressed `.h5p` archive like this.
zip -rq ../H5PEditor.ScormFile.h5p *
################################################################################
# Build the H5P.ScormFontAwesome H5P file.
################################################################################
# Go to the Desktop.
cd ~/Desktop/
# Clone the repo.
git clone https://github.com/h5p/font-awesome
# Go into that cloned repo.
cd ~/Desktop/font-awesome
# Clean up cruft that is not needed for the H5P file.
find . -type f \( -name '.DS_Store' -o -name '.gitignore' -o -name 'LICENSE' -o -name 'README.md' \) -exec rm {} \;
find . -type d -name '.git' -exec rm -rf {} \;
# Create the library directory and copy files into it.
mkdir FontAwesome && mv {*.css,*.otf,*.eot,*.svg,*.ttf,*.woff*,*.json} FontAwesome
# Create the 'h5p.json' file.
echo '{
"title": "FontAwesome",
"language": "en",
"license": "cc-by-sa",
"preloadedDependencies": [
{
"machineName": "FontAwesome",
"majorVersion": 4,
"minorVersion": 5,
"patchVersion": 4
}
],
"mainLibrary": "FontAwesome"
}' > h5p.json
# Now Zip that all up into a compressed `.h5p` archive like this.
zip -rq ../H5P.FontAwesome.h5p *
################################################################################
# Build the H5P.Scorm H5P file.
################################################################################
# Go to the Desktop.
cd ~/Desktop/
# Clone the repo.
git clone https://github.com/pavloshevchuk/h5p-scorm
# Go into that cloned repo.
cd ~/Desktop/h5p-scorm
# Clean up cruft that is not needed for the H5P file.
find . -type f \( -name '.DS_Store' -o -name '.gitignore' -o -name 'LICENSE' -o -name 'README.md' \) -exec rm {} \;
find . -type d -name '.git' -exec rm -rf {} \;
# Create the library directory and copy files into it.
mkdir H5P.Scorm && mv {css,js,*.json} H5P.Scorm
# Create the content directory and copy files into it.
mkdir content && mv icon.svg content
echo '{
"title": "SCORM/xAPI",
"language": "en",
"author": "Pavlo Shevchuk",
"license": "cc-by-sa",
"preloadedDependencies": [
{
"machineName": "H5P.Scorm",
"majorVersion": 1,
"minorVersion": 1,
"patchVersion": 16
}
],
"mainLibrary": "H5P.Scorm",
"embedTypes": [
"div"
]
}' > h5p.json
# Now Zip that all up into a compressed `.h5p` archive like this.
zip -rq ../H5P.Scorm.h5p *