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.
I'm looking to figure out all the elements I need to convert my election-results Bash script to Perl, and one of the tasks involved is dealing with XML.
In the Bash script, I'm just treating the XML as text that needs to be hacked at with sed.
But in Perl, as in many languages I presume, there are modules to help with this.
XML::Simple takes a file in XML format and converts it to a "Perl representation," one of those "representations" being a Perl array. Here are some other links on parsing XML in Perl.
Perl Begin recommends avoiding XML::Simple and instead using XML::LibXML.
Now I'll have to figure out what to do with the data after Perl deals with the XML so I can turn it into the HTML I'll need later in the program.
I won't lie by saying that it is a lot easier to find recently written XML-parsing strategies for Python than it is for Perl.
With that in mind, before I close out this entry, here are some links on parsing XML in Python.
I'm continuing my reading of "Learning Perl."
The book is a bit dog-eared. Some of that is from carrying it around. But some of the wear is from actually reading the book.
I'm up to Page 74. I have been taking notes in the book and underlining things that seem important.
I meant to read this book with the Learning Perl Book Club, a reading group made up of Ode users.
That didn't work for me. The stopper was the "you need to do the exercises" part of the enterprise. While I had the time to do the reading, I had a lot of mental resistance to trying to hack at the exercises at the end of each chapter.
I know that doing the exercises in these books helps you "get" the concepts, but I just wasn't there yet.
Now that I'm a few chapters in, I want to start typing the book's programs into my local system, running them and playing around with them a bit. While that's less than going all in on the exercises, it's more than not touching the computer or using Perl at all.