diff --git a/app/utils/twitter.js b/app/utils/twitter.js index b98cd57..08d0074 100644 --- a/app/utils/twitter.js +++ b/app/utils/twitter.js @@ -173,6 +173,7 @@ export function toCsv(jsonPath, csvPath) { 'lang', 'place', 'possibly_sensitive', + 'quote_id', 'retweet_count', 'retweet_id', 'retweet_screen_name', @@ -229,11 +230,12 @@ function csvRow(t) { t.lang, place(t), t.possibly_sensitive, + t.quoted_status_id_str, t.retweet_count, retweetId(t), retweetScreenName(t), t.source, - t.full_text, + text(t), tweetUrl(t), u.created_at, u.screen_name, @@ -253,6 +255,14 @@ function csvRow(t) { ] } +function text(t) { + if (t.retweeted_status) { + return t.retweeted_status.full_text + } else { + return t.full_text + } +} + function coordinates(t) { if (t.coordinates) { return t.coordinates.coordinates diff --git a/package.json b/package.json index 0e0b06f..6476ac2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hydrator", - "version": "0.1.0", + "version": "0.2.0", "description": "A desktop utility to hydrate Twitter ID datasets.", "main": "init.js", "author": {