Forums

Discuss all things Remember The Milk.

Any Unix-Savvy People in the House? You Could Do the Command-Line RTM

(closed account) says:
As I was jotting a few quick notes I didn't have time to record in RTM this morning, it occurred to me ... we needn't wait for RTM to create a Unix command-line version (like Hiveminder has or like Lifehacker's todotxt).

There's at least three ways of doing it.

(1) There's the API. I have no idea how to do that. It's probably the best method, and if someone did it using the API, it'd be least inclined to break; I imagine it might be the hardest, however.

(2) I am not signed up for Twitter, even though I've heard that it is essentially a command-line RTM in and of itself. I'm sure someone's put together a "send a tweet from the Unix prompt" app and that this could be used for RTM entry.

(3) I imagine that something could be done from the command-line to spoof itself as if it was the Quick Add bookmarklet, i.e., submitting a HTML form that had values for task, tags, list, etc. assigned to the variables that the Quick Add bookmarklet assigns them to.

None of the above is in my sphere, however. But RTM's SUCH a popular and widespread app that perhaps it's got someone out there willing to take the ball and run with it. Any takers?

(P.S. No offense, but if you find no use for this idea, please don't spam the thread with how easy it is to do it in your own preferred way and why don't you just go do it in such-and-such-a-way. A lot of people work in an environment with a Unix command line -- given that it's native to both Mac OS X and Linux, and available for Windows via Cygwin -- so if it's not your preferred method of input, all I'm saying is don't whine about it here.)
Posted at 3:04pm on October 22, 2007
david.knickmeyer says:
I've got it working using twitter, and yes, firing things off from the command line is great. I started using the launchy version someone came up with and just migrated it over to unix land.

First, you'll need a twitter account and add rtm as a friend or whatever they call it. The directions here are easy to follow. You can test it by logging in to twitter and sending the message 'd rtm test'. A test message will show up in your rtm inbox.

Next, install curl on your unix box if you don't already have it. Then put this script somewhere in your path (~/bin, for example):

#!/bin/bash
curl --basic --user username:password --data --status="d rtm $*" http://www.twitter.com/statuses/update.xml

Now, whenever you are at the command line, just type 'rtm ' and away it goes!
Posted 17 years ago
(closed account) says:
Great! Can't wait to give this a try.
Posted 17 years ago
swanberg says:
You could also use the unix mail command:

cat | mail -s (subject) youraccount@rmilk.com

where filename contains a list of the tags etc using the RTM e-mail formatting:
http://www.rememberthemilk.com/help/answers/sending/emailinbox.rtm

cat will also take command-line arguments.
Posted 17 years ago
swanberg says:
errr... misuse of angle brackets.

cat (filename) | mail ...
where (filename contains...
Posted 17 years ago
sejjiin says:
David's script works! A made a few minor changes that may or may not be necessary - might want to try them if it's not working for you:

1) #!/bin/sh instead of #!/bin/bash
#!/bin/sh

2 ) I took out the "--" in front of status.
curl --basic --user username:password --data status="d rtm $*" http://twitter.com/statuses/update.xml

3) I made the script executable
chmod 755 the_name_of_the_script

4) Put a symlink in /usr/bin of the script so it's accessible everywhere
ln -s path_of_the_script /usr/bin/name_of_the_symlink

5) I get a "Error:You are requesting an invalid URL." when running the script from the command line, but it still works.

6) Also, you can run the script from katapult just like launchy.
exec name_of_the_symlink your_task
Posted 17 years ago
sejjiin says:
Improved the script if anyone is interested. Still don't know why an error message comes up - it all works fine.

#!/bin/bash
# Send to RTM script.

xterm -T "Send to RTM" -e "curl -s --basic --user username:password --data status=\"d rtm $*\" http://twitter.com/statuses/update.xml;
echo -e \"\n* Ignore the above error message.\n* Your RTM submission most likely completed correctly.\n* Press any key to continue...\";
read -n 1 keypress"
Posted 17 years ago
(closed account) says:
http://www.rutschle.net/rtm/
Posted 17 years ago
robboedwards says:
Anyone else getting this error come up?

$ rtm test


301 Moved Permanently

Moved Permanently
The document has moved here.

Posted 16 years ago
robboedwards says:
Sorry, looks like the whole of twitter is down.
Posted 16 years ago
invernizzi.l says:
Bash script to send rtm task:

save in rtm.sh
execute chmod +x rtm.sh
execute ./rtm.sh

#!/bin/bash
ADDRESS="invernizzi.l+blabla@rmilk.com"
echo -en "Subject:\t"
read SUBJ
echo -en "Priority:\t"
read PRIO
echo -en "Due:\t"
read DUE
echo -en "Estimate:\t"
read ACRT
echo -en "Tags:\t"
read TAG
echo -en "List:\t"
read LIST


MAIL="Priority: $PRIO\n
Due: $DUE\n
Estimate: $ACRT\n
Tags: $TAG\n
List: $LIST\n"

echo -e $MAIL|mail -s "$SUBJ" $ADDRESS
Posted 16 years ago
the_eddster says:
Where do you get the mail package from? It says 'line 23: mail: command not found' when I try to use it
Posted 13 years ago
action.manager says:
% which mail
/usr/bin/mail

But that's probably system dependent and not what you are asking for...

(this is on a Solaris 10 system)
Posted 13 years ago
Log in to post a reply.