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:

--calendar
icetritlo@gmail.com
--military
--monday
#Tomorrow-Night Palette
--conky_color0
    #282A2E
--conky_color8
    #373B41 
--conky_color1
    #A54242 
--conky_color9
    #CC6666 
--conky_color2
    #8C9440 
--conky_color10
    #B5BD68 
--conky_color3
    #F0C674 
--conky_color11
    #DE935F 
--conky_color4
    #5F819D 
--conky_color12
    #81A2BE 
--conky_color5
    #85678F 
--conky_color13
    #B294BB 
--conky_color6
    #5E8D87 
--conky_color14
    #8ABEB7 
--conky_color7
    #707880 
--conky_color15
    #F0C673 

#Viljum auka vidd ef a ad vera a isl
#--locale
#is_IS.UTF-8
#-w
#12

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....