emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brad Bozarth <prettygood@cs.stanford.edu>
To: emacs-orgmode@gnu.org
Subject: Re: iPhone ----> org-mode
Date: Wed, 25 Mar 2009 01:00:45 -0700	[thread overview]
Message-ID: <f47cd1b50903250100n5c817785h9c7a6eae11b71cb9@mail.gmail.com> (raw)
In-Reply-To: <f47cd1b50903242256p2ac5d07btc532107885b4eb5f@mail.gmail.com>

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
<prettygood@cs.stanford.edu> 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 <prettygood@cs.stanford.edu> 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	other threads:[~2009-03-25  8:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-22 10:38 iPhone ----> org-mode Brad Bozarth
2009-03-22 13:52 ` Carsten Dominik
2009-03-23  8:32   ` Brad Bozarth
2009-03-23 13:47     ` Ian Barton
2009-03-24  0:43       ` Brad Bozarth
2009-03-24  7:37         ` Carsten Dominik
2009-03-24  8:30           ` Ian Barton
2009-03-24  8:38             ` Carsten Dominik
2009-03-24 10:20               ` Ian Barton
2009-03-24  7:03       ` Rob Weir
2009-03-25  5:56     ` Brad Bozarth
2009-03-25  8:00       ` Brad Bozarth [this message]
2009-03-22 21:23 ` John Rakestraw
2009-03-24 11:32 ` Carsten Dominik
2009-03-24 18:21   ` Brad Bozarth
2009-03-25  8:28     ` Carsten Dominik
2009-03-25  8:36 ` Carsten Dominik
2009-03-25  8:50   ` Brad Bozarth
2009-03-25 19:52     ` Carsten Dominik
2009-03-25 20:39       ` John Rakestraw
2009-03-25 20:40         ` Carsten Dominik
2009-03-25  9:06   ` Brad Bozarth
2009-03-25  9:09     ` Carsten Dominik
2009-03-25  9:25       ` Carsten Dominik
2009-03-25  9:35   ` Ian Barton
2009-03-25 10:57     ` William Henney
2009-03-26 15:39       ` Carsten Dominik
2009-03-26 17:07         ` William Henney
2009-03-26 18:20           ` Richard Riley
     [not found]         ` <71454fac0903261121u79e85c3bq2538a294701e4c78@mail.gmail.com>
2009-03-27  9:15           ` Carsten Dominik
2009-03-27 15:45             ` Sven Bretfeld
2009-03-27 17:29               ` Carsten Dominik
2009-03-27 18:07                 ` David Bremner
2009-03-25 14:29     ` Bernt Hansen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f47cd1b50903250100n5c817785h9c7a6eae11b71cb9@mail.gmail.com \
    --to=prettygood@cs.stanford.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).