Adding GUI query option to output results as plain text#79
Conversation
|
@dspinellis Please review |
dspinellis
left a comment
There was a problem hiding this comment.
Thank you for the whitespace fixes. I now see some required code structure improvements. I made comments to the first case, but they apply to all.
f80f967 to
98a0634
Compare
Addressed all comments @dspinellis , Sir please re-review |
|
Hey @dspinellis , Just a reminder |
dspinellis
left a comment
There was a problem hiding this comment.
The code shows me that you removed the pagination info. This means that code cannot reliably go through the results as you want. Consider adding a URL option (no user option is required) for providing the results in JSON with suitable pagination options and results.
98a0634 to
1619545
Compare
@dspinellis , Addresed:
|
|
@dspinellis , just a reminder |
dspinellis
left a comment
There was a problem hiding this comment.
Thank you! The functionality looks right, but the code volume has increased substantially with many repetitions. Please consider abstracting output based on text type and pagination into separate files so that the original code can be considerably cleaner.
@dspinellis , Addressed |
a39dee8 to
d414ba9
Compare
Description
This PR adds a per-query "Plain text output" checkbox to CScout's web interface query forms, allowing users to request plain text results for individual queries instead of HTML. This is useful for machine consumption, scripting, or users who prefer unformatted output.
Related issue: #35
Changes
txtcheckbox (bool plain_text = !!swill_getvar("txt"))if (plain_text)branches, eliminating duplicated code blocksINT_MAXpage size) in plain text mode, since paging is not appropriate for machine-consumable outputoutput_plain_text_elementtemplate specializations for type-safe plain text output of identifiers, functions, and file pathsFunction Name\tMetricName\n...Verification
Examples
Before (HTML)
After (Plain Text)