0.0.1 • Published 10 years ago

convertuppernew v0.0.1

Weekly downloads
4
License
-
Repository
-
Last release
10 years ago

ManifestorGenerator

About

Creates manifests and manifest related objects (tar files):

Usage:

node ManifestGenerator.js -dataPath ./some/path/to/read/data.xml
                          -manifestPath ./path/to/write/manifest.json

Default templates for manifest and manifest sub-structures are defined in:

  • defaultManifest.json
  • defaultDownload.json
  • defaultNavigationMenu.json

Default properties can be overwritten by configuration files:

  • configManifest.json
  • configDownload.json

Some properties within a manifest file cannot be overwritten because they are determined by the generator itself. For example, it is assumed that all content, local working copies or in the svn repositories, is organized in similar paths. This path to the data.xml for an activity is parsed and used to set the following:

  • download_packages.downloadsn.description = 'GOMATH CA GR6_COMMON'
  • download_packages.downloadsn.role = 'student'|'teacher'
  • download_packages.downloadsn.package_details.download_uri.relative_url = ...
  • download_packages.downloadsn.package_details.target_path.relative_url = ...

A proper data.xml path looks like the following:

svn/content/hsp/math/gomath/ca/gr6/onlineinteractive_teacher_book_1234567890/... a-print/static/G99_Chp99_L99/data.xml

Parsing yields the following critical values:

  • contentFolder = 'content'
  • alt = 'hsp'
  • subject = 'math'
  • product_name = 'gomath'
  • product_detail = 'ca'
  • grade = 'gr6'
  • role = teacher
  • isbnFolder = onlineinteractive_teacher_book_1234567890
  • isbn = 1234567890
  • activityID = G99_Chp99_L99

Building and Maintenance

Setup

  1. Get the lastest source from http://dubsvn.hmco.com/svn/GoMathTools/trunk/ManifestGenerator
  2. Install nodejs
  3. Install Grunt a. At a command-prompt run 'npm install grunt-cli -g'
  4. At a command-prompt, navigate to the root of the ManifestGenerator project
  5. Run 'npm install' to install devDependencies and dependencies (See package.json)

Building

  • For development builds. from the root of the ManifestGenerator project 1. Run 'grunt build' 2. Run 'grunt execute'
  • For distribution builds 1. Run 'grunt dist'
  • During development, it may be helpful to use 'grunt dev'.
    This task watches your source for changes checks that it adheres to coding standards defined in .jshintrc builds the latest executes the latest build