5 July 2008 by Lars
Scripting Bluetooth transfers to my phone
Want to send the latest podcast, or movie, or whatever, to your phone – automatically – and find it there, waiting, in the morning? And whatever software you are using doesn’t quite do it? Here’s the trick (for Linux):
let dp1=$(date +%d)+1
curl http://podcasts.nytimes.com/podcasts/$(date +%Y/%m/%d)/${dp1}frontpage-p.mp3 \
-o nyt-frontpage.mp3 && obexftp -b 00:11:22:33:44:55 \
-p nyt-frontpage.mp3 && rm -f nyt-frontpage.mp3
where 00:11:22:33:44:55 is the BT address (which you can find, for instance, if you already connected using (KDE) GUI tools at /var/lib/bluetooth/names).
Works like a charm.
Lars - 5 July 2008 @ 22:49
OK, not quite, as the astute readers might have guessed: the above won’t work on weekends for the NYT, it won’t work when the month ends, and it won’t work as-is for days 01-08 – so it really only works for 3 weeks each month… But you get the drift.