This project arose from the fact that the web is going to shit and everybody is doing it wrong. ¯\_(ツ)_/¯
"Modern" sites spy on you.
"Modern" sites can eat my ass.
- Based on flask and peewee
- Fuck passwords, where we're going, TLS client certificates are the law of the land
- All mails sent GPG-encrypted
- UX and DX are big priorities
- Restrictive, flexible and extensible permission system
- Nice theming system with templatable SVG, integrated SCSS support and granular overrides
- CLI for things like NOT EXPOSING YOUR FUCKING INSTALLATION PROCEDURE TO THE OPEN INTERNET
- supposed to not only protect the folks running a site, but its visitors, too
*pre-alpha, unstable API, not reviewed - DO NOT FUCKING USE IN PRODUCTION!!*
Ported over to python3; Had to deprecate <keygen> and am still missing a replacement.
SVG Maps got way more powerful in the meantime, being able to render arbitrary GeoJSON taken from GeoData objects out of which you can build hierarchies to make [sub]groups of GeoData selectable together with arbitrary granularity.
Probably going to drive data visualization capabilities to the next level because with <keygen> gone good UX for TLS client certificate provisioning is basically impossible – damning poobrains to be an even more niche tool than it was from the get-go – so poobrains will probably become more specialized towards Gonzo-style datajournalism, whatever the fuck that means.
A few months have passed since I last wrote anything about poobrains development and I think it's about time I told you what I was up to since then. It's been a lot, so this is probably going to be a semi-long post, even without going into too much depth.
The SVG system has seen the addition of maps and continued work on making plots better. An automatically calculated grid and the application of a hue-rotated color palette to datasets should reduce some of the visual clutter. Error bars are now rendered as well.
Datasets and -points are linkable by fragment identifiers and show their respective info when addressed. Dataset descriptions use the <foreignObject> tag to show a nicely formatted and scrollable HTML description generated from markdown. The same technique is used for the points on a map.
The only problem with <foreignObject> is that chrome simply doesn't support it, so I had to create a shitty text-only fallback as well. At least markdown is pretty human-readable, I guess…
For easy extractability, a json-encoded version of the whole dataset is included in the generated SVG as well.
The CLI can now be used to render plots and maps into files, too.
It also has some important new commands. import and export consume and create ASCII-separated text files, which are just like CSV – only good.
The form system got some TLC too, with paginated forms for foreign key relations, a bunch of fixes and better support for fieldsets through the addition of ProxyFieldset which allows wrapping any form inside a fieldset.
Oh, and checkboxes now use SVG instead of the ugly native controls, sadly without working animation because both firefox and chrome fail at properly handling SVG backgrounds with fragment identifiers…
Another big thing is that poobrains is now self-documenting. A poobrains site can now render its own documentation. This system comes with a custom-written HTML5 pydoc writer because there wasn't a good one.
I also wrote a "quick"start which managed to break the 2000 word barrier. You can access it through the documentation system: phryk.net/doc/quickstart/.
On a typographic note, I changed the default text font to ClearSans because OpenSans seems to have legibility issues on a lot of platforms and changed the default decorative font from Ostrich Sans to Orbitron (both by the dank League of Movable Type) because it's way more cybre.
Last but not least, I spent the last few days making poobrains compatible to peewee 3, the new major version of the ORM poobrains utilizes.
I should be mostly through with it now, but a bunch of issues might still be popping up.
I don't want to stick my neck out too far here, but I think I have all systems I want in poobrains in place. There's still one or two things I'm not sure I want to include, but from now on poobrains development is probably going to be mostly bugfixing and styling/templating work as well as some UX things that are still missing (like letting users properly administer their client certs).
I have finished the form system overhaul. It has taken almost two months, but now all superfluous stuff from before the move to click.types for type coercion has been killed dead. It was a decently-sized massacre amongst the classes defined in there, so hopefully that'll make it easier to get an overview. :P
The form systems code has shrunk by about 10% while getting cleaner *and* more powerful.
Oh, and to add icing to the cake, I made sure all form field templates use the "required" hint for js-less client-side validation and made sure those fields are styled uniformly with those determined to be invalid server-side.
Probably going to work on better integration of templatable SVG next…
More work done on the form system, but the cleanup isn't quite finished yet. Moved support for choices (whitelist validation + <datalist> autocompletion) and multiple values into the base form `Field` class and started deprecating field classes specific to choices or multi support.
The endgame should™ be a cleaner *and* more flexible form system.
Also, there are now template hints shown when in debug mode, because I finally got tired of having trouble finding the right template file for some output:
Removed hand-baked type coercion in form system and moved to using click.types. This means coercion stuff only has to be implemented once and works for forms as well as the CLI. A good deal of cleanup in the form system is still needed to depopulate form/fields.py a bit.
Oh also, the certificate generated by the `minica` command of the CLI now properly works with <keygen> and a good bunch of assorted bugs was fixed. Probably while introducing some new ones.