Karma/Bundle layout

< Karma
Revision as of 20:29, 22 November 2009 by BryanWB (talk | contribs)

The Main Karma Package

A set of tools that will help you start working with Karma quickly

This is what is contained in the repository at http://git.sugarlabs.org/projects/karma/

  • Includes script for Karma activity generation, xo bundle generation
  • includes "platform" files, i.e. a basic html5-capable browser that can be used to create an xo bundle
ROOT/                              ( ROOT is not actually a directory name, it just labels the top-level of this package )
   assets/                         ( images, sounds, and text common to karma.html, examples, and the lessons )
          images/
          sounds/
          locale_name/
                   images/            
                   locale_name.json   ( karma actually needs the .po file to be converted to .json )
                   sounds/
   AUTHORS                         ( Should include names of everyone that has contributed to Karma main package )
   bin/
   
   css/                            ( css/ and js/ contain the code common to all examples, lessons, and karma.html )
   COPYING                         ( Licensing information, should default to MIT License   ? how distinguish b/w code licensing and content licensing )
   docs/
   examples/                       ( working examples of karma lessons )
   index.html                     ( The starting page for accessing Karma lessons, should include links to the examples, known as the CHAKRA )
   js/                             ( css/ and js/ contain the code common to all examples, lessons, and karma.html )
   lessons/                        ( this is the workspace for creating new Karma lessons )
   package.json                     describes this package as a commonjs package
   po/                             Store 
   README
   tests/                          unit tests                    

Karma XO bundle

  • similar to E-Paath layout and uses the standard Sugar bundle structure
  • It is still undecided whether karma will default to using Browse which is based on Firefox or Surf which based on webkit (Safari/Chrome). Surf requires that you install the rpms for pywebkitgtk and webkitgtk
 activity/
        activity.info                          (activity info file)
        activity-web.svg                       (icon for activity as specified in activity.info)
        mimetypes.xml                          (map documents to MIME types)
        text-plain.svg                         (icons for documents, e.g. "text-plain.svg" for "text/plain")
        text-html.svg
        contents                               (manifest for bundle contents)
        contents.sig                           (credentials for signed bundle)
        permissions.info                       (optional; not a stable API)
 assets/
 AUTHORS
 bin/
        launch.sh                           (launcher script)
 browser.dtd
 browser.py
 cert8.db
 clickToView.xml
 COPYING
 css/
 downloadmanager.py
 edittoolbar.py
 globalhistory.py
 icons
 index.html
 js/
 linkbutton.py
 karma
 karmaactivity.py
 lessons/
 locale
 MANIFEST
 messenger.py
 model.py
 palettes.py
 places.py
 po/ 
 promptservice.py
 README
 securitydialogs.py
 sessionhistory.py
 sessionstore.py
 setup.py
 viewtoolbar.py
 utils/
 webtoolbar.py

Karma lesson bundle

consists of multiple lesson in a single bundle

  • common jquery and css files in a single folder
  • The karma utility script can be used to generate a lesson bundle with accompanying main menu and search (probably some sort of sitemap)
 bundle_name/
             assets/
                     default/              ( default as in the default locale)
                             docs/
                             images/
                             sounds/
                             default.po
                     en-US/
                             docs/
                             images/
                             sounds/
                             default.po
             chakra/                  ( for all sub-pages of the chakra, e.g. grade1.html )
             css/                     ( common css files (e.g. jquery.jgrowl.css and menu.css ) )
             index.html          ( Common gateway to access the lessons in the bundle known as the Chakra)
             js/                      ( common javascript / jquery files )
             lessons/                 ( directory for all the lessons )
                    lesson_name1/
                    lesson_name2/

Lesson

consists of a single lesson

  lesson_name/
             index.html               ( lesson menu with iFrame for reading.html, css and js are common files, they are inside../css/ and ../js/ respectively)
             tutorial/                 ( contains files related to the tutorial )
             game/                    ( contains files related to the game )
             exercise/                ( contains files related to the exercise )
             assets/
                  {langCode}/         (files specific to langCode: en-US, en, es-MX, es, ....) 
                          docs/
                              activity text
                              lesson plan
                              teachers note      
  • Notes:
  1. {langCode} represents the lang code and country code
  2. which will be the template language for aseets/docs/* ?, English suggested
  3. suggestion: rename assets/{langCode}/docs/ to docs/{langCode}/ . This is based that at this moment there are no other kind of files under assets/ than 'docs'

Reading, Game and Exercise

consist of a single 'reading', 'game' or 'exercise'

{type}/
             index.html               (valid html5 -- markup only includes visual elements and links in other resources, no inline code or styling )
             css/{type}.css           ( css files   -- specific to the lesson )
             js/{type}.js             ( javascript controlling logic for the lesson )
             po/                      ( translation files )
                 ne-NP.po             ( example translation file for Nepal - Nepali )
                 sp-ES.po             ( example translation file for traditional Spanish )
                 {langCode}.po        ( translation file )
             assets/
                    generic/          ( for language independent assets (e.g. arrows, background images, etc.) )
                       images/
                           preview.jpg  ( screenshot for Chakra  )
                       sounds/
                       videos/
                       docs/
                    ne/
                       images/
                       sounds/
                       videos/
                       docs/
                    en/
                       images/
                       sounds/
                       videos/
                       docs/
                    {langCode}/
                       images/
                       sounds/
                       videos/
                       docs/
  • Notes
  1. {type} represents 'game' or 'exercise' or 'reading'
  2. does docs/ is used?