Skip to content
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

enhance match display in default output #54

Closed
4 tasks done
thatbudakguy opened this issue Feb 14, 2020 · 0 comments · Fixed by #134
Closed
4 tasks done

enhance match display in default output #54

thatbudakguy opened this issue Feb 14, 2020 · 0 comments · Fixed by #134
Labels
enhancement New feature or request
Milestone

Comments

@thatbudakguy
Copy link
Member

thatbudakguy commented Feb 14, 2020

it's difficult to interpret results without viewing the match in at least some document context. we certainly don't need the entire document, but a few characters on either side would probably help. we can also highlight the actual match portion in color and/or bold the portions that are graphic variants.

  • add optional context on either side of match (see comparable grep options -B and -A)
  • add optional highlights for insertions, substitutions, and variants using text/background color, bold, italics, etc. (--color)
  • replace newlines in output with ⏎ or a similar indicator
  • allow displaying the actual phonemes along with the text

it might be worth writing a match.pretty() method or similar to encapsulate this functionality. the best way to do it is probably by removing this concern from Match entirely, and writing a Formatter class that handles the display of matches.

note that writing to a file should disable --color, since the output will otherwise include a lot of unwanted control characters.

@thatbudakguy thatbudakguy added the enhancement New feature or request label Feb 14, 2020
@thatbudakguy thatbudakguy added this to the v2.0 milestone Aug 5, 2020
@thatbudakguy thatbudakguy changed the title add match context to default output enhance match display in default output Aug 5, 2020
@thatbudakguy thatbudakguy linked a pull request Nov 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant