csvtools
csvtools copied to clipboard
csvlook implementation
Add ability to space out columns so they are easy to look at.
For delight: cat file.csv | csvcut -K 0,1 | csvlook
How awesome!
I have some questions:
- Could you merge with the current upstream? It's your code, and you'll know best how to merge it.
- Can you add test for
csvlook
and the handling of the tab as separator in the other programs?
If you have questions on how to add tests, I'll be happy to point you in the right way.
Codecov Report
Merging #13 into master will decrease coverage by
5.56%
. The diff coverage is15.09%
.
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 69.45% 63.89% -5.57%
==========================================
Files 7 8 +1
Lines 848 950 +102
Branches 186 214 +28
==========================================
+ Hits 589 607 +18
- Misses 197 280 +83
- Partials 62 63 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/csvawk.c | 51.03% <0%> (-0.02%) |
:arrow_down: |
src/csvgrep.c | 71.68% <0%> (-0.32%) |
:arrow_down: |
src/csvcut.c | 67.02% <0%> (-0.37%) |
:arrow_down: |
src/csvlook.c | 16.49% <16.49%> (ø) |
|
src/csv_tokenizer.c | 81.93% <0%> (+0.11%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 31caeb6...eed0f64. Read the comment docs.
Current coverage is 64.05% (diff: 16.34%)
@@ master #13 diff @@
==========================================
Files 7 8 +1
Lines 848 946 +98
Methods 51 56 +5
Messages 0 0
Branches 186 213 +27
==========================================
+ Hits 589 606 +17
- Misses 197 277 +80
- Partials 62 63 +1
Powered by Codecov. Last update 31caeb6...efe7ca7
Hi Davy,
I won't be able to add test coverage. I'll leave it in your capable hands now.
hmm, what should happen if a quoted cell contains a newline?
For cvslook, I think quotes should be removed, newlines should be stripped, etc. You're trying to take a quick look at the data perhaps after grep or cut. Come to think of it, I think default should stop after about 20 rows with a parameter to continue on the full file.
I like the feature of stopping after n rows, perhaps it should be renamed to csvhead?