Permalink
Browse files

a nice update script

  • Loading branch information...
1 parent e74b938 commit 035b90462a0f9720acd64367bf222249c3d068d6 @holman holman committed Sep 6, 2011
Showing with 19 additions and 0 deletions.
  1. +1 −0 last-tweet-id
  2. +18 −0 update.sh
View
@@ -0,0 +1 @@
+110908502968508417
View
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Updates the repo with new tweets.
+#
+# Assumes that `last-tweet-id` in your root already contains the last tweet ID
+# you've made.
+set -x
+
+login="holman"
+email="zach@github.com"
+
+last_id=$(cat last-tweet-id)
+
+madrox --import=twitter --since-id=$last_id --email=$email $login
+git merge -s ours $login
+
+last_id=$(curl https://twitter.com/users/show/$login.json --silent | tr ',' "\n" | grep -m1 '"id"' | sed -e 's/"id"://g')
+echo $last_id > last-tweet-id

0 comments on commit 035b904

Please sign in to comment.