[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] iPhone ----> org-mode

From: Brad Bozarth
Subject: Re: [Orgmode] iPhone ----> org-mode
Date: Wed, 25 Mar 2009 01:00:45 -0700

Couple more fixes - do a git pull in the shell script to keep my
auto-updater's repository up to date and avoid git push failure, and
avoid adding new Reqall items until they have been transcribed (at
first they show up in RSS as "Reqall is typing what you said")

--- a/repo/bin/get_reqall_tasks.sh
+++ b/repo/bin/get_reqall_tasks.sh
@@ -3,8 +3,9 @@
 echo "." >> /tmp/crontest

 /sw/bin/wget -O /tmp/req http://www.reqall.com/user/feeds/rss/82012e8e26fae644e
-/usr/bin/awk -f ~/repo/bin/reqallxml.awk /tmp/req
 cd /Users/Brad/Dev/reqall/Brad/repo/org/
+/usr/bin/git pull
+/usr/bin/awk -f ~/repo/bin/reqallxml.awk /tmp/req
 /usr/bin/git add gtd.org
 /usr/bin/git commit -m "Auto-reqall update $(date)" > /dev/null
 /usr/bin/git push > /dev/null

--- a/repo/bin/reqallxml.awk
+++ b/repo/bin/reqallxml.awk
@@ -414,7 +414,11 @@ END {

        newItems = 0;
        for ( guid in guids ) {
+           where = index(blobs[guid, "DESCRIPTION"], "is typing what you said")
+           if (where)
+               continue;
            ret = system("egrep \"^" guid "\" ~/repo/bin/reqalldb > /dev/null");
            if ( ret != 0 ) {

On Tue, Mar 24, 2009 at 10:56 PM, Brad Bozarth
<address@hidden> wrote:
> I should note that I tried to clean up the files a bit to make them more 
> readable before uploading, and I realized the "clean" version of 
> reqallxml.awk in the attachment has two silly bugs - "/* nothing for now */ 
> ;" on line 368 should be "; # nothing for now" (C-style comments don't work 
> in awk). And the system call string on line 425 can't be split across lines 
> as it is (again, I was thinking in C).
> -brad
> On Mon, Mar 23, 2009 at 1:32 AM, Brad Bozarth <address@hidden> wrote:
>> Sure! As I said, it's a hack - it would obviously be better
>> implemented with one elisp batch script or something, but I was in a
>> hurry, and it's been working for me.
>> Reqall is a free app kind of like Jott, if you're familiar with that.
>> You can phone into it (thus this hack would work with a blackberry or
>> your friend's landline or any phone, not just the iphone) or use an
>> iphone or web interface to plop in todos (and various other things,
>> which I don't use). It can publish your items as an RSS feed. Here's
>> how voice -> org-mode happens:
>> I use a cron job every 10 minutes to run get_reqall_tasks.sh
>> This wget's my reqall RSS feed, runs reqallxml.awk on it (updates my
>> .org file), and commits and pushes the .org
>> reqallxml.awk parses the reqall items and saves a flat local DB
>> (currently just to check for newness of items), doing some simple
>> formatting on new items and sticking them in my .org file to be
>> processed later
>> Pretty simple - it could be cleaner, and filenames and such are
>> hardcoded, but it should be easy for anyone to fix it up or simply
>> replace the filenames and formatting to their liking. It's simple ...
>> but still feels like magic when I press one button on my iPhone in the
>> car, and what I spoke is sitting in my gtd.org when I get to the
>> office :) ... tarball of hack attached. Note that my awk is from OS X,
>> should work on linux as well though (I first got it running on linux,
>> but had to escape some / characters in a pattern match to get
>> reqallxml.awk to work on my mac and haven't tested it again on linux).
>> -brad

reply via email to

[Prev in Thread] Current Thread [Next in Thread]