docs: add auto-generated real example output for every function - #118
Merged
Merged
Conversation
Adds tools/Update-ExampleOutput.ps1, which runs every exported function against a real Pi-hole server and writes docs/EXAMPLES.md - one section per function with the exact invocation and the real captured output, grouped the same way as README.md's Command Reference. State-changing functions (groups, lists, sessions) use a throwaway resource that's cleaned up immediately after capture. Functions with real side effects on a live server (gravity rebuild, DNS restart, network/log flush, DNS blocking toggle) are skipped by default in favor of a previously captured static example, unless -IncludeDisruptive is passed. Links docs/EXAMPLES.md from README.md's table of contents and Command Reference section. Co-Authored-By: Claude Sonnet 5 <[email protected]>
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/Update-ExampleOutput.ps1, which runs every exported function against a real Pi-hole server and writesdocs/EXAMPLES.md— one section per function with the exact invocation shown and the real captured output below it, grouped the same way as README.md's Command Reference.PiHoleShellDocsExampleGroup, a real list URL), removed immediately after capture — same pattern already used by this module's integration tests.-IncludeDisruptiveto live-capture those too.docs/EXAMPLES.mdfromREADME.md's table of contents and Command Reference section.Test plan
./tools/Update-ExampleOutput.ps1against a real Pi-hole v6 server end-to-end; verified every invocation shown matches the resource actually used to produce the output below it (fixed several places where the two had drifted).Invoke-ScriptAnalyzerclean against the new script.🤖 Generated with Claude Code