[Feature] fold on punctuation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
I found folding on punctuation desirable for Piper TTS work.
Would uutils consider adding a -p --punctuation arg to fold with fallbacks like this isolated working example?
While the example is English centric, the existing -s --spaces arg is also not applicable to some non English (Chinese, Japanese, etc). If the is_alphanumeric catch all is not ideal for other languages specific punctuation could be added later; Spanish(¿¡), Chinese(。、), etc. (maybe based on locale or maybe as an always on check)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/uu/fold/src/fold.rs around the fold implementation and compare the isolated Rust example in fold4 at rust/src/main.rs around line 67. Define the expected -p/--punctuation behavior, including non-English punctuation considerations, then verify that the flag folds at the requested boundaries and is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100