cad-courseProps(1)

Michael Slinn (mslinn@micronauticsresearch.com)

10 May 2019

NAME

cad courseProps - a Cadenza Client™ command that reports property values for a given course.

SYNOPSIS

cad [OPTION]… courseProps [ACTION_OPTIONS]… id

DESCRIPTION

cad courseProps returns a course’s properties object. The properties object for a course is stored in a file called course.json in the course’s directory within $cadenzaCurriculum. This command returns the properties object, enhanced with environment variables to fill out complete paths for:

absoluteCreativeProjectPath
Computed from creativeProjectPath in course.json, relative to $cadenzaCreative.
absoluteCurriculumProject
Computed from curriculumProjectPath in course.json, relative to $cadenzaCurriculum.
absoluteDWPath
Computed from dwPath in course.json, relative to $cadenzaCurriculum.
absolutePromoDWSte
Computed from promoDWPath in course.json, relative to $cadenzaCurriculum.
absolutePropertyObjectPath
Computed from propertyObjectPath in course.json, relative to $cadenzaCurriculum.

ACTION_OPTIONS

-h
Shows this man page.
-p propName
Return specified property value, might be retrieved verbatim from course.json, or might be a computed value.
-s
(Re)compute and save the property object in the appropriate directory within $cadenzaCurriculum. Increments the version property value.

EXAMPLES

cad courseProps -h
Shows this man page.
cad courseProps -p .creativeProjectPath 40
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro
cad courseProps -p absoluteCreativeProjectPath 40
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCreative/ScalaCourses.com/group_ScalaCore/course_scalaIntro
cad courseProps -p .cadenzaCurriculum 40
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro
cad courseProps -p absoluteCurriculumProject 40
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro
cad courseProps -p .propertyObjectPath 40
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/course.json
cad courseProps -p absolutePropertyObjectPath 40
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/course.json
cad courseProps -p .promoPath 40
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo
cad courseProps -p absolutePromoPath 40
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo
cad courseProps -p .promoDWSte 40
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo/course_scalaIntro.ste
cad courseProps -p absolutePromoDWSte 40
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo/course_scalaIntro.ste
cad courseProps -p '.lecture|.sku' 40
This jq query returns something like: course_scalaIntro
cad courseProps -p '.video|.renderedPath' 13
This jq query returns something like: 1/html/ScalaCore/assets/videos/course_scalaIntro.mp4

SAMPLE course.json

{
  "creative": {
    "downloadedFrom": "production",
    "lastDownloaded": "12345"
    "lastUploaded": [
      {
        "to": "production",
        "on": "12345"
      },
      {
        "to": "localhost",
        "on": "1234"
      }
    ]
  },
  "version": 12,
  "gitCreated": "12345",
  "indexLastModified": "12345",
  "jsonCreated": "12345",
  "jsonVersion": "3",
  "creativeProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro",
  "curriculumProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro",
  "dwPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo",
  "dwSte": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/promo/course_scalaIntro.ste",
  "propertyObjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/course.json",
  "site": {
    "id": 1,
    "name": "ScalaCourses.com"
  },
  "group": {
    "id": 103,
    "sku": "group_ScalaCore",
    "title": "Core Scala"
  },
  "course": {
    "id": 40,
    "sku": "course_scalaIntro",
    "title": "Introduction to Scala"
  },
  "video": {
    "renderedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/course_scalaIntro.mp4",
    "transcodedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/tx/course_scalaIntro_Web.mp4",
    "stageDomain": "courseassets.scalacourses.com",
    "renderedPath": "1/html/ScalaCore/assets/videos/course_scalaIntro.mp4",
    "transcodedPath": "1/html/ScalaCore/assets/videos/tx/course_scalaIntro_Web.mp4"
  }

SEE ALSO

cad course(1), cad(1)