Showing posts with label Utility. Show all posts
Showing posts with label Utility. Show all posts

Friday, December 19, 2014

CLI to Google Calendar

After a few weeks of missing my old cli access to Google Calendar, and pushing the Try It! button with no success (yes, I customized it, but no, what I tried didn't work for me), I went looking (again) for another tool.

Hurrah! Look to gcalcli!

First I tried "pip install gcalcli; pip install vobject parsedatetime" but "which gcalcli" came up empty. I read the log file mentioned at the end of the pip install, ran a search on the most obvious error message, and re-ran it with sudo. Now it's working! I recommend "gcalcli list" to start.

The command I expect to use most often is

gcalcli --calendar 'Calendar' --title 'what is it' --where there --when '12/19/2014 10:00 PM' --duration 60 --description 'yay for description field finally!' add --details url
, and next
gcalcli --calendar 'Calendar' quick 'quick add text' --details url
(possibly). I have always wanted to be able to populate the description from the command line, but APIv2 only supported what's in Quick Add. Now that I've got another easy tool, I can forgive APIv3 for moving my cheese since it supports a feature I wanted.

Now if you'll excuse me, I need to pound on this new command line tool ...

Update: Oh, it works so well! I start at Spot the Station, I remove the irrelevant lines (too early, too short, or too low) with PrintWhatYouLike, and then I copy the remaining (relevant) lines.

That then becomes the starting point to fun with regular expressions! Although pbpaste is a Mac OS X tool hailing back to the NeXT days, Linux has tools like xsel and xclip that I hope are roughly equivalent.

clear; pbpaste | awk -F $'\t' '{ print "gcalcli --calendar \"Calendar Name\" --title \"ISS sighting\" --where \"Durham, NC\" --reminder 20 --when \""$1"\" --duration "$2" --description \""$3" max elevation, "$4" approach, "$5" depart\" add --details url" }' | sed 's/\ min\ /\ /g;s/\ above/°\ above/g'; echo

I like to glance at the commands before running them, just to be sure I haven't made some hideous formatting error about to be replicated at the speed of automation, and I like to check at least one of the resulting URIs to be sure the calendar entry survived the transfer. So far, so great!

Tuesday, July 23, 2013

S5 to PDF

I would rather use S5 for presentations than a proprietary solution. (I think Landslide is cool, and it has the feature to append #number to the URI to jump to that slide, but I can integrate S5 into my PmWiki so I stick with S5.) After a recent conference presentation, I was asked for the PDF version of my slides, and I was stumped for a moment. Then I found this post that turned me on to PrinceXML to work with S5. I thought about explaining how much I like Prince (after one use), but Ryan Tomayko already wrote that PrinceXML is extremely impressive. So I'll just say that I didn't like the initial output, and the documentation came to my rescue! I like well documented software that does what I need to do.

The actual command I used was prince --media projection -s page.css input.html -o output.pdf with the following for page.css:

@page { size: 1600px 900px; margin: 0 0 0 0; }

Wednesday, May 7, 2008

tabs and sed

I need to remember how to do this trick, using sed on literal tabs, which you can usually get by typing ^v. Control-V, Tab allows sed to operate on tab characters. Yes.

Thursday, September 29, 2005

del.icio.us tools: Software - Net - Bookmark Management

Social bookmarking at del.icio.us is a tempting waste of time! (See also Spurl.net.) You can use del.icio.us to avoid a trail of bookmarks, never where you need them, on different machines and between different browsers. Even better, you can assign tags to each bookmark for grouping into like categories. Of course you can browse all, browse by tags, and search. And as icing on that cake, you can explore what other people bookmarked who bookmarked the same link.

Cocoalicious 1.0b36, BSD open source, is an OS X (Cocoa) application interface to your del.icio.us account. You can create and browse your bookmarks. Since it caches the data locally, you can save some rendering time.

Saturday, September 24, 2005

ClamXav: Software - Utility - Anti-Virus

ClamXav, donationware, is a graphical OS X front-end to ClamAV, the open-source command-line virus scanner. Free virus checker, open source goodness, 'nuff said.