Skip to content
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

Update CSV exporter to preserve times in PM UTC and preserve some characters #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvaneerde
Copy link

See Issue #90

@@ -3,8 +3,9 @@ const moment = require('moment');
const createCsvWriter = require('csv-writer').createObjectCsvWriter;

const csvWriter = createCsvWriter({
alwaysQuote: true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary to work around a bug in csv-writer where it isn't auto-quoting files that contain CR but not LF

This is fixed in csv-writer - see ryu1kn/csv-writer#57

So we could pick up a release of csv-writer that has the fix, and then remove this line

@bpb27
Copy link
Owner

bpb27 commented Nov 15, 2020

@mvaneerde sorry for the delay, I took some time AFK after the election.

I actually don't use this script to generate the CSV, I've been using this psql command:

psql -c "\copy trump_tweets TO '/path/to/file/tweets_11-06-2020.csv' with (format csv,header true, delimiter ',');"

I'll try converting this script with your suggestions though.

@mvaneerde
Copy link
Author

mvaneerde commented Nov 29, 2020 via email

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

Successfully merging this pull request may close these issues.

2 participants