A command line for Tieng Trung Online, a Vietnamese-Chinese learning site.
tiengtrungonline is a single pure-Go binary. It reads public data via the WordPress REST API,
shapes it into clean records, and prints output that pipes into the rest of your tools.
No API key, nothing to run alongside it.
go install github.com/tamnd/tiengtrungonline-cli/cmd/tiengtrungonline@latestOr grab a prebuilt binary from the releases, or run the container image:
docker run --rm ghcr.io/tamnd/tiengtrungonline:latest --helptiengtrungonline posts # list recent posts (table)
tiengtrungonline posts -o json # as JSON, ready for jq
tiengtrungonline posts --per-page 50 --page 2 # second page, 50 per page
tiengtrungonline posts --category 26 # filter by category ID
tiengtrungonline categories # list all categories sorted by post count
tiengtrungonline categories -o json # as JSON
tiengtrungonline --help # the whole command treeEvery command shares one output contract: -o table|json|jsonl|csv|tsv|url|raw,
--fields to pick columns, --template for a custom line, and -n to limit.
The default adapts to where output goes (a table on a terminal, JSONL in a
pipe), so the same command reads well by hand and parses cleanly downstream.
List posts from Tieng Trung Online.
Flags:
--per-page N— number of posts per page (default 20)--page N— page number (default 1)--category ID— filter by category ID (default 0 = all)
List all categories, sorted by post count descending.
cmd/tiengtrungonline/ thin main
cli/ command tree (cobra)
tiengtrungonline/ HTTP client and data models
pkg/ output renderer (table/json/jsonl/csv/tsv/url/raw)
docs/ tago documentation site
make build # ./bin/tiengtrungonline
make test # go test ./...
make vet # go vet ./...Push a version tag and GitHub Actions runs GoReleaser, which builds the archives, Linux packages, the multi-arch GHCR image, checksums, SBOMs, and a cosign signature:
git tag v0.1.0
git push --tagsApache-2.0. See LICENSE.