`t users --csv` option doesn't escape commas or newlines

Open
#352 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
cli

Research direction

Start with the t users --csv command and trace how Ruby's to_csv output passes through say. Verify whether commas and newlines in tweets and descriptions remain escaped, then confirm that the generated CSV is parsable.

Written by the indexing model from the issue text.

Description

bug

The generated csv from t users isn't parsable; it contains user tweets & descriptions, which often contain commas and newlines.

Ruby's to_csv method seems to escape commas and newlines. I'm not familiar with say, but that might be what's unescaping them?

I spent a while looking into this but I'm unfamiliar with Ruby's gem system. Simply appending to_csv().html_safe might do the trick, but I couldn't figure out how to apply my changes to the global gem.

Dominant language
Ruby
Stars
5.6k
Forks
402
Avg merge
13h 50m
Merged PRs (30d)
5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sferik/x-cli

All issues in sferik/x-cli

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.