Add a textutil proxy for document-to-text conversion#2691
Open
sayantanmandal1 wants to merge 1 commit into
Open
Add a textutil proxy for document-to-text conversion#2691sayantanmandal1 wants to merge 1 commit into
sayantanmandal1 wants to merge 1 commit into
Conversation
Wraps macOS textutil so a txt conversion to stdout gets the same blank-line and trailing-whitespace cleanup as `rtk read` (capped with a [N more lines] marker), -info folds to one line, and anything else passes through untouched. Closes rtk-ai#2678
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.
Closes #2678.
Adds
rtk textutil. Atxtconversion to stdout gets the same blank-line / trailing-whitespace cleanup asrtk read(capped with a[N more lines]marker),-infofolds to a single line, and everything else (markup conversions, file output, flags I didn't recognise) passes straight through. Wired in like the other system proxies, with a discover rule and unit tests + fixtures.Heads up: I don't have a Mac to capture a real
-infoblock, so that fixture is a representative sample. The filter just foldsLabel: valuelines, so it should hold, but worth a quick check against realtextutil -infooutput.