The manatee watches...

Hookback Jan 24, 2015

I released a new piece of software the other day, Hookback. It's purpose it to receive and handle webhook callback's from GitHub. I've seen several other projets that aim to do this, but they often seem inflexible or difficult to set up. Hookback aims to be dead simple.

You tell it what events to listen for on what repositories, and then you give it a command to run for those events. That's it. It can run those commands synchronousely and respond back to GitHub with the output, or it can run them in the background, so that long running commands to block the request.

As an example, I am now using Hookback to power this site. This site is published on GitHub, and when I commit and push new content to the repository, GitHub notifies this server. The server then runs the commands necessary to recompile and publish the new content on the site. It makes it very easy to get new content posted.

It's my first real project written in Go and I am really enjoying it. It took awhile to find a groove with the syntax, but it's a real pleasure to use now. I am already scheming for what's next.

Feel free to let me know if you have any questions or features requests for Hookback. I aim to keep it simple, but that's not to say there isn't room for improvement.

htmlmin Feb 18, 2013

I've written an HTML minification library that's ready for release. pip install htmlmin should get you going.

This site is statically generated via pelican and I noticed that the content generated by it was not as compact as it could be. I started looking into existing HTML minification solutions and was left disappointed. I found one, django-htmlmin that left me disappointed - it relies on Beautiful Soup, Django, and other libraries, which in turn have lots of other, non-HTML dependencies such as MySQL. Furthermore, it isn't really that featureful or well designed, as I looked through the code.

htmlmin has no dependencies other than Python's builtin HTMLParser. It has features that allow you to fine tune how the HTML gets minified and allows you to easily mark up your HTML inline to demarcate non-minifieable areas. It follows the HTML 5 specification closely to account for non-closed tags.

There's still a few more features that I want to add. Specifically, I want to add a feature that allows removal of opening and closing tags where allowed by the HTML5 specification. I also want it to recognize whitespace: pre inside of inline style tags. Those will come in the next version of the software as I design tests for them.

Projects

Tags