{"id":4217,"date":"2016-08-29T18:06:41","date_gmt":"2016-08-29T18:06:41","guid":{"rendered":"http:\/\/johnjohnston.info\/blog\/?p=4217"},"modified":"2016-08-29T18:24:24","modified_gmt":"2016-08-29T18:24:24","slug":"pushing-and-pulling-the-twitter-archive","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/pushing-and-pulling-the-twitter-archive\/","title":{"rendered":"Pushing and Pulling the Twitter Archive"},"content":{"rendered":"<p>There are probably 2 folk who have a slight interest in this rather geeky post. It does not have much to do with ICT in the classroom.<\/p>\n<p>I&#8217;ve been using <a href=\"https:\/\/twitter.com\/mhawksey\">Martin Hawksey<\/a>&#8216;s twitter archiver for a while now. This archived my tweets to Google Drive and made them <a href=\"https:\/\/49a43ec03ae7f4ced52ba54ee03d0a7a61584ad4.googledrive.com\/secure\/ALQ3t37OCFarx2i3M1npXoGAZ7WLpjYJQxJ-_4BjRuxrEbcJUFiTUs62-74k0GUoD6QZcazRIBxh8P7lcbYK_NNXQlorZ_jOCaTYSsJ1Cb1DXGSIVbSS-rIxdJU81SAtsf13MK6TYGeBWRJzH0j-has3QGGVfyfjAigpySbFMfj_JyMqhwo2KtIdsvgQVGVz0rhp0LzWQOTg632eSGmMRO1IeDshmioQ3TQxcuIJoQvSqVBU4rgNhVs9TDhc9NP48Hzk8vuZcBIRX7xpVYlXV-ealwnIMYjuHLU6rZFECzE6mjikNYEe5QyfyW5Snsi5RblWRCqwoKcDpr3iTs5l6jUMkuyDu5pghV7wYA5SwbVFC7eXxULYoRkLyZRNkvBheZMYFEwOgt3444JJGI46pxdyZfyHxwcJJDTOV3t0boIEClbwLVQd-FUW2mGsHnlwbphhIyv0A7cDLKusrLYE9bGmfI_b0M9G7nvBLbWcqSSa1CZDx1YooT4_Lp_diIP3VBk220CZOM6NNfbhZvgo6Yl5gKPT8JhXnal502KuOeIuTeLbhha_xXZnMgq665VfDJz4-bBvCU8CmR8hVkB3ASlIHtELjC9mwLKhgzqDX6I9vSNAKSvg15-zRGRhF6P5RrLmH366UvAnogwcG4RlXpiVAdq51YZySGD_8_fGRcow-sy_9c9cOcc=\/host\/0B-cxu1n6ipTifmtQM2ZELVYtUjVaWE5LZ0FWbFN2RDhDV29wVFVUUnIwM0h0Ni1TeDIxYWs\/\">available online<\/a>.<\/p>\n<p>The other day I saw Martin tweet a change. Google Drive will drop the ability to serve webpages soon so Martin has <a href=\"https:\/\/mashe.hawksey.info\/2016\/08\/keeping-your-twitter-archive-fresh-and-freely-hosted-on-github-pages\/\">updated the setup to use GitHub<\/a>. He also took the time to make the setup a lot more user friendly (if you have a github account and a very little experience with git).<\/p>\n<p>The set up involves downloading your twitter archive from twitter. You then set up your <a href=\"https:\/\/pages.github.com\/\">GitHub Pages &#8211; Website<\/a>. To this you push your downloaded archive, connect to Martin&#8217;s script and away you go. The local git stuff is just used to kick off the pages site, which then is updated from the script. It works a treat: <a href=\"https:\/\/troutcolor.github.io\/tweets\/\">My Twitter archive<\/a>. I am not trying to replicate the instructions here, the <a href=\"https:\/\/script.google.com\/macros\/s\/AKfycbzbBwpWfqL4VMy9DYmaEaqZucGlXK6yKKEZWFqPzG6o0AKC2OjR\/exec\">set up page<\/a> has that covered.<\/p>\n<p>What I did wonder was if you could pull the updates back down locally. Sort of <a href=\"https:\/\/indieweb.org\/PESOS\">PESOS<\/a>, but to my hard drive rather than own site. I guess it could go truly PESOS if I knew how to push it out to johnjohnston.info (<em>thinks, maybe I do<\/em> <a id=\"fnr1-2016-08-29\" href=\"#fn1-2016-08-29\"><sup>1<\/sup><\/a>).<\/p>\n<p>This is how I pull the github stuff back down to my hard driver.<\/p>\n<p>A very simple shell script:<\/p>\n<p><code>cd \/Users\/john\/Sites\/troutcolor.github.io\/;git pull &gt; \/Users\/john\/Desktop\/loga.txt<\/code><\/p>\n<p>saved in a file and the file made executable, (<em>the loga.txt file was just for testing<\/em>).<\/p>\n<p>A launchd\u00a0<a id=\"fnr2-2016-08-29\" href=\"#fn2-2016-08-29\"><sup>2<\/sup><\/a> configuration file, made with <a href=\"https:\/\/www.peterborgapps.com\/lingon\/\">Lingon<\/a>\u00a0runs the script every day.<\/p>\n<p><em>Featured Image: <a href=\"https:\/\/www.flickr.com\/photos\/piper\/3637688231\/\">A Bird in the Hand<\/a> by <a href=\"https:\/\/www.flickr.com\/photos\/piper\/\">Julie Falk<\/a> used under a <a href=\"https:\/\/creativecommons.org\/licenses\/by-nc\/2.0\/\">CC-BY-NC license.<\/a><\/em><\/p>\n<div class=\"footnotes\">\n<p>1. <a id=\"fn1-2016-08-29\"><\/a> As I wrote this I realise that <a href=\"https:\/\/github.com\/git-ftp\/git-ftp\">git-ftp<\/a> could do this. After configuring it in my local folder I added <code>git ftp push<\/code> to the script. This will push to my website, so <a href=\"http:\/\/johnjohnston.info\/t\/tweets\/\">My Twitter archive<\/a> on johnjohnston.info. <a href=\"#fnr1-2016-08-29\">\u21a9<\/a><\/p>\n<p>2. <a id=\"fn2-2016-08-29\"><\/a> launchd seem to be thing to use instead of cron to run things periodically on a mac. Lingon simplifies creating and handling them. I&#8217;m using the old 2x version of Lingon, it seems to work.<a href=\"#fnr2-2016-08-29\">\u21a9<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>There are probably 2 folk who have a slight interest in this rather geeky post. It does not have much to do with ICT in the classroom. I&#8217;ve been using Martin Hawksey&#8216;s twitter archiver for a while now. This archived my tweets to Google Drive and made them available online. The other day I saw [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4218,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[560,561,26,607],"post_format":[],"class_list":{"0":"post-4217","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wwwd","8":"tag-git","9":"tag-github","10":"tag-twitter","11":"tag-twitter-archive","12":"kind-article","14":"h-entry","15":"hentry"},"better_featured_image":{"id":4218,"alt_text":"","caption":"","description":"","media_type":"image","media_details":{"width":800,"height":572,"file":"2016\/08\/a-bird-in-the-hand.jpg","sizes":{"thumbnail":{"file":"a-bird-in-the-hand-150x150.jpg","width":150,"height":150,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-150x150.jpg"},"medium":{"file":"a-bird-in-the-hand-620x443.jpg","width":620,"height":443,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-620x443.jpg"},"medium_large":{"file":"a-bird-in-the-hand-768x549.jpg","width":768,"height":549,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-768x549.jpg"},"post-thumbnail":{"file":"a-bird-in-the-hand-668x478.jpg","width":668,"height":478,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-668x478.jpg"},"sempress-image-post":{"file":"a-bird-in-the-hand-668x478.jpg","width":668,"height":478,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-668x478.jpg"},"rpwe-thumbnail":{"file":"a-bird-in-the-hand-45x45.jpg","width":45,"height":45,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-45x45.jpg"},"jetpack-portfolio-admin-thumb":{"file":"a-bird-in-the-hand-50x50.jpg","width":50,"height":50,"mime-type":"image\/jpeg","source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand-50x50.jpg"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":4217,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand.jpg"},"jetpack_featured_media_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2016\/08\/a-bird-in-the-hand.jpg","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-161","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=4217"}],"version-history":[{"count":2,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4217\/revisions"}],"predecessor-version":[{"id":4220,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/4217\/revisions\/4220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media\/4218"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=4217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=4217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=4217"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=4217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}