Skip to content

Add CLI-driven text input/output for word cloud generation and document enhancement roadmap#3

Merged
chefgs merged 1 commit into
mainfrom
copilot/chefgs-analyze-enhancements
May 19, 2026
Merged

Add CLI-driven text input/output for word cloud generation and document enhancement roadmap#3
chefgs merged 1 commit into
mainfrom
copilot/chefgs-analyze-enhancements

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 19, 2026

The project still required passing text by editing source code directly, which blocked basic automation and reuse. This PR adds runtime input/output controls and captures near-term enhancement opportunities discovered during repo analysis.

  • What changed

    • Reworked show_wordcloud.py into a CLI entrypoint with main().
    • Added argument parsing for:
      • --text (inline text input)
      • --text-file (UTF-8 file input)
      • --output (custom output PNG path)
    • Added input resolution logic with mutual exclusivity validation for --text and --text-file.
    • Preserved backward compatibility by falling back to the existing default sample text when no input flags are provided.
    • Closed figure resources after save to avoid handle leakage in repeated runs.
  • Documentation updates

    • Updated README usage to reflect default, inline, and file-based input modes.
    • Marked the “pass text as input argument” task as completed.
    • Added a concise “Possible Enhancements” backlog (cloud upload, styling flags, CI expansion, tests, API mode).
  • Example usage

    python3 show_wordcloud.py --text "GitHub Actions GitHub Packages Protected branches" --output mycloud.png
    python3 show_wordcloud.py --text-file /path/to/input.txt --output /path/to/wordcloud.png

@chefgs chefgs marked this pull request as ready for review May 19, 2026 09:08
@chefgs chefgs merged commit 8acba55 into main May 19, 2026
1 check passed
@chefgs chefgs deleted the copilot/chefgs-analyze-enhancements branch May 19, 2026 09:09
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.

2 participants