So you couldn't make it to PyCamp? This is the place. Sorry, I can't post the awesome, so it's just a picture :-)
One of the things I hacked at during this PyCamp is trying to figure out a nice workflow for Nikola, something that will enable users that are not so technical, to use it.
One first step is Nikola-as-a-service, which is meant for technical users anyway but lays down the infrastructure for this to work semi-nicely.
In the video below, you will see me do this:
Go to GitHub
Take a starter's blog I provided, and do a clone
Go to the nikola-as-a-service site, and login (via twitter)
Create a site using my fork's repo URL
Get a "webhook" URL, and add it to my fork's admin as a post-commit hook
Edit a file in github's web UI and commit it (you can of course just push from any github client)
Automatically, the site nikola-as-a-service publishes gets updated.
Please don't try to use this service yet because:
It's running in a $4.50/month server
It's the same server my own blog uses
I will turn it off, delete everything, etc. every once in a while
I am editing the code on the server, so no guarantees it will not just stop working.
So, here's the video:
So, day 3 and next-to-last of PyCamp is done.
Great day, sunny, not all that cold
Empanadas at lunch, pizza for dinner, cake for tea. Feeling kinda spoiled today.
Lots of hacking at Nikola-as-a-service (details below)
PyAr meeting by a huge, somewhat scary bonfire earlier tonight
So: Nikola-as-a-service is an idea where you can keep your blog somewhere, and this service will get the data, and publish a nice site for you.
Here's the current workflow, which is just one of a dozen that can be implemented because this thing is quite simple:
Currently it has twitter authentication. You never need to create an account, just login with some service you already have accounts with. Anything with OAuth will work.
The data provider
Currently, github. Soon, Ubuntu One. Later, who knows. A data provider is something from where we can grab data, and that can notify us (automatically or by having the user click on a button) when we should get that data and rebuild the site.
I am doing it with Nikola, of course :-)
Jobs using Redis and Celery, server app using Flask, rendering using Nikola
How does it work?
You go to github, clone a barebones blog. Do your modifications. Go to nikola-as-a-service, and login via something. Then you give Nikola your github repo's URL, and you get a webhook URL. Go back to github, and configure the webhook.
From that moment on, every time you push to github, your blog is updated :-)
In the future: every time you save to Ubuntu One, your blog is updated. In the further future: Every time you X to Y, your blog is updated.
It's going to be cool :-)
Finishing Day 2, here's the update.
Woke up 10 time because David Litvak doesn't know how to turn off his alarm. Now hating "Good Day Sunshine" by The Beatles. Sorry Ringo!
Learned about Celery/Flask/Juggernaut. Tomorrow will try to hack on the Nikola server idea using that. Hugo Ruscitti already did a lot of work!
Helped Martín Gaitán do Nikola gallery improvements (looking much nicer now!)
Implemented code listings for Nikola
Had a huge spider walk up my leg.
Had asado for dinner!
Played with remote controlled cars.
Saw a guy juggle while riding a monocycle
Played in the ping pong tournament (record 1-1, out in the group phase)
Fixed a bunch of bugs that popped while implementing stuff.
Tomorrow: will hack all day in the nikola hosting idea.
This is a new feature in Nikola, my static website and blog generator.
It's aimed at showing pieces of files in the posts, and giving you a link to the full file, does reasonable syntax highlight thanks to pygments, and the syntax for embedding in your posts is not excessively awful, so I can use it for some of my tutorial / book projects.
Here's an example:
.. listing:: md.py python :start-at: def compile_html :end-before: output =
This is not merged into master yet, but should be soon.