Monday, June 10, 2013

Markdown blog posts via emacs/vim and pandoc

Using Markdown on google blogs from the Commandline

As per the comment on my last post from Matthías Ragnarsson, I'm using pandoc to generate html from a md file, albeit I'm not using vim, but rather emacs (as setting up markdown-mode is simpler, and with evil, it's pretty much the same thing, only more easily extensible. It also fits better with the Unix philosophy of using external tools to do tasks, rather than hardcoding them into the program itself.

Saturday, June 08, 2013

Google calendar from the desktop, and posting through vim

Posting trough vim

Here I am, writing a blog post in vim. If this actually gets posted, I'll be pretty impressed, as this makes posting to the google blogs extremely simple to implelement via a server. The api program itself is just a python program, so porting the functionality over to haskell shouldn't be hard at all. I might even make it and put it on hackage. It'd be neat to have a package there!

Anyway, I hope this test works, as it'll make code examples way simpler.

Google calendar on the desktop

I recently made some commits so that it can display arbitrary colors in conky, and used it to create a neat display of my google calendar on the desktop, and you can see a picture of it included in the pull.

My .gcalclirc is as follows:

#Tomorrow-Night Palette

#Viljum auka vidd ef a ad vera a isl

I have that last part if I should want to have the dates and day names in Icelandic, but as neither are capitalized (correct in the middle of a sentence, but not standalone), and the english version suits me fine, I don't think I'll bother fixing it.

[Edit: Rewrote this post in markdown, and used pandoc to translate it into html, as per the comment below. N.B. you need my fork of gcalcli for this to work, as the --conky_color options were added by me.]

Wednesday, June 05, 2013

Using GoogleCL to post from the terminal

I'm really just testing out using googleCl to post from my terminal to the blog. As simple as pacman -S googlecl, then authenticate via oauth (almost totally automatic, just enter your username and password in the browser window, grant access and done), and then $ google blogger post etc. Very basic. I wonder if I can post a text file....