Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Tue, 21 Nov 2017

My Blog Poster app works well in Ubuntu (ok, really Lubuntu) Linux

I recently updated a 15-year-old IBM Thinkpad R32 laptop (Pentium 4, 1 GB RAM, 20 GB hard drive) to Lubuntu 16.04, and I set it up to run my Blog Poster script written in Ruby.

Since this is a Linux environment, I like to use the Ruby version that the system offers in its repositories, also installing as many Ruby gems as I can from those same repos (instead of using gem install from the console).

The Blog Poster app, which attempts to make it easy to create social and regular blog posts from the command line, uploading them to the blog and sending them directly to Twitter, is fairly simple. It uses two gems: Nokogiri to help pull the titles of web pages and Twitter to (you guessed it) send a post to Twitter.

On Windows I used gem install to get both of those gems, and I could do the same in Lubuntu. But I'm very comfortable with Linux package management, so I opted to install ruby (which, believe it or not, isn't in the Ubuntu/Lubuntu default install) as well as ruby-nokogiri and ruby-twitter, all from the Ubuntu repository.

It worked.

Curiously, the script's call to vim did not work. There is, theoretically, no vim in the Ubuntu/Lubuntu default. But there is vi. You can install vim, but I opted to stick with the vi default, and I modified the system call in my Ruby code to call vi instead of vim.

Also, copy-pasting into the terminal (LXTerminal is what I am using) via right-click works great (though ctrl-v does not work).

The Ruby script works great, and I did a few successful updates to my blog and Twitter feed with this very aged laptop.