Content Management

Data

The data resides in data. The data is split into four directories:

The data exists to feed the YouTube channel of Rawkode Academy.

CLI

Linter

The file linter is part of the CLI. When a file is valid, it exits with a status code of 0. When a file is invalid, it exits with a status code of 1 and prints the errors to standard error.

Supported file formats (links to their respective directories including examples):

Usage (linter)

To run the linter, use the following command:

cargo run --manifest-path=cli/Cargo.toml -- lint --path data/episodes/

To format all files, use the following command:

cargo run --manifest-path=cli/Cargo.toml -- format --path data/ [--apply]

Sync

The sync tool is part of the CLI. It syncs the data with the YouTube channel of Rawkode Academy.

Usage (sync)

To run the sync, use the following command:

export POSTGRESQL_CONNECTION_STRING="postgres://academy:academy@localhost:5432/academy" # or something else
cargo run --manifest-path=cli/Cargo.toml -- sync --path data/ [--apply]

Local testing

cd cli
docker-compose up

cargo run --manifest-path=cli/Cargo.toml -- sync --path data/ --apply