Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Add support to tab separated csv files #50

Open
pedroportasvieira opened this issue Dec 5, 2018 · 4 comments
Open

Add support to tab separated csv files #50

pedroportasvieira opened this issue Dec 5, 2018 · 4 comments

Comments

@pedroportasvieira
Copy link

Hi,

So, was using this plugin and could not use it with tab separated csv files. All good for comma separated ones, but not tab separated ones.

Is viable to do this support based on the current implementation?

PS: If so, and if not a priority, i can try to do a PR for this.

Thanks in advance

@larsyencken
Copy link
Owner

larsyencken commented Dec 9, 2018 via email

@pedroportasvieira
Copy link
Author

pedroportasvieira commented Dec 10, 2018

Also tried it but it gives an error.

ERROR: CSV parse error on line 2

@larsyencken
Copy link
Owner

larsyencken commented Dec 16, 2018 via email

@simbo1905
Copy link

I tested out passing a tab as --sep and it works fine although there is a bit of a challenge to pass a tab as a commandline arg with bash due to it wanting to do tab completion. A quick google found --sep $'\t' which works fine as per the output below:

 2019-05-22 05:59:15 ⌚  |2.4.4| MacBook-Pro-3 in ~/projects/csvdiff
± |master ?:27 ✗| → head a.tsv b.tsv 
==> a.tsv <==
id	name	amount
1	bob	20
2	eva	63
3	sarah	7
4	jeff	19
6	fred	10

==> b.tsv <==
id	name	amount
1	bob	20
2	eva	63
3	james	7
4	jeff	19
6	fred	10

 2019-05-22 05:59:17 ⌚  |2.4.4| MacBook-Pro-3 in ~/projects/csvdiff
± |master ?:27 ✗| → csvdiff --style=summary --sep $'\t' id a.tsv b.tsv 
0 rows removed (0.0%)
0 rows added (0.0%)
1 rows changed (20.0%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants