I admit it. I'm a tinkerer. I love to tinker with all sorts of things. Lawnmowers. Cars. Building "stuff" from wood or metal. I made the mailbox on the front of my house from 1x10 pine boards. I built the chicken coop from plans that were just floating around in my head ... using mostly reclaimed lumber. I built the run for my chickens.
Of course, that carries over to my computing life. I've already mentioned in the forum about replacing the power supply board of my Samsung laser printer when it burned out. But I also like to write custom bash scripts to make certain tasks easier and more efficient. I haven't been writing bash scripts for all that long, and I still consider myself a novice.
In my Windows 3.1 and Windows 95 days, I used to write shareware software. Much of what I wrote centered around Windows Help files. More specifically, the 16-bit version of Windows Help. I used to write my programs in C. Because of limited financial means and the costs of the programming environments, I wasn't able to continue as Windows moved into 32-bit and then 64-bit territories.
So, bash scripts it is for me, at least at this point. That early programming experience in C has been invaluable. If nothing else, it has taught me about functions, variables, and the general flow of computer programs. I apply that same mentality to my bash scripts.
Many of my bash scripts use Zenity to add graphical user interface elements to what would otherwise be entirely a command line/terminal experience. The way I look at it, using Zenity dialogs gives the user a true GUI experience. It also alleviates requiring the end user to enter a long string of cryptic command line switches and parameters. You simply set those up from within the script (as much as possible), with individual prompts from the user as they go through the script. There are a lot of Linux users who avoid the command line like the plague.
This month, I wrote an article about one such script I recently created to change the bitrate of MP3 files en masse. Otherwise, I could have done the same thing, one file at a time, in some very capable sound file editors. The latter way would have taken much, much more time, so my script makes the task much easier and much, much more efficient. With the new script, it's a trivial task that is completed in less than a minute. In my way of thinking, this is way more efficient, and allows me to get on with other tasks.
Because I'm a Xfce desktop user, I typically build my scripts so they can be used either directly from the command line, or more importantly, so they can be used as a Thunar custom action (Thunar is Xfce's file manager, if you're not familiar). They can also be used from other file managers of other desktop environments, like Caja in Mate or Dolphin in Plasma. It's a trivial task to learn how to set them up in those environments, as there is a lot of documentation/tutorials on how to do it floating around on the internet.
********************
Apparently, I'm not the only one who likes to "tinker." Back in 2013 (and updated in 2019), I wrote a script to download the "Picture of the Day" from the NatGeo website. It seems that they also like to periodically restructure (tinker with) their web pages. I presume it's to prevent people from downloading those images. Neither the original script from 2013 nor the updated script from 2019 work as intended. Thus, I've created yet a third update (February 2022) to the script that keeps the images coming in. Like with the original script, just set up a cron job to download the images to your computer every day. Simply save the script to the directory where you typically store your bash scripts, remove the ".txt" file extension, and make the file executable.
********************
This month's cover was created by Meemaw, to commemorate St. Patrick's Day on March 17.
********************
Until next month, I bid you peace, happiness, serenity, prosperity ... and continued good health!
|