New mini-project: Gyro
History
Facubatista: ralsina, yo, vos, cerveza, un local-wiki-server-hecho-en-un-solo-.py-con-interfaz-web en tres horas, pensalo
Facubatista: ralsina, you, me, beer, a local-wiki-server-done-in-one-.py-with-web-interface in three hours, think about it
So, I could not get together with Facu, but I did sort of write it, and it's Gyro. [1]
Technical Details
Gyro has two parts: a very simple backend, implemented using Sanic [2] which does a few things:
Serve static files out of
_static/
Serve templated markdown out of
pages/
Save markdown to
pages/
Keep an index of file contents updated in
_static/index.js
The other part is a webpage, implemnted using Bootstrap [3] and JQuery [4]. That page can:
Show markdown, using Showdown [5]
Edit markdown, using SimpleMDE [6]
Search in your pages using Lunr [7]
And that's it. Open the site on any URL that doesn't start with _static
and contains only letters and numbers:
http://localhost:8000/MyPage
: GOODhttp://localhost:8000/MyDir/MyPage
: BADhttp://localhost:8000/__foobar__
: BAD
At first the page will be sort of empty, but if you edit it and save it, it won't be empty anymore. You can link to other pages (even ones you have not created)
using the standard markdown syntax: [go to FooBar](FooBar)
There is really not much else to say about it, if you try it and find bugs, file an issue and as usual patches are welcome.