cad-lectureProps(1)

Michael Slinn (mslinn@micronauticsresearch.com)

10 May 2019

NAME

cad lectureProps - a Cadenza Client™ command that reports property values for a given lecture.

SYNOPSIS

cad [OPTION]… lectureProps [ACTION_OPTIONS]… id

DESCRIPTION

cad lectureProps returns a lecture’s properties object. The properties object for a lecture is stored in a file called lecture.json within the lecture’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 lecture.json, relative to $cadenzaCreative.
absoluteCurriculumProject
Computed from curriculumProjectPath in lecture.json, relative to $cadenzaCurriculum.
absoluteDWPath
Computed from dwPath in lecture.json, relative to $cadenzaCurriculum.
absolutePromoDWSte
Computed from promoDWPath in lecture.json, relative to $cadenzaCurriculum.
absolutePropertyObjectPath
Computed from propertyObjectPath in lecture.json, relative to $cadenzaCurriculum.

ACTION_OPTIONS

-h
Shows this man page.
-p propName
Return specified property value, might be retrieved verbatim from lecture.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 lectureProps -h
Shows this man page.
cad lectureProps -p .creativeProjectPath 55
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview
cad lectureProps -p absoluteCreativeProjectPath 55
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCreative/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview
cad lectureProps -p .cadenzaCurriculum 55
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview
cad lectureProps -p absoluteCurriculumProject 55
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview
cad lectureProps -p .propertyObjectPath 55
This jq query returns something like: ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview/lecture.json
cad lectureProps -p absolutePropertyObjectPath 55
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview/lecture.json
cad lectureProps -p '.lecture|.sku' 55
This jq query returns something like: lecture_scalaOverview
cad lectureProps -p ‘.video|.renderedPath’ 55
This jq query returns something like: 1/html/ScalaCore/assets/videos/lecture_scalaOverview.mp4

SAMPLE lecture.json

{
  "creative": {
    "downloadedFrom": null,
    "lastDownloaded": null,
    "lastUploaded": [
      {
        "to": "production",
        "on": null
      },
      {
        "to": "localhost",
        "on": null
      }
    ]
  },
  "version": 2,
  "gitCreated": null,
  "indexLastModified": "2019-05-24T02:21:00.135Z",
  "jsonCreated": "2019-05-24T02:21:00.135Z",
  "jsonVersion": 3,
  "creativeProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview",
  "curriculumProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview",
  "dwPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview",
  "dwSte": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview/lecture_scalaOverview.ste",
  "propertyObjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/lecture_scalaOverview/lecture.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"
  },
  "section": {
    "id": 13,
    "name": "section_scalaRunning",
    "title": "Installing and Running"
  },
  "lecture": {
    "id": 55,
    "sku": "lecture_scalaOverview",
    "title": "Scala Overview and Philosophy"
  },
  "video": {
    "renderedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/lecture_scalaOverview.mp4",
    "transcodedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/lecture_scalaOverview_Web.mp4",
    "stageDomain": "courseassets.scalacourses.com",
    "renderedPath": "1/html/ScalaCore/assets/videos/lecture_scalaOverview.mp4",
    "transcodedPath": "1/html/ScalaCore/assets/videos/lecture_scalaOverview_Web.mp4"
  }
}

SEE ALSO

cad lecture(1), cad(1)