Introducing the Price And Nutrition Tracking System

In early 2017 I had just gone onto disability pension. Desperate to improve my health despite being broke, I was looking for a way to get the maximum fibre and protein from my food for the minimal cost and calories. I started entering in all the nutritional data from food I bought into a spreadsheet, calculating and plotting those protein:fibre:cost:calories ratios.

Later that year I started to create and analyse recipes which combined different ingredients. This quickly became cumbersome in a spreadsheet, so I started a Django project initially called the Price And Nutrition Tabulation System (P.A.N.T.S) for storing and visualising the data for both recipes and ingredients.

Soon I also realised since I was entering in all my recipes here it would also be easier if I used it as my daily calorie counter and added a “food diary” to the system, renaming it the Price And Nutrition Tracking System.

Example screenshot of the diary view:

/galleries/software-screenshots/pants-diary-screenshot.thumbnail.png

Read more…

The Pseudorandom Rhythm Section

Last year RMITCS ran a Algorithmic SATB Composition Competition, to generate a SATB song from arbitrary text. I wasn’t able to get anything working for the competition, but I did learn a bit about generating and manipulating musical scores in Python.

I already had a random chord progression generator in my miscellaneous scripts repo. I tried playing around with using that to generate scores with harmonically pleasing chords. I didn’t have much luck with text analysis; the project shifted into attempt to do some kind of instrumental jazz/bebop generator.

The melody got dropped as well, and the result is the Pseudorandom Rhythm Section, which generates a random chord progression and piano/bass acompaniment. The output is a score in MusicXML with both parts and the chord symbols. Ideal for practicing improvisation or coming up with ideas for composition.

/galleries/software-screenshots/prrs-example-screenshot.png

Read more…

Yes, I only posted once last year

Unfortunately my health somehow got even worse last year, and then took a turn for the yet more worse this summer with the record-breaking heat. I’ve switched up medication a few times and things seem to be improving slightly (although I might have to just take it easy until after summer).

Although I spent most of the year too exhausted to function I did release some software on my github repo in August and January; respectively a jazz-comping generator and my nutrition tracking system.

I’ll be posting in detail about these as soon as I’ve finished dusting off the cobwebs of the software section of the site. Maybe even this month!

Rumours of my death have been slightly exaggerated

My illnesses have been a bit worse over summer and I dropped off the internet for a while. Now it’s cooler I’m going to make more effort to stay online and keep up with communities and OSS projects and apps, maybe expand the food section of this site as planned last year.

Site changes:

  • Fixed minor nav issues on small screens

  • Fixed some outdated links in the notes

  • Fixed dates showing incorrectly sometimes

  • Fixed expired DNS records

Rewriting my site using Nikola

As my old site design had became rather grating (both visually and on the backend) I’ve decided to rebuild my site completely.

The previous system, from 2004 (!), used Make to “compile” a set of PHP scripts together, producing a mostly static HTML result. Consistent sidebars, headers etc were just PHP includes. A few directories were built with special Make/PHP targets to convert a collection of XML into HTML, or generate a static image gallery from a directory hierarchy of images.

Although I am starting over again - and avoiding PHP this time - I want to do things a similar way, building a static site from a set of files that can programatically generate content.

After looking into a few ReST, Markdown and templating alternatives - including rst2web and Sphinx - I settled on using Nikola.

Nikola works similarly to my old system of “building” a dynamic site into static HTML. Page content can be added to a source tree using ReST or a variety of other formats, and the build process takes care of converting it and adding consistent navigation and styling. It also supports image galleries like my old site system, taking folders of images and converting them into a static gallery with thumbnails etc.

As an added bonus, it includes excellent blog post support, so hopefully I’ll be making more posts like this.