Browse Source

Edit: restructuring the Export-Section. Exporting as RData, TXT, CSV

pull/2/head
janwey 1 year ago
parent
commit
c91dcb1f73

+ 20
- 32
collecto.R View File

@@ -25,13 +25,11 @@ library("mastodon")
## Twitter Collector {{{ ----

### Authenticate to Twitter

#### Manual input (uncomment if needed)
#twitter_consumerkey <- readline("[Twitter] Enter your consumer API key.")
#twitter_consumerpri <- readline("[Twitter] Enter your consumer API secret.")
#twitter_tokenaccess <- readline("[Twitter] Enter your Access Token.")
#twitter_tokensecret <- readline("[Twitter] Enter your Token Secret.")

#### Saved credentials
twitter_api_cred <- read.table(file = "./twitter_api.txt", header = TRUE, sep = ";")
twitter_consumerkey <- as.character(twitter_api_cred$consumer_key)
@@ -186,7 +184,6 @@ twitter <- within(data = twitter, expr = {
# token = facebook_auth,
# since = "2018-01-01",
# until = "2018-31-12")

# }}}

## Mastodon Collector {{{ ----
@@ -214,34 +211,6 @@ mastodon_toot <- mastodon::get_hashtag(token = mastodon_auth,
local = FALSE,
n = 100)

# Note -------------------------------------------------------------------------
# Documentation is really poor, so here is a guess of the variables in the
# list() item
# 1. id
# 2. time
# 3.
# 4.
# 5.
# 6.
# 7. public/private
# 8. language
# 9. user-agent
# 10. post-text (html)
# 11. url of post
# 12.
# 13. favorites
# 14.
# 15.
# 16.
# 17.
# 18.
# 19. poster-information
# 20. image in post
# 21.
# 22. information about searched hashtag
# 23.
# ------------------------------------------------------------------------------

### public and non-public posts
mastodon_priv <- mastodon_toot[[7]]

@@ -323,9 +292,28 @@ mastodon <- within(data = mastodon, expr = {
# }}}

### Exporting data {{{ ----

time_of_saving <- sub(x = Sys.time(), pattern = " CET", replace = "")
time_of_saving <- sub(x = time_of_saving, pattern = " ", replace = "_")
time_of_saving <- gsub(x = time_of_saving, pattern = ":", replace = "-")
save_path <- paste0("./ilovefs-data_", time_of_saving, ".RData")

#### RData
save_path <- paste0("./data/ilovefs-all_", time_of_saving, ".RData")
save(list = c("twitter", "mastodon"), file = save_path)

#### Text
##### Fediverse
save_path_fed_t <- paste0("./data/ilovefs-fediverse_", time_of_saving, ".txt")
write.table(mastodon, file = save_path_fed_t)
##### Twitter
save_path_twitter_t <- paste0("./data/ilovefs-twitter_", time_of_saving, ".txt")
write.table(twitter, file = save_path_twitter_t)

#### CSV
##### Fediverse
save_path_fed_c <- paste0("./data/ilovefs-fediverse_", time_of_saving, ".csv")
write.csv(mastodon, file = save_path_fed_c)
##### Twitter
save_path_twitter_c <- paste0("./data/ilovefs-twitter_", time_of_saving, ".csv")
write.csv(twitter, file = save_path_twitter_c)
# }}}

ilovefs-data_2018-01-18_16-07-19.RData → data/ilovefs-all_2018-01-18_16-07-19.RData View File


BIN
data/ilovefs-all_2018-01-22_12-52-29.RData View File


+ 12
- 0
data/ilovefs-fediverse_2018-01-22_12-52-29.csv View File

@@ -0,0 +1,12 @@
"","date","time","lang","inst","text","link","favs","imag"
"1",20180112,165720,"en","gnusocial.no","@paulfree14 ok, why not a link to this b-shit webpage? i can ( other users to) take a view whit #lynx B-)#ilovefs and i like #humor :-)","https://gnusocial.no/notice/2881536","0","0"
"2",20180111,163220,"en","gnusocial.no","@paulfree14 pls, don't use the #meme (or bias) #opensource - this is marketing 'speech' https://www.infoworld.com/article/3121792/open-source-tools/whos-no-1-in-open-source-microsoft.html 'we' use the therm #freesoftware https://www.gnu.org/philosophy/open-source-misses-the-point.en.html thanks in advaced #ilovefs","https://gnusocial.no/notice/2877517","0","0"
"3",20180110,4644,"en","gnusocial.no","@throgh ja, #genial ! wie wärs: du machst dazu nen #workshop in #berlin so 3 bis 4 #hackerspaces wüsst ich adhoc die interesse hätten. #reisekosten antrag an#fsfe ! #diehamsdoch #ggeld ;-)#ilovefs und 'ne #gfreedistro (google freie distribution inkl anwendungen wie #webbrowser und #gvfs ich dachte immer das g in gvfs steht für #gnome und nicht für #fuckoffgoogle :-\","https://gnusocial.no/notice/2870416","0","0"
"4",20180109,210909,"en","gnusocial.no","@grmpyoldman test pass! :-)i hope i can travel this year to !foscon #ilovefs","https://gnusocial.no/notice/2869475","0","0"
"5",20180106,113524,"en","gnusocial.no","@qbi nö :-)ich nutz #anysoft ausem #fdroid #ilovefs","https://gnusocial.no/notice/2855288","0","0"
"6",20180106,21350,"en","gnusocial.no","@qbi@quitter.se nö :-)ich nutz #anysoft ausem #fdroid #ilovefs","https://gnusocial.no/notice/2853881","0","0"
"7",20180102,165407,"en","gnusocial.no","#hegemony on the #web ( as the most user known) is #fuckoffgoogle - pls, don't feed this #moloch whit my #metadata #thxinadvanced #ilovefs but not the #webbat","https://gnusocial.no/notice/2838402","0","0"
"8",20180102,145515,"en","gnusocial.no","aaaand! #drumroll : #Transportr works whit #openstreetmap :-)#ilovefs #freeyourandroid #fuckoffgoogleOsmAnd+ – Karten- &amp; GPS-Naviga OsmAnd+ – Karten- &amp; GPS-Naviga (Globale Karten- und Navigations-Applikation für offline und online OSM-Karten) - https://f-droid.org/app/net.osmand.plus","https://gnusocial.no/notice/2838001","0","0"
"9",20180102,145124,"en","gnusocial.no","#fdroid #freeyourandroid #fuckoffgoogle #ilovefs öffis nutzen ohne #bigbrother #Transportr (Public Transport Companion) - https://f-droid.org/app/de.grobox.liberario","https://gnusocial.no/notice/2837986","0","0"
"10",20180102,5050,"en","gnusocial.de","""We don't describe free software as an 'alternative' to proprietary, because that word presumes all the 'alternatives' are legitimate and each additional one makes users better off. In effect, it assumes that free software ought to coexist with software that does not respect users' freedom.We believe that distribution as free software is the only ethical way to make software available for others to use. The other methods, nonfree software and Service as a Software Substitute subjugate their users. We do not think it is good to offer users those 'alternatives' to free software.""(Source: http://www.gnu.org/philosophy/words-to-avoid.html.en#Alternative) !ilovefs #FreeSoftware #GNU","https://gnusocial.de/notice/12902972","1","0"
"11",20180101,221412,"en","gnusocial.no","Uhi, i think #nextcloud makes my day! #ilovefs #fckgoogle","https://gnusocial.no/notice/2835578","0","0"

+ 12
- 0
data/ilovefs-fediverse_2018-01-22_12-52-29.txt View File

@@ -0,0 +1,12 @@
"date" "time" "lang" "inst" "text" "link" "favs" "imag"
"1" 20180112 165720 "en" "gnusocial.no" "@paulfree14 ok, why not a link to this b-shit webpage? i can ( other users to) take a view whit #lynx B-)#ilovefs and i like #humor :-)" "https://gnusocial.no/notice/2881536" "0" "0"
"2" 20180111 163220 "en" "gnusocial.no" "@paulfree14 pls, don't use the #meme (or bias) #opensource - this is marketing 'speech' https://www.infoworld.com/article/3121792/open-source-tools/whos-no-1-in-open-source-microsoft.html 'we' use the therm #freesoftware https://www.gnu.org/philosophy/open-source-misses-the-point.en.html thanks in advaced #ilovefs" "https://gnusocial.no/notice/2877517" "0" "0"
"3" 20180110 4644 "en" "gnusocial.no" "@throgh ja, #genial ! wie wärs: du machst dazu nen #workshop in #berlin so 3 bis 4 #hackerspaces wüsst ich adhoc die interesse hätten. #reisekosten antrag an#fsfe ! #diehamsdoch #ggeld ;-)#ilovefs und 'ne #gfreedistro (google freie distribution inkl anwendungen wie #webbrowser und #gvfs ich dachte immer das g in gvfs steht für #gnome und nicht für #fuckoffgoogle :-\" "https://gnusocial.no/notice/2870416" "0" "0"
"4" 20180109 210909 "en" "gnusocial.no" "@grmpyoldman test pass! :-)i hope i can travel this year to !foscon #ilovefs" "https://gnusocial.no/notice/2869475" "0" "0"
"5" 20180106 113524 "en" "gnusocial.no" "@qbi nö :-)ich nutz #anysoft ausem #fdroid #ilovefs" "https://gnusocial.no/notice/2855288" "0" "0"
"6" 20180106 21350 "en" "gnusocial.no" "@qbi@quitter.se nö :-)ich nutz #anysoft ausem #fdroid #ilovefs" "https://gnusocial.no/notice/2853881" "0" "0"
"7" 20180102 165407 "en" "gnusocial.no" "#hegemony on the #web ( as the most user known) is #fuckoffgoogle - pls, don't feed this #moloch whit my #metadata #thxinadvanced #ilovefs but not the #webbat" "https://gnusocial.no/notice/2838402" "0" "0"
"8" 20180102 145515 "en" "gnusocial.no" "aaaand! #drumroll : #Transportr works whit #openstreetmap :-)#ilovefs #freeyourandroid #fuckoffgoogleOsmAnd+ – Karten- &amp; GPS-Naviga OsmAnd+ – Karten- &amp; GPS-Naviga (Globale Karten- und Navigations-Applikation für offline und online OSM-Karten) - https://f-droid.org/app/net.osmand.plus" "https://gnusocial.no/notice/2838001" "0" "0"
"9" 20180102 145124 "en" "gnusocial.no" "#fdroid #freeyourandroid #fuckoffgoogle #ilovefs öffis nutzen ohne #bigbrother #Transportr (Public Transport Companion) - https://f-droid.org/app/de.grobox.liberario" "https://gnusocial.no/notice/2837986" "0" "0"
"10" 20180102 5050 "en" "gnusocial.de" "\"We don't describe free software as an 'alternative' to proprietary, because that word presumes all the 'alternatives' are legitimate and each additional one makes users better off. In effect, it assumes that free software ought to coexist with software that does not respect users' freedom.We believe that distribution as free software is the only ethical way to make software available for others to use. The other methods, nonfree software and Service as a Software Substitute subjugate their users. We do not think it is good to offer users those 'alternatives' to free software.\"(Source: http://www.gnu.org/philosophy/words-to-avoid.html.en#Alternative) !ilovefs #FreeSoftware #GNU" "https://gnusocial.de/notice/12902972" "1" "0"
"11" 20180101 221412 "en" "gnusocial.no" "Uhi, i think #nextcloud makes my day! #ilovefs #fckgoogle" "https://gnusocial.no/notice/2835578" "0" "0"

+ 2
- 0
data/ilovefs-twitter_2018-01-22_12-52-29.csv View File

@@ -0,0 +1,2 @@
"","date","time","retw","favs","text","link","clnt"
"1",20180115,161646,"1","1","This is such an awesome inspirational video about #Drupal - if there's one thing I do agree with @tom_eric on is we… https://t.co/ClgnrO9OB6","https://twitter.com/i/web/status/952937613400399874","Twitter Web Client"

+ 2
- 0
data/ilovefs-twitter_2018-01-22_12-52-29.txt View File

@@ -0,0 +1,2 @@
"date" "time" "retw" "favs" "text" "link" "clnt"
"1" 20180115 161646 "1" "1" "This is such an awesome inspirational video about #Drupal - if there's one thing I do agree with @tom_eric on is we… https://t.co/ClgnrO9OB6" "https://twitter.com/i/web/status/952937613400399874" "Twitter Web Client"

Loading…
Cancel
Save