Patch: blogger post from stdin for googlecl

Going to start hijacking this blog, to record/link to patches I submit to various open-source projects. As with everything else on here, it’s mainly to ensure I can find these little snippets a few months later.

So, to start, something intended for this blog itself. A patch to the google commandline tools enabling the “google blogger post” command to post content read from stdin (adding to the current options of supplying a string or a filename). Usage is the traditional ‘-‘ in place of a filename.

This enables two pieces of functionality I’d find very useful:

A) filter content through other programs. e.g. using markdown to HTMLify my content:

$ markdown post.txt | google blogger post –

B) make a blogpost from within vim, by selecting my post content and piping it to googlecl

New post

what is the ø in infinite thøught? Merely the philosophical counterpart to the Heavy Metal Umlaut? Or are we in the equally-depressing land of subtle and pointless theoretical in-jokes?

Leave a Reply




Your email address will not be published.

Required fields are marked

*








New post

mysql file output is efficient — but needs the FILE permission, which mysql turns off by default for most users:

mysql> select foo into outfile '/tmp/bar.txt' from sometable group by foo;

New post

While loving both

The Parallax View

and

All the President’s Men

, I’d somehow never realised that they had a forgotten sibling. Klute is the first member of what came to be known as director Alan Pakula’s

political paranoia trilogy

. One to watch.

New post

While loving both _The Parallax View_ and _All the President’s Men_, I’d somehow never realised that they had a forgotten sibling. Klute is the first member of what came to be known as director Alan Pakula’s _political paranoia trilogy_. One to watch.

finding and editing

Search for files containing some text, open them in vim (one per tab)

 grep -l foo ./* | xargs vim -p

Alternatively, to get a single-line list that can be edited and then copy-pasted to a command-line:

grep -l foo ./* | xargs echo

There are more heavy-duty ways of removing lines in output listed here, but I see little reason for using them.t

Accomplishments of Leopold II

EU Observer, via Crooked Timber:

Louis Michel, the Belgian former EU development commissioner and current prominent Liberal MEP has shocked his home nation and its one-time central African subjects by calling King Leopold II, the Congo’s colonial master responsible for between 3 million and 10 million deaths, a “visionary hero.”

“Leopold II was a true visionary for his time, a hero,” he told P-Magazine, a local publication, in an interview on Tuesday. “And even if there were horrible events in the Congo, should we now condemn them?”

er…

Yes

. Yes, we really, really should.

FWIW, Louis Michel is also a former Belgian foreign minister, and has been deeply involved with the Congo at a national and European level.

Untitled

on that keylogger thing….seeks the showkey utility will do everything I need, with considerably less faff and higher reliability. yay!