-
Notifications
You must be signed in to change notification settings - Fork 154
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
fix csv format #118
fix csv format #118
Conversation
7ad609e
to
ce140d8
Compare
Address is the only field that'll break csv froamt, so we can explicitly quote address field to counter this issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There could be others, we need a more generic solution than this 😄
Is this WIP or actually ready @rm-Umar ? |
As I expected the CSV writer adds a newline at the end on each write it does, so we have all kinds of weird scenarios happening: $ ./build/ipinfo bulk --csv -f asn 1.1.1.1 2.2.2.2
ip,asn_id,asn_name,asn_domain,asn_route,asn_type
1.1.1.1,AS13335,"Cloudflare, Inc.",cloudflare.com,1.1.1.0/24,hosting
2.2.2.2,AS3215,Orange S.A.,orange.com,2.2.0.0/16,isp
$ ./build/ipinfo bulk --csv -f asn,asn 1.1.1.1 2.2.2.2
ip,asn_id,asn_name,asn_domain,asn_route,asn_type,asn_id,asn_name,asn_domain,asn_route,asn_type
1.1.1.1,AS13335,"Cloudflare, Inc.",cloudflare.com,1.1.1.0/24,hosting
,AS13335,"Cloudflare, Inc.",cloudflare.com,1.1.1.0/24,hosting
2.2.2.2,AS3215,Orange S.A.,orange.com,2.2.0.0/16,isp
,AS3215,Orange S.A.,orange.com,2.2.0.0/16,isp
|
It's still in progress I'll mark it ready when it's ready. |
Ah okay. Got pinged for review so wasn't sure 😄 |
Now it's ready to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Will release it tomorrow or the day after hopefully. |
fixed #85