Software: GCalCLI (and how to replace straight quotes with SED)

GoogleCL was a nice program to get quite a bit of your Google information in and out of the cloud via the commandline instead of a bloated interface. For example, I used it to pull down my agenda from Google Calendar and then incorporate that into all sorts of fun things.

It is (was, depending on when you read this) hosted on Google Code (and quite a few people have exported it to GitHub – here’s one example.

But there’s been problems with the API for the Google Calendar for a while. (Non-tech version: It stopped working.)  In comes GCalCLI, which uses API version 3 (Non-tech version: it works). 

It is also a LOT more powerful than GoogleCL’s version was – especially in terms of customization and display.  Take a look at this screenshot from the repository:

This works really well for me, except for one thing – I often pipe the output through other scripts.  Many of which use “straight” quotation marks to mark where they are supposed to start and stop doing things.

…and many of my events (like Bob’s birthday or Go to “the thing” at someone’s place) also include straight quotes, so my scripts fail.

Luckily SED (mentioned here before) comes to the rescue.  (Presuming your terminal supports UTF-8, of course.)

gcalcli agenda | sed “s/’/’/g” | sed ‘s/”(.*)”/“1”/g’

Obviously, this little trick will work anywhere you need to turn straight quotes into smart quotes (as long as they’re paired), and you can swap the straight and smart quotes in order to reverse the effect when you need to remove smart quotes.

Writing, Critiquing, and Challenges, oh my!

I've not been making the posts recently, but the challenge has still been going strong. Come write with us this
Read More
<span class='p-name'>Writing, Critiquing, and Challenges, oh my!</span>

Tracking, Advertising, Your Privacy, and this blog

Given the (hopefully temporary) defeat of net neutrality in the United States and my evolving desire to protect your privacy,
Read More
<span class='p-name'>Tracking, Advertising, Your Privacy, and this blog</span>

Four Things To Do on World Refugee Day

About every other post or tweet/toot thread I see about the way the US is treating families of immigrants has some variation of this: "But what can we do?" Here's four ways.
Read More
<span class='p-name'>Four Things To Do on World Refugee Day</span>

Never forget: This land was made for you and me

I'd like to remind you that with countries, just like people, it's easy to let the best of yourself slip away. This land was made for you and me.
Read More
<span class='p-name'>Never forget: This land was made for you and me</span>

It is time to stand.

Read More
<span class='p-name'>It is time to stand.</span>

Neo-Confederate = Current Racist

"Neo-Confederate" is an ugly euphemism, nothing more.
Read More
<span class='p-name'>Neo-Confederate = Current Racist</span>

A Father’s Day Wish. Copy, share, repeat.

Read More
<span class='p-name'>A Father’s Day Wish. Copy, share, repeat.</span>

Weekends are writing time.

The challenge has still been going strong. Come write with us this weekend!
Read More
<span class='p-name'>Weekends are writing time.</span>

There is no perfect candidate. There is only the best one available.

Oh. My. Sweet. Lord. We're already seeing it. The threats that if Democrats aren't "pure" enough, then they're not getting the
Read More
<span class='p-name'>There is no perfect candidate. There is only the best one available.</span>

If there’s one Nazi (or a racist) at the table…

Because this post by David Avallone needs signal-boosted outside of Facebook (or Twitter) alone: "As we say in Germany, if there’s
Read More
<span class='p-name'>If there’s one Nazi (or a racist) at the table…</span>

Popular posts:

  • HOWTO Make Your Hamburger Helper Better
  • If there's one Nazi (or a racist) at the table...
  • The Songs That Chronicle Our Lives
  • Word Porn Quotes
  • I am not a number; I am a free man, OR, why you should never rely on social media
  • It's not being "Awkward", and the difference between Excuses and Explanations
  • I really like you, but I have to break up with you before I don't.