-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
impr: Added CSV, TSV and JSON as export options for Find results #1673
base: master
Are you sure you want to change the base?
Conversation
The CSV/TSV exporters have been tested by finding 5 character longs strings in /dev/urandom, and all the escaping logic seems to work as it's supposed to. As for JSON, the nlohmann library already takes care of escaping strings. |
… to the root window
Thanks a lot for the work! The actual implementations of the formatters can stay in the builtin plugin like it is |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1673 +/- ##
========================================
Coverage ? 1.50%
========================================
Files ? 279
Lines ? 27088
Branches ? 14556
========================================
Hits ? 409
Misses ? 26421
Partials ? 258 ☔ View full report in Codecov by Sentry. |
Problem description
The default result export functionality of the Find tool is limited to only exporting data in a nonstandard text format. This PR adds support for exporting the results in CSV, TSV or JSON format. The PR also removes the old format.
Implementation description
I added the classes
ExportFormatter
,ExportFormatterCsv
,ExportFormatterTsv
andExportFormatterJson
, with similar implementations to the pattern data exporters.I also moved theViewFind::Occurrence
class intohex/helpers/types.hh
, so the exporters can access it.Screenshots
Additional things
Another small change I made is moving the "{} entries found" line on the same line as the Search and Reset buttons. I think it looks cleaner this way, but if anyone disagrees, I can revert it.