Perl script and Alfred workflow for quick call notes

As a part of trying to live a more paperless life, I'm determined to take notes electronically when I'm sitting at my computer, instead of jotting them down on scraps of paper and then putting them into a document later.

When a phone call comes in, I want to be able to start typing my notes about the call right away so that I'm not distracted as I'm switching over to my text editor, opening a new document, saving the document someplace to make sure I don't lose what I'm typing, and THEN being ready to actually take notes.

I've been using the OS X productivity app Alfred more and more lately, and so I decided to create a simple Alfred workflow that would let me get a phone call notes file up in front of me, ready to edit, with minimal typing.

I wanted to make sure that the resulting notes file was named in some reasonable way that I could find again later, and so part of creating the workflow was figuring out how to take a free-form description of the call that I'd be typing in as it started, and turn that into a filesystem-friendly name (sometimes known as a slug). I ended up using a simple Perl script to do that for me.

The Alfred workflow, then, is just a keyword and a script run:

Screen Shot 2014-10-11 at 2.06.56 PM

Continue reading "Perl script and Alfred workflow for quick call notes"

My YAPC::NA talk on framing and Perl

In June, a delegation from Summersault attended the YAPC::NA Perl Conference in Columbus, Ohio for a few days.  My second YAPC conference, it was an interesting experience full of inside jokes, engaging discussions, more inside jokes, and good food.

I was only scheduled to give one presentation ("How to talk, or not talk, to your clients about Perl") but after hearing some of the opening remarks at the conference that spent too much time and energy, IMHO, declaring that "Perl is not dead!" I signed up to give a new talk about possibilities for re-framing that sentiment.

You can view a video of the talk, or you can view my slides [PDF].

Homegrown RSS feeds for local news sites

I recently wrote in the Summersault weblog about how website content syndication is changing the way we use the web. Of course, if the sites you care about aren't syndicating their content, the phenomenon is a little less exciting. For me, the only ones I cared about that were in this category were local news sources. For a few years I'd been running hacked up Perl scripts that tried to retrieve headlines from the sites of local papers, but it tended to be hit and miss and I never really took the time to take a more structured approach until now. Using the Template::Extract Perl module and a handy article from Simon Cozens about spidering hacks, I was able to formalize and simplify the creation of custom RSS feeds scraped from sites without them built-in. So, here are the first few, to which you are welcome to point your own newsreader:

Please avoid refreshing these more than once an hour. If there are other feeds you'd like to see, let me know. I'll add new ones on my feeds page as they come. Enjoy!

Read your congressperson's blog

The eminent and celebrated E. Thomas Kemp points us to a wonderful and clever use of news aggregation and weblog technologies, Plogress. Using Perl and WordPress, the apparently anonymous administrator has created a site that sucks data out of the Library of Congress and displays a blog of the doings of individual Senators and Representatives. Now I can keep an eye on Mike, Richard, and Evan through my RSS newsreader! I'm sure they all read my blog, right?

Perl script to check Sprint PCS minute usage

After a few incidents of going over my Sprint PCS minute usage without any warning, I hacked together a Perl script that will log in to the sprintpcs.com website and check my minute usage for me. It e-mails me a warning if I go over a certain usage percentage. I thought I'd post it in case anyone else might find it useful: sprint-minutes.pl (link removed March 4, 2017, no longer works). I believe Sprint charges something like $3/month for a similar service. Note that you need a few extra modules installed, and you need the components for WWW::Mechanize that allow SSL connections. Consult your local Perl expert for help with this if you need it; I can't provide support here. It may well require tweaking depending on how standard your calling plan is, or other variations that I don't know about. And of course it's subject to breakage when Sprint updates the HTML code on their site.

Any comments or refinements are welcome. Enjoy!