Skip to content

add list and forums commands - #1

Merged
tamnd merged 1 commit into
mainfrom
feat/physicsforums-commands
Jun 14, 2026
Merged

tamnd merged 1 commit into
mainfrom
feat/physicsforums-commands

Conversation

@tamnd

@tamnd tamnd commented Jun 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rewrote physicsforums/physicsforums.go with a Config-based client, Thread and Forum types, hardcoded KnownForums (18 sections), and parseThreads using regex splits on the XenForo structItem--thread class
  • Added physicsforums forums and physicsforums list --forum <slug> commands in cli/
  • Copied the reflection-based pkg/render package from mdpi-cli for table/json/jsonl/csv/tsv/url/raw output
  • Added go-isatty for auto table/jsonl switching based on terminal detection
  • Tests: TestList, TestListLimit, TestForums using a mock httptest server

Test plan

  • go build ./... passes
  • go test ./... passes (physicsforums package: 3 tests green)
  • physicsforums forums -o table lists 18 forums
  • physicsforums list --forum quantum-physics -o table fetches live threads

Wire up physicsforums.Client with Config, parseThreads (regex-based XenForo
splitter), and two commands: list (fetches recent threads from a named forum)
and forums (hardcoded catalog of 18 known sections). Copy render package from
mdpi-cli, add go-isatty for auto table/jsonl switching, and write tests for
List, ListLimit, and Forums.
@tamnd
tamnd merged commit 1ef2715 into main Jun 14, 2026
7 of 8 checks passed
@tamnd
tamnd deleted the feat/physicsforums-commands branch June 14, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant