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.

Wed, 04 Apr 2018

Hunting the random \n

There's a random \n in my BlogPoster script. It doesn't show up all the time, but there are circumstances where it appears in the final output.

Am I inadvertently inserting it, or will I have to chomp it out? That is the question.

Update: I figured out where the random \n was being inserted, and I was able to .chomp it out in Ruby.

I'm not sure exactly why the random \n was being inserted. It could be in the editing operation of the file (I hope not, because that complicates things), or in the conversion of the edited file back to a Ruby variable.