What's todobot.pl?
todobot.pl is an AIM bot which executes todo.sh commands on your todo.txt. Run it on the computer where your todo.txt lives.
Especially useful for IM'ing todo's from your phone, todobot.pl reads and writes your todo.txt from anywhere (without having to run a home server.)
TodoBot Screencast
IMPORTANT SECURITY NOTICE
The todobot.pl script is only as secure as your IM handle is. Someone can easily issue shell commands other than todo using it which can compromise your system. This is a proof of concept script and should be used with the utmost caution.
Download todobot.pl
Download the latest version of todobot.pl. See the CHANGELOG for what's new.
Requirements: Todobot.pl requires the OSCAR.pm package to run. If you can't install Perl packages on your server, download todobot.pl packaged with OSCAR.
Installation
- First register for an AIM screenname which you'll use as your bot at AIM.com. Mine's called gtraptodobot, yours can be anything you like.
- Get Perl running on the computer where your todo.txt lives. If you're running Cygwin, install the Perl package using setup.exe, as described here. Mac and Linux users, you're all set with the Perl.
- Download the TodoBot Perl files, which come in two varieties. The bot requires the OSCAR package to run, so for the lazier (and less experienced), download this zip file with OSCAR included.
If you're all down with the C and the PAN and Perl module installation, download todobot.pl and then grab and install OSCAR.pm separately. - If necessary, unzip the Todobot bundle. Then, open up the file called todobot.pl and edit the following lines:
my $screenname = 'yourbotname'; my $password = 'yourbotpassword'; my $commander = 'yourAIMname'; my $todoscript = '/home/gina/docs/todo/todo.sh -p -d /home/gina/docs/todo/.todo'; my $linebreakchar = '<br />';
In the first two lines, enter the bot nickname and password you signed up for in step 1. In the third line, enter the AIM name you'll use to run todo commands. In the last line, enter the full path to your todo manager script, plus options. (The -p means no colors; the -d gives todo.sh your config file.) Most AIM clients support HTML so your linebreakchar variable can most likely stay as is. Save and close todobot.pl. - To start the TodoBot, at the command line type perl todobot.pl.
Finally, IM your bot's nick using your regular AIM name a todo.sh command, except omit the todo.sh bit. So todo.sh add do laundry would be simply add do laundry.
Tips and Tricks
- Run the bot in the background (&), append its output to a log (>> botlog.txt) and keep it alive even if your session's disconnected (nohup):
nohup ./todobot.pl >> botlog.txt & - To make the bot exit, send it the 'die' command over IM.
Author
Unless otherwise noted, all the todo.txt scripts published herein are authored by Gina Trapani and licensed under the GNU General Public License.
Scripts and text originally published as an ongoing Todo.txt series at Lifehacker.com. Special thanks to all the Lifehacker readers who contributed to Todo.sh by fixing code, adding features, reporting bugs and making suggestions.
All software comes as is with no warranty. Do back up your todo.txt before you read another word. Questions, support and help is available in the Todo.txt Mailing list.
