cad-sectionProps(1)

Michael Slinn (mslinn@micronauticsresearch.com)

10 May 2019

NAME

cad sectionProps - a cadenzaClient command that reports property values for a given section.

SYNOPSIS

cad [OPTION]… sectionProps propertyName id cad [OPTION]… sectionProps -s id cad [OPTION]… sectionProps -h

propertyName might be retrieved verbatim from section.json, or might be a computed value.

DESCRIPTION

cad sectionProps returns a section’s properties object. The properties object for a section is stored in a file called section.json within the section’s directory within $cadenzaCurriculum.

References properties object for all properties, and enhances with environment variables to fill out complete paths for:

absoluteCreativeProjectPath
Stored in section.json as creativeProjectPath, relative to $cadenzaCreative.
absoluteCurriculumProject
Stored in section.json as curriculumProjectPath, relative to $cadenzaCurriculum.
absolutePropertyObjectPath
Stored in section.json as propertyObjectPath, relative to $cadenzaCurriculum.

ACTION_OPTIONS

-h
Shows this man page.
-s relativeDirectory
(Re)compute and save property object in the given directory relative to $cadenzaCurriculum. Increments the version property value. Returns the empty string.

EXAMPLES

cad sectionProps -h
Shows this man page.
cad sectionProps -s 13
Persists the properties object for section #13.
cad sectionProps .creativeProjectPath 13
This jq query returns something like: group_ScalaCore/course_scalaIntro/section_scalaRunning
cad sectionProps absoluteCreativeProjectPath 13
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCreative/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning
cad sectionProps .cadenzaCurriculum 13
This jq query returns something like: group_ScalaCore/course_scalaIntro/section_scalaRunning
cad sectionProps absoluteCurriculumProject 13
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning
cad sectionProps .propertyObjectPath 13
This jq query returns something like: group_ScalaCore/course_scalaIntro/section_scalaRunning/section.json
cad sectionProps absolutePropertyObjectPath 13
This computed property returns something like: /mnt/c/work/cadenzaHome/cadenzaCurriculum/ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning/section.json
cad sectionProps '.lecture|.sku' 13
This jq query returns something like: section_scalaRunning
cad sectionProps ‘.video|.renderedPath’ 13
This jq query returns something like: 1/html/ScalaCore/assets/videos/section_scalaRunning.mp4

SAMPLE section.json

{
  "creative": {
    "downloadedFrom": "production",
    "lastDownloaded": "12345"
    "lastUploaded": [
      {
        "to": "production",
        "on": "12345"
      },
      {
        "to": "localhost",
        "on": "1234"
      }
    ]
  },
  "version": 3,
  "gitCreated": "12345",
  "indexLastModified": "12345",
  "jsonCreated": "12345",
  "jsonVersion": "1",
  "creativeProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning",
  "curriculumProjectPath": "ScalaCourses.com/group_ScalaCore/course_scalaIntro/section_scalaRunning",
  "site": {
    "id": 1,
    "name": "ScalaCourses.com"
  },
  "group": {
    "id": 103,
    "sku": "group_ScalaCore"
  },
  "course": {
    "id": 40,
    "sku": "course_scalaIntro"
  },
  "section": {
    "id": 13,
    "name": "section_scalaRunning"
  },
  "video": {
    "renderedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/section_scalaRunning.mp4",
    "transcodedUrl": "https://courseassets.scalacourses.com/1/html/ScalaCore/assets/videos/tx/section_scalaRunning_Web.mp4",
    "stageDomain": "courseassets.scalacourses.com",
    "renderedPath": "1/html/ScalaCore/assets/videos/section_scalaRunning.mp4",
    "transcodedPath": "1/html/ScalaCore/assets/videos/tx/section_scalaRunning_Web.mp4"
  }
}

SEE ALSO

cad section(1), cad(1)