Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about python (old posts, page 80)

Programando Cross-Platform

Sor­ry again, span­ish on­ly, be­cause it's an­oth­er video of me speak­ing in span­ish (this time with a spaniard)

Si querés ten­er mu­chos usuar­ios de tu pro­gra­ma, es fun­da­men­tal que el uni­ver­so de "gente que puede us­ar el pro­gra­ma" sea lo más grande posi­ble. El mejor camino para el­lo es hac­er que el sis­tema op­er­a­ti­vo que us­a/­sufre tu po­ten­cial usuario es­té so­por­ta­do. Hac­er eso no es in­creíble­mente difí­cil, pero siem­pre hay al­gu­na cosa rara. La con­fer­en­cia tu­vo lu­gar en la ciu­dad de Junín ( Buenos Aires, Ar­genti­na ) en Sep­tiem­bre de 2011, y fué or­ga­ni­za­da por PyAr ( Python Ar­genti­na ).



Haciendo trampa: Trucos para programar menos

Sor­ry, span­ish on­ly, since it's a video of me speak­ing in span­ish ;-)

Fi­nal­mente, gra­cias a Juan Ro­driguez Mon­ti, video de mi char­la "Ha­cien­do tram­pa: Tru­cos para pro­gra­mar menos" de Py­Con Ar­genti­na 2011.

Y los slides:

PyCamp Panorama

So you could­n't make it to Py­Cam­p? This is the place. Sor­ry, I can't post the awe­some, so it's just a pic­ture :-)

Get Adobe Flash player

Nikola-as-a-service demo

One of the things I hacked at dur­ing this Py­Camp is try­ing to fig­ure out a nice work­flow for Niko­la, some­thing that will en­able users that are not so tech­ni­cal, to use it.

One first step is Niko­la-as-a-ser­vice, which is meant for tech­ni­cal users any­way but lays down the in­fra­struc­ture for this to work semi-nice­ly.

In the video be­low, you will see me do this:

  • Go to GitHub

  • Take a starter's blog I pro­vid­ed, and do a clone

  • Go to the niko­la-as-a-ser­vice site, and lo­­gin (via twit­ter)

  • Cre­ate a site us­ing my fork's re­po URL

  • Get a "we­b­hook" URL, and add it to my fork's ad­min as a post-­­com­mit hook

  • Ed­it a file in github's web UI and com­mit it (y­ou can of course just push from any github clien­t)

  • Au­­to­­mat­i­­cal­­ly, the site niko­la-as-a-ser­vice pub­­lish­es gets up­­­dat­ed.

Please don't try to use this ser­vice yet be­cause:

  1. It's run­n­ing in a $4.50/­­month serv­er

  2. It's the same serv­er my own blog us­es

  3. I will turn it of­f, delete ev­ery­thing, etc. ev­ery once in a while

  4. I am ed­it­ing the code on the server, so no guar­an­­tees it will not just stop work­ing.

So, here's the video:

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

Contents © 2000-2024 Roberto Alsina