Tag Archives: command line interface

Command line unit conversion

The Linux command ‘units’ may or may not be installed on your system. If not, if you use synaptic or apt, type (at the prompt)

sudo apt-get install units

or equiviliant for other distributions. Then type in the word “units” and play around. Here are a few sample outputs:

i-89547af38f3e53e357d45983aaf95b6c-units_eg.jpg

The program is a little clunky. You have to know the specific codes for each type of measurement, though ‘units’ will figure out what you mean sometimes. To exit, type ctrl-D. There is a way to use this utility in a script. That and other details are found in the manual.

Hacking a Google Calendar CLI Tool

I wrote earlier of the very useful command line utility called gcalcli (short for GoogleCALendarCommandLineInterface). Click here to read that post. One of the options is called “agenda” which spits out, by default, the next five days of calendar entries. If you would prefer a different range of time than five days, then you can specify two dates and the utility will give you that set of entries.

But I find that to be a bit of a pain, typing in the dates to start and end the list, when I generally want a quick and dirty “next several days.” That, I suppose, is why there is a default of five days. But five days is not a good default. If it is Wednesday, I want to see what I’ve got on my calendar for the rest of the current week, as well as what is on my calendar for ALL of next week. For me, a better default would be 14 days. With 14 days, you always get a full look at the present week and the next week, plus, sometimes, a bit after that.

One can imagine writing a bash script that figures out what day it is, and then adds enough days that you get an agenda for the remainder of the present week plus all of the next week, but no more days than that. Such a script could make use of bash’s ability to manage and manipulate dates as they occur in our periodic system, with 24 hours in a day, 7 days in a week, work days being a subset of five of those days, etc. etc.

One could also imagine writing a bash script to poke one’s eyes out with hot soldering irons.

A simpler solution is this:
Continue reading Hacking a Google Calendar CLI Tool

Using Google Calendar from the Linux Command Line

Computer-based calendars are very useful, and the Google Calendar is probably one of the more widely used personal calendars other than scheduling programs such as MS Outlook and Groupwise (both of which are broken). But, webby gooey applications can be rather bothersome because they tend to take up a lot of screen real estate and other resources, and on smaller screens such as a laptop can be rendered virtually useless by all that added functionality built into the web browser itself as well as the calendar page. It is quite possible that on your laptop, your Google Calendar may look something like this:

i-db80841539964342991966740f989f08-01-gcalcli.jpg

Not very useful.
Continue reading Using Google Calendar from the Linux Command Line

Being a console geek in Linux

This is the first in a series about using the “command line” in Linux. It is also about knowing when to use a gui instead. But before going into any of that we need to understand what is meant by a “command line” application. You’ll find that as we explore that idea, a lot of things that are not really true ‘cli’ (command line interface) apps arguably count as cli, including menu driven console based apps and even gui apps. This will be controversial.
Continue reading Being a console geek in Linux

Do you want the alpine email client to remember your passwords?

By default, the text-based email client ‘alpine’ requests a password the first time, per session, that it is requested a password from any email services it checks. For the duration of that session, it remembers the password, but forgets it if you quit alpine so you have to enter it again later. From a security point of view, that is probably a good thing, but most people do like to have their email client remember the password between sessions.
Continue reading Do you want the alpine email client to remember your passwords?