Skip to content

Better programmatic use of prettytable #16

@asomers

Description

@asomers

Thank you so much for this crate! It's just what I need. It could be even better, though. The prettytable method looks like it's written solely with the CLI in mind, which makes it hard to use programmatically. Would it be possible:

  • Allow printing to stderr or to a string instead of only stdout.
  • Suppress line numbers.
  • Show a few lines of context beside the mismatched lines

If prettytable could do those things, then it would be perfect for my application. Which is, I want to print differences between large binary buffers in hex, as part of a test suite. First I format each buffer into hex, then use prettydiff to show the differences. I don't need line numbers because those are included in the hexdump. I do need to print to stderr instead of stdout, and some context would ease understanding. This is what it looks like right now:
Screenshot_2023-09-09_09-59-16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions