Publishing Tweets to a WordPress blog

With IFTTT losing Twitter triggers I figured I better do something if I want to keep reposting my tweets to this blog. So with the help of the inestimable Steve Morris I whipped up a little Ruby script that is meant to be run as a cron job; the results are visible as the previous seven posts here.

Requirements for using this script:

  • A Gmail account from which to send emails.
  • A Twitter developer account with an application set up so you have the necessary keys and tokens to use in the script.
  • OSX and will probably work on Linux as well, but as for Windows I have no idea nor do I have an interest in finding out (if you port it, feel free to tweet it to me and if it seems reasonable I’ll post it here). Note that OSX and Linux come with a sufficient Ruby to run this, though you may need to tailor the first line shebang to your installation.

I used two gems to power the script: Chris Kowalik’s gmail and Erik Michaels-Ober’s twitter. It’s possible I could’ve used Erik’s t Twitter command line gem and had an even simpler script but this seems fine for now.

The script has three main parts:

  • Configure Twitter and grab the most recent 20 tweets (the default is 20, which for me is more than sufficient).
  • Loop through the tweets in reverse order (to go from oldest to newest) and for the tweets made since midnight today mail them to WordPress.
  • Send an email (through Gmail) to your blog’s secret email address with a body containing the tweet short code plus the category, comments, and publicize shortcodes to properly configure the resulting post.

Next thing I’m going to work on is adding favorites to the script.

Update: Now does favorites too.

WordPress for iOS, sweet

Honestly I’m using the iPad as much as TS1, she’s really great about that. And now that vi’ve got the WP app running on it I hope to blog more frequently, assuming I can get used to the onscreen keyboard.

Wish me luck đŸ˜‰

FIFA: Consider the open source model

In this World Cup, as in past tournaments, referees have made numerous, game-changing poor decisions on goals and possible goals. Tevez scoring from offside against Mexico, Dempsey ruled offside against Algeria, Lampard’s tying goal against Germany not being over the line are just three examples from this time around.

Just as in the past calls have come in again for technical assistance to be adopted and just as in the past FIFA are saying no. FIFA decided in March that technical solutions will disrupt the flow of play or cost too much to be deployed at all levels of competition and using them only at the national team and professional competitions will rupture the universality of play. After the round of 16, with the disallowed English goal, the possibility of using two goal line assistant referees, as trialled in this past season’s Europa League, was allowed as a future change.

Let’s separate technical assistance into two options: instant replay and sensors. Instant replay has not worked well in the NFL but somewhat better in the NHL. Regardless of the quality of the decisions in both leagues the decisions simply take too long but since the broadcasts can go to commercials, which would otherwise require TV timeouts, there’s some relief. I agree with FIFA leadership, though, that with currently available systems instant replay would be too disruptive to play in soccer.

Sensors are another story and I think FIFA are missing an opportunity here. I’m sure the cost of the recent systems with which they did experiments are quite high but their mistake was going to the big sports equipment makers for the solutions. Instead, FIFA should open an X Prize-like competition to spur development of inexpensive, open source hardware and software.

The software, especially, should be open source, not only to get a lower price tag but also to ensure against tampering and other malicious interference. One has only to look at the recent troubles with electronic voting software for a good comparable.

Additionally, the software system can be strengthened by running a master copy server and requiring a fresh copy be downloaded to the game server just prior to kickoff. The download can be validated by a one time key or biometrics.

Given the near universal appeal of soccer even among geeks I think this prize competition would be enormously popular and in fact drive improvement in sensor software and results processing for many uses beyond sport as well.

So Sepp, what do you say?

Apple Fanboy Family Update

A couple of years ago I posted that TS1 and I had become true Apple converts. Since then I’ve gotten a MacBook Pro (parting gift when I left Aptana) and we got my dad’s Mini when he decided to go back to Windows. The Mini is our entertainment computer, hooked up to the living room big screen, which let us get rid of the DVD player.

Hat tip: LogiTech makes a very nice, free iPhone app called TouchMouse so the phone can be used as wireless mouse and keyboard.

We’ve resisted buying matching iPads. So far.

One other thing we bought some time ago was some Apple stock and that’s the reason for today’s post. The company just released their Q2 numbers and they blew the doors off expectations. Stock was down a little in regular trading–normal the day earnings are announced–but in after hours trading it shot up about 6% to $260. Probably won’t open at much over $250 tomorrow but still awesome.

Gone to WordPress

For more than nine years, beginning with Stones to be rolled into Sopranos and continuing for over 4,000 more posts, I’ve been an active user and frequent evangelist for Google’s Blogger. Heck, my use predates Google’s acquisition of Blogger by quite a margin. But today I cut over the new version of BillSaysThis and it uses WordPress.

I wasn’t looking to make this switch and I’m not happy at having to do it. But Google has forced my hand. The company has never put all that much in the way of resources to the Blogger team, as best I can tell from the outside, but as they’ll be removing a key feature, one on which I’ve always depended, on May 1 I have no choice.

The feature is Publish via FTP. That means after you click the Publish button on the Blogger post writing page, any new or changed pages are generated and transferred to a remote host. This feature allowed us to use Blogger but host the blog on our own sites. The published reasoning for the change is that the feature takes too much effort given how few blogs use it but this seems to be putting the best face they could think of on it rather than the real reason.

Fortunately for me, WordPress 3.0 is out as a beta and works well enough to use already. WordPress has a decent import tool so, with a bit help from my friend/inside connection Beau, I was able to get all the posts into the new system. Color advice from Garret helped too.

One of the best new features in 3.0 that made this a much easier choice and solution is support for multiple blogs from one install of WordPress. Previously you had to install separate copies for each blog and do maintenance, plugin installs, design and so on separately for each. I already had two WP 2.x blogs, bill:politics and Bill’s Movie Reviews, so I created new blogs for each in the 3.0 install and with a few clicks imported the old content.

Some of my old pages depend on custom PHP code and so either will take a bit more time to port or stay in the old format. C’est la vie.

Looking forward to nine years (at least) with WordPress.

And, oh yeah, one last thing: Comments are open, at least for newer posts.

Wells Fargo #fail

Do you know that Wells Fargo will take any reason to switch retail customers to online only statements?

  1. If there are two people on an account and one chooses online only statements and the other chooses online and paper (the only two options), Wells Fargo will force the account to be online only. Even though the other choose is more inclusive and customer-friendly.
  2. Customer are asked constantly, nearly every time one logs in to their online system, to switch to online only statements. I mean for years on and on. I guess its too much to think that answering a question once, or maybe twice, would be good enough.
Forget about trying to get a straight answer from the customer service reps. I don’t blame the individuals, they’re only following instructions handed down from on high, but since customers can only speak with the front line reps I guess we’re stuck.