Skip to content

A piece of code to slim down Adobe Captivate HTML5 exported module

Notifications You must be signed in to change notification settings

perfectstrong/CPExternalizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPExternalizer

A piece of code to slim down HTML5 module exported by Adobe Captivate.

Checkout CPExternalizer CLI for command line interface or CPExternalizer GUI for graphical interface. See CPCluster example to get the whole scenarios for using these tools.

Usage

const cpext = require('cpexternalizer');

CPExternalizer exposes 4 methods each of which returns a promise to chain.

API References

extract(src, outdir) => Promise

  • {Array.<String>} src File paths to CPM.js exported by Adobe Captivate.
  • {String} outdir Where to save output. Default is the current directory.

Extracting the initiator(s) from src and export them to outdir.

xcpextract(src, outdir, samplePath) => Promise

  • {Array.<String>} src File paths to CPM.js exported by Adobe Captivate.
  • {String} outdir Where to save output. Default is the current directory.
  • {String} samplePath path to sample CPM.js file

Extracting components in CPM.js which are not covered in sample CPM.js at the moment.

dirextract(src, outdir) => Promise

  • {Array.<String>} src input folders
  • {String} outdir where to save

Process folders (exported by Adobe Captivate) and return a "slimmed down" one containing only CPProjInit.js, ar and dr.

soundfix(src, ulpath) => Promise

  • {Array.<String>} src file path or directory to find CPProjInit
  • {String} ulpath file path or directory of common unit loader

Fix the audio path in CPProjInit. All non-js files will be ignored.