Skip to content

Rewrite maifetch in GnuCOBOL#16

Open
Errordog2 wants to merge 2 commits into
HutchyBen:mainfrom
Errordog2:codex/rewrite-maifetch-gnucobol
Open

Rewrite maifetch in GnuCOBOL#16
Errordog2 wants to merge 2 commits into
HutchyBen:mainfrom
Errordog2:codex/rewrite-maifetch-gnucobol

Conversation

@Errordog2

Copy link
Copy Markdown

/claim #1

This PR rewrites maifetch in GnuCOBOL for the latest maintainer direction requesting a GnuCOBOL implementation.

Scope:

  • Replaces the Go module with a GnuCOBOL CLI entrypoint in src/maifetch.cob.
  • Preserves the original config priority: CLI > environment > config file > defaults.
  • Supports --access-token/-a/-t, --logo-size/-l, --score-count/-s, and --config-file/-c.
  • Fetches MaiTea /api/v1/profiles and /api/v1/plays via authenticated curl requests, then formats profile and recent-score output from those API responses.
  • Adds fixture-mode test hooks (MAIFETCH_PROFILE_FIXTURE, MAIFETCH_PLAYS_FIXTURE) so CI can validate output without live credentials.
  • Adds a GnuCOBOL GitHub Actions workflow that installs gnucobol and runs make test.

Validation:

  • git diff --check passed locally.
  • git diff --cached --check passed locally.
  • tests/run-fixture-test.sh is staged executable (100755).
  • Local make test is not runnable on this Windows machine because cobc is not installed; the included CI installs GnuCOBOL on Ubuntu and runs the fixture test.

Maintainer LLM note: files created or rewritten with LLM assistance include an OpenAI GPT-5 Codex note at the top, following the issue instruction.

@Errordog2

Copy link
Copy Markdown
Author

Follow-up: I fixed the GnuCOBOL CI failure from the first run by using GnuCOBOL's direct ACCEPT ... FROM ENVIRONMENT identifier form for environment lookup. The new branch head is 807e046, and the GnuCOBOL workflow is now passing: https://github.com/Errordog2/maifetch/actions/runs/27433729517

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