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 :-)

PyCamp 2012: Day 2

Fin­ish­ing Day 2, here's the up­date.

https://p.twimg.com/AxO0roICMAAfLJd.jpg

That is one large spi­der, dude.

  • Woke up 10 time be­­cause David Lit­­vak does­n't know how to turn off his alar­m. Now hat­ing "Good Day Sun­shine" by The Bea­t­les. Sor­ry Ringo!

  • Learned about Cel­ery/Flask/Jug­ger­­naut. To­­mor­row will try to hack on the Niko­la serv­er idea us­ing that. Hugo Rus­c­it­ti al­ready did a lot of work!

  • Helped Martín Gaitán do Niko­la gallery im­prove­­ments (look­ing much nicer now!)

  • Im­­ple­­men­t­ed code list­ings for Niko­la

  • Had a huge spi­der walk up my leg.

  • Had asa­­do for din­n­er!

  • Played with re­­mote con­trolled cars.

  • Saw a guy jug­­gle while rid­ing a mono­­cy­­cle

  • Played in the ping pong tour­­na­­ment (record 1-1, out in the group phase)

  • Fixed a bunch of bugs that popped while im­­ple­­men­t­ing stuff.

To­mor­row: will hack all day in the niko­la host­ing idea.

New Nikola Feature: code listings

This is a new fea­ture in Niko­la, my stat­ic web­site and blog gen­er­a­tor.

It's aimed at show­ing pieces of files in the post­s, and giv­ing you a link to the full file, does rea­son­able syn­tax high­light thanks to pyg­ments, and the syn­tax for em­bed­ding in your posts is not ex­ces­sive­ly aw­ful, so I can use it for some of my tu­to­ri­al / book project­s.

Here's an ex­am­ple:

.. listing:: md.py python
   :start-at: def compile_html
   :end-before: output =

Sys­tem Mes­sage: ER­ROR/3 (<string>, line 14)

Er­ror in "list­ing" di­rec­tive: un­known op­tion: "s­tart-at".

.. listing:: md.py python
    :start-at: def compile_html
    :end-before: output =

This is not merged in­to mas­ter yet, but should be soon.

PyCamp Day 1

Go­ing to sleep, so here's a quick run­down of my 1st day at Py­cam­p:

  • Woke up at 6AM, and af­ter tak­ing train­s, bus­es and au­­to­­mo­­biles, ar­rived around noon. Place is nice, wheather is cold. Beds are bunks.

  • Pre­sen­t­ed ideas, vot­ed work­ing slots

  • Im­­ple­­men­t­ed a Niko­la fea­­ture to get themes from http://­­bootswatch.­­com

  • Im­­ple­­men­t­ed first draft of pipe­­lines for post-pro­cess­ing gen­er­at­ed files

  • Martín Gaitán is work­ing on im­prov­ing the im­age gal­­leries

  • Hugo Rus­c­it­ti is do­ing some cel­ery+flask mag­ic to cre­ate a Niko­la host­ing ser­vice

  • Had fun with lots of oth­­er things and talk­ing with a lot of peo­­ple.

  • Played some ta­ble ten­­nis (won 1, lost 1)

  • Got a fire­­fox t-shirt

  • Got a Nin­­ja-IDE mug that changes colour with tem­per­a­­ture.

Now, ex­haust­ed, go­ing to bed.


Contents © 2000-2021 Roberto Alsina