emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Henney <whenney@gmail.com>
To: Ian Barton <lists@manor-farm.org>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <dominik@science.uva.nl>
Subject: Re: iPhone ----> org-mode
Date: Wed, 25 Mar 2009 11:57:42 +0100	[thread overview]
Message-ID: <41c818190903250357r147a6a8ah65feac62df49835@mail.gmail.com> (raw)
In-Reply-To: <49C9FAC6.2070904@manor-farm.org>

[-- Attachment #1: Type: text/plain, Size: 2131 bytes --]

On Wed, Mar 25, 2009 at 10:35 AM, Ian Barton <lists@manor-farm.org> wrote:
>
>>
>> I do hope that this will not stop python hackers from exploring
>> this further, because I thought that the python solution was really
>> good and innovative, and it shows what can be done with modules like
>> the ones Charles has put out.
>>
>> - Carsten
>
> Don't worry it wont:) I have set up a repo for my Python version at
>  git://github.com/geekinthesticks/org-reqall.git . It doesn't have anything
> in it at the moment, because I stupidly put my own reqall rss url in one of
> the versions for testing purposes, so its in the version history.
>

I also have been hacking on Ian's python script - I hope you don't mind!

I changed it to support Ta-da lists (tadalist.com) rather than reqall.
In my opinion, ta-da list is a much simpler and has a nice clean
interface. It has the disadvantage that it doesn't have an
accompanying iPhone/Touch app that works offline, although it does
have a beautiful ipod-optimized web interface. And it doesn't support
bling such as voice memos, but then reqall doesn't support voice memos
on the Touch either, even if you have an external mic :(

Anyway, I am attaching it (sync-tadalist.py) in case anyone finds it
useful. In particular, it has a few changes that Ian might want to
fold back into his version. For instance, it solves the private URL
problem by reading it from an external dot file. Also, the original
was repeatedly parsing the org file inside the loop over feed entries.
This is unnecessary, so I have moved it outside.

I guess that ideally we want a webservice that

1. Allows adding tasks etc via a mobile device, preferably with
offline capabilities and syncing

2. Exports RSS feeds of tasks so that org-mode can grab them

3. Exports an API that would let org-mode write information back to
the service, e.g., marking a task as done

Does anyone know of a service that supports all 3?

Cheers

Will


-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

[-- Attachment #2: sync-tadalist.py --]
[-- Type: application/octet-stream, Size: 2333 bytes --]

#!/usr/bin/python
##
## Original version by Ian Barton <lists@manor-farm.org>
## Inspired by an earlier idea from Brad Bozarth <prettygood@cs.stanford.edu>
## See this thread mailplane://whenney%40gmail.com/#all/12039b935bfa22e8
##
## 25 Mar 2009 Will Henney - edited to support Ta-da instead of reQall
##

# WJH 25 Mar 2009 - note this is not the same as email.feedparser in the standard lib
# but is rather from http://code.google.com/p/feedparser
import feedparser

# Note the current version of orgnode.py
# requires a file with at least one entry.
# WJH 25 Mar 2009 - this is from http://members.optusnet.com.au/~charles57/GTD/orgnode.html
# WJH 25 Mar 2009 - had to change orgnode -> Orgnode
import Orgnode


# WJH place the desired feed URL in the file .tada-rss-feed
REQUALL_URL = open('.tada-rss-feed').read().strip()

ORG_FILE = 'tada-tasks.org'

def write_task(task):
    logfile = open(ORG_FILE, 'a')
    parent_heading = '* %s\n' % (task.parentlist)
    str = "** TODO %s\n   :PROPERTIES:\n   :guid: %s\n   :END:\n" % (task.title, task.guid)
    if parent_heading not in listoflists: 
	logfile.write(parent_heading)
	listoflists.append(parent_heading)
	if debug > 0:
	    print "Added new top-level list: %s" % (task.parentlist)
    logfile.write(str)
    if debug > 0:
	print "Added %s to %s" % (task.title, task.parentlist)
    logfile.close()

def load_org_file():
    """
    Create a list of org objects.
    """
    nodelist = Orgnode.makelist(ORG_FILE)
    return nodelist


# Open and parse the rss feed.
d = feedparser.parse(REQUALL_URL)

print d.feed.title

# build a list of all the guids in the org file.
# WJH 25 Mar 2009 - I see no need to repeat this part for every entry
nodelist = load_org_file()
guids = []
for node in nodelist:
    guids.append(node.Property('guid'))

listoflists = []
debug = 1
for entry in d['entries']:
    # Only add entries for guids that are not already in the file.    
    if entry.guid in guids:
        print "Entry skipped."
    else:    
	# WJH 25 Mar 2009 - add new guid to saved list
	guids.append(entry.guid)
	if debug > 1:
	    for key in entry.keys():
		print "%s :: %s" % (key, entry[key])
	# Strip the prefix "On " from description to get parent list
	if entry.description.startswith("On "):
	    entry.parentlist = entry.description[3:] 
        write_task(entry)

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-03-25 10:57 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
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 [this message]
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=41c818190903250357r147a6a8ah65feac62df49835@mail.gmail.com \
    --to=whenney@gmail.com \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=lists@manor-farm.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).