From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sven Bretfeld" Subject: Re: MobileOrg and Voice Capturing (Android) Date: 7 Dec 2010 11:05:45 +0100 Message-ID: <87sjy9oq2u.fsf@gmx.ch> References: <87fwul463g.fsf@gmx.ch> <4CF46B08.2020200@comcast.net> <87d3plotiv.fsf@gmx.ch> <4CF6FBF0.1090707@comcast.net> <874oawppqa.fsf@gmx.ch> <4CF7F014.7080203@comcast.net> <4CF8210A.8020705@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=43138 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPuQu-0005yj-EE for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 05:06:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPuQV-0008Ch-60 for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 05:06:04 -0500 Received: from mx5.rz.ruhr-uni-bochum.de ([134.147.64.33]:59589) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PPuQU-0008Bw-Of for emacs-orgmode@gnu.org; Tue, 07 Dec 2010 05:05:39 -0500 In-Reply-To: (Matthew Jones's message of "Fri, 3 Dec 2010 00:02:02 -0500") 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: Matthew Jones Cc: emacs-orgmode@gnu.org Hi Matthew Matthew Jones writes: > Alright guys, I've gotten this to work.... I've posted an early build of > MobileOrg that supports this here: > > http://matburt.net/files/mobileorg-debug.apk > > basically, you need to emit the action: com.matburt.mobileorg.CAPTURE > > it takes an "extra" intent value called "txtValue" which will pre-populate the > text display. I was using the script for some days now and did all my capturing this way. It is completely stable and reliable on my HTC Magic with Android 1.6. I see no hindrance for a release. > import android > droid = android.Android() > message = droid.recognizeSpeech("Capture New Note").result > a = droid.startActivity("com.matburt.mobileorg.CAPTURE", None, None, > {'txtValue':message}, False) Is there a way to enlarge the 'extra' intent with some standard string? It would be nice to have a TODO keyword and a TAG inserted automatically. If you are like me, you tend to forget refiling the items of from-mobile.org regularly. An automatic TAG insertion could help to remind yourself that there is something new that needs to be cared about. I use to give a TAG :MIT: (Most Important Things [of the day]) and have a respective Agenda View that I review several times a day. If newly captured items could appear in this list, I would never forget about the newly captured tasks. To my regret, I don't know anything about Python and its syntax, but I'm sure that the 'message' variable can be extended easily (what I have tried did never work). As a workaround I have written a simple shellscript for a Cronjob that starts Conky whenever there is something new in from-mobile.org. So my desktop reminds me to refile the new items. Maybe it is of some interest for anybody, so I give it below. Thanks again for your nice work. Greetings, Sven Here is the Script. Some values and paths have to be replaced to fit your needs: --8<---------------cut here---------------start------------->8--- #!/bin/bash KILLNR="$(ps ax | grep "conky -c .*conkyrc-mobile" | grep -v grep | sed 's/ pts.*//g')" NEWTASK="$(cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v auto-revert | grep -v ^$ | grep -v 20[0-9][0-9])" if [ -n "$NEWTASK" ]; then if [ -n "$KILLNR" ]; then exit # echo "file is full, conky is running" else conky -c ~/.conkyrc-mobile & # echo "file is full, conky is not running" fi else if [ -n "$KILLNR" ]; then kill $KILLNR # echo "file is empty, conky is running" else exit # echo "file is empty, conky is not running" fi fi --8<---------------cut here---------------end--------------->8--- This script needs a special configuration file .conkyrc-mobile to be placed in the home folder: --8<---------------cut here---------------start------------->8--- own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager use_spacer right use_xft yes xftfont DejaVu Sans:size=18 xftalpha 0.8 text_buffer_size 2048 update_interval 3.0 draw_shades no draw_outline no draw_borders no uppercase no stippled_borders 3 border_margin 9 border_width 10 default_color grey own_window_colour brown own_window_transparent yes alignment top_right gap_x 10 gap_y 10 TEXT $color ${Color green}NEW TASKS ${execi 10 cat /home/sven/Dropbox/myconf/from-mobile.org | grep -v auto-revert | grep -v ^$ | grep -v 20[0-9][0-9]}$color --8<---------------cut here---------------end--------------->8---