Skip to main content

Ralsina.Me — Roberto Alsina's website

PyCamp 2012 - Day 3

So, day 3 and nex­t-­to-last of Py­Camp is done.

  • Great day, sun­ny, not all that cold

  • Em­­panadas at lunch, piz­za for din­n­er, cake for tea. Feel­ing kin­­da spoiled to­­day.

  • Lots of hack­­ing at Niko­la-as-a-ser­vice (de­­tails be­low)

  • PyAr meet­ing by a huge, some­what scary bon­­fire ear­li­er tonight

So: Niko­la-as-a-ser­vice is an idea where you can keep your blog some­where, and this ser­vice will get the data, and pub­lish a nice site for you.

Here's the cur­rent work­flow, which is just one of a dozen that can be im­ple­ment­ed be­cause this thing is quite sim­ple:

  1. The au­then­ti­­ca­­tor

    Cur­ren­t­­ly it has twit­ter au­then­ti­­ca­­tion. You nev­er need to cre­ate an ac­­coun­t, just lo­­gin with some ser­vice you al­ready have ac­­counts with. Any­thing with OAuth will work.

  2. The da­­ta provider

    Cur­ren­t­­ly, github. Soon, Ubun­­tu One. Lat­er, who knows. A da­­ta provider is some­thing from where we can grab data, and that can no­ti­­fy us (au­­to­­mat­i­­cal­­ly or by hav­ing the us­er click on a but­­ton) when we should get that da­­ta and re­build the site.

  3. The ren­der­er

    I am do­ing it with Niko­la, of course :-)

  4. The in­­fra­struc­­ture

    Jobs us­ing Re­dis and Cel­ery, serv­er app us­ing Flask, ren­der­ing us­ing Niko­la

  5. How does it work?

    You go to github, clone a bare­bones blog. Do your mod­­i­­fi­­ca­­tion­s. Go to niko­la-as-a-ser­vice, and lo­­gin via some­thing. Then you give Niko­la your github re­po's URL, and you get a we­b­hook URL. Go back to github, and con­­fig­ure the we­b­hook.

    From that mo­­ment on, ev­ery time you push to github, your blog is up­­­dat­ed :-)

    In the fu­­ture: ev­ery time you save to Ubun­­tu One, your blog is up­­­dat­ed. In the fur­ther fu­­ture: Ev­ery time you X to Y, your blog is up­­­dat­ed.

It's go­ing to be cool :-)

jjconti / 2012-07-09 11:56:

Avisa cundo se pueda usar! Voy a usarrlo para escribir una novela en vivo :O


Contents © 2000-2023 Roberto Alsina