Skip to content

Command line tool we use to parse content written in markdown for our LMS @Laboratoria

Notifications You must be signed in to change notification settings

mfdebian/curriculum-parser

 
 

Repository files navigation

@laboratoria/curriculum-parser

Command line tool used to parse content written in markdown at @Laboratoria (See Laboratoria/bootcamp).

Node.js CI Coverage Status

Installation

Install as a development dependency in your project:

npm i --save-dev @laboratoria/curriculum-parser

You should now be able to run it with npx:

npx curriculum-parser # when already installed in project

# or alternatively using full package name (with org)
# this works even if not previously installed.
npx @laboratoria/curriculum-parser

You can also install curriculum-parser globally using npm like this:

npm i -g @laboratoria/curriculum-parser

If you get a permission error please try using sudo (you may need admin permissions depending on your node installation).

# using `sudo` (only if previous step failed)
sudo npm i -g @laboratoria/curriculum-parser

Alternatively you can install using a local clone.

# clone from your own fork
git clone [email protected]:<your-username>/curriculum-parser.git
cd curriculum-parser
npm install
npm link

If the above command fails, try using sudo:

sudo npm link

Upgrade

If you installed globally using npm you can simply re-install like so:

npm i -g @laboratoria/curriculum-parser

If you chose to install using a local clone, you can update your clone to upstream main:

# go into local copy of repo
cd curriculum-parser
# if not yet added a reference to upstream remote we add it
git remote add upstream [email protected]:Laboratoria/curriculum-parser.git
# fetch changes and merge upstream/main into local main
git fetch upstream
git merge upstream/main
# you may also want to push changes to your fork
git push origin main

Usage

After installing globally (or linking with npm link) you should have the curriculum-parser command available in your PATH.

curriculum-parser --help
Usage: curriculum-parser [options] [command]

Options:
  -V                         output the version number
  -h, --help                 display help for command

Commands:
  project [options] <dir>    Parse a project
  topic [options] <dir>      Parse a topic
  part [options] <dir>       Parse a part
  challenge [options] <dir>  Parse a challenge
  help [command]             display help for command

You can also access usage (help) info for individual commands like so:

curriculum-parser project --help
Usage: curriculum-parser project [options] <dir>

Parse a project

Arguments:
  dir                 path to project directory

Options:
  --repo <string>     Repository
  --version <string>  Project version
  --lo <string>       Path to yml file with reference learning objectives
  --debug             Show error stack traces
  -h, --help          display help for command

Examples

Parse a topic within the Laboratoria/bootcamp repo

Parsing a topic and printing the resulting JSON output to stdout.

curriculum-parser topic topics/javascript/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parsing a topic and writing the parser's output (stdout) to a file (using output redirection in the shell).

curriculum-parser topic topics/javascript/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0 \
  > "build/topics/javascript.json"

Parse a specific part of a topic within the Laboratoria/bootcamp repo

curriculum-parser part topics/intro-ux/00-que-es-uxd/00-que-es-uxd/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parse a challenge within the Laboratoria/bootcamp repo

curriculum-parser challenge topics/javascript/01-basics/06-exercises/01-coin-convert/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0

Parse a project within the Laboratoria/bootcamp repo

curriculum-parser project projects/01-cipher/ \
  --repo Laboratoria/bootcamp \
  --version 5.5.0 \
  --lo=./learning-objectives

About

Command line tool we use to parse content written in markdown for our LMS @Laboratoria

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%