Skip to content

External library: A simple validator and parser for SCO zip files.

License

Notifications You must be signed in to change notification settings

Mindflash/node-sco-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sco-parser

A simple validator and parser for SCO zip files written in node

Usage

var params = {
	pathToScoZip: 'fixtures/unpackScoZipTests/articulate_sco_with_quiz.zip',
	pathToExtractZip: 'fixtures/unpackScoZipTests/extractFolder'
}

// initialize the parser
var scoParser = require('sco-parser')(params);

scoParser.validate(function(err, result)) {
	scoParser.parse(function(err, scoInfo)) {

		console.log(scoInfo.scoHtmlHref);	// entry point to the sco
		console.log(scoInfo.quizCount);		// value is 1 if a quiz exists in the sco

		scoParser.destroy(function(err) {});
	});
});

We created a command line utility for quickly validating scorm files. It can be used as follows:

npm run verify queryObject.path fixtures/unpackScoZipTests/articulate_sco_with_quiz.zip

Params

Initialize the parser.

pathToScoZip - location to find the scorm package (zip file)

pathToExtractZip - location to unpack the scorm package to

Methods

validate - validates that a scorm package (.zip) contains an imsmanifest.xml

parse - returns basic information about the scorm package

scoHtmlHref		// filename which is the entry point to the sco
quizCount			// number of quizzes found in the sco

destroy - cleans up temp files

License

MIT

About

External library: A simple validator and parser for SCO zip files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published