Skip to content

CLI enhancements #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

surprisetalk
Copy link
Contributor

  • added CLI tests
  • added CLI subcommands
  • changed existing subcommands to prefer STDIN over filenames for piping flexibility

- Refactor author entries in `pyproject.toml` to use a structured format.
- Add repository URL under `[project.urls]` in `pyproject.toml`.
- Include `pytest` as a development dependency in `pyproject.toml`.
- Add pytest configuration options for test discovery and output format.
- Update `.gitignore` to include `.vscode/` and ensure `.scrap-history` is properly listed.
- Updated `eval_command`, `type_command`, `flat_command`, `format_command`, and `pipe_command` to read from `args.input` instead of `args.program_file`.
- Introduced context managers `captured_output` and `captured_binary_output` for better output handling in tests.
- Added comprehensive tests for CLI commands, including error handling for invalid syntax and file operations.
- Improved argument parsing in the main function to support new command structures.
@surprisetalk surprisetalk marked this pull request as draft May 10, 2025 15:45
…ug option

- Modified command examples in `README.md` to use input redirection for better clarity.
- Added `--debug` flag to `pipe`, `flat`, and `format` commands in `scrapscript.py` for improved debugging capabilities.
@surprisetalk surprisetalk mentioned this pull request May 13, 2025
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