From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brad Bozarth Subject: Re: iPhone ----> org-mode Date: Wed, 25 Mar 2009 01:00:45 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LmO2p-00044T-NZ for emacs-orgmode@gnu.org; Wed, 25 Mar 2009 04:01:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LmO2p-00044H-2O for emacs-orgmode@gnu.org; Wed, 25 Mar 2009 04:01:03 -0400 Received: from [199.232.76.173] (port=36342 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmO2o-00044E-VP for emacs-orgmode@gnu.org; Wed, 25 Mar 2009 04:01:02 -0400 Received: from qw-out-1920.google.com ([74.125.92.146]:6248) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LmO2o-0006m1-Eu for emacs-orgmode@gnu.org; Wed, 25 Mar 2009 04:01:02 -0400 Received: by qw-out-1920.google.com with SMTP id 5so1568521qwf.24 for ; Wed, 25 Mar 2009 01:01:01 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 @@ =A0echo "." >> /tmp/crontest =A0/sw/bin/wget -O /tmp/req http://www.reqall.com/user/feeds/rss/82012e8e26= fae644e -/usr/bin/awk -f ~/repo/bin/reqallxml.awk /tmp/req =A0cd /Users/Brad/Dev/reqall/Brad/repo/org/ +/usr/bin/git pull +/usr/bin/awk -f ~/repo/bin/reqallxml.awk /tmp/req =A0/usr/bin/git add gtd.org =A0/usr/bin/git commit -m "Auto-reqall update $(date)" > /dev/null =A0/usr/bin/git push > /dev/null --- a/repo/bin/reqallxml.awk +++ b/repo/bin/reqallxml.awk @@ -414,7 +414,11 @@ END { =A0=A0=A0=A0=A0=A0=A0 newItems =3D 0; =A0=A0=A0=A0=A0=A0=A0 for ( guid in guids ) { +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 where =3D index(blobs[guid, "DESCRIPTION"],= "is typing what you said") +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (where) +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 continue; =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ret =3D system("egrep \"^" guid "\" ~/rep= o/bin/reqalldb > /dev/null"); =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if ( ret !=3D 0 ) { On Tue, Mar 24, 2009 at 10:56 PM, Brad Bozarth 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 lin= e 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 i= s (again, I was thinking in C). > -brad > > On Mon, Mar 23, 2009 at 1:32 AM, Brad Bozarth 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 >