- Scheme 95.3%
- CSS 4.7%
| libfoodbot @8483ce1266 | Add ability to save, edit, and list meal plans. | |
| static | Initial libfoodbot integration. Massive changes. Sorry. | |
| .gitignore | Initial commit. Time to show my work. | |
| .gitmodules | Remove overflow scrollbars | |
| LICENSE | Initial commit. Time to show my work. | |
| README.md | Add SQL for the tables I've been adding on-the-fly to my nutrition.db. | |
| recipes.scm | Add ability to save, edit, and list meal plans. | |
| tables.sql | Add ability to save, edit, and list meal plans. | |
guile-recipes
A continuation of the "food bot" project. After misadventures with writing and using a buggy Go TUI, and after writing a couple simple web app interfaces to my flat-file organizational systems and experiencing significant QoL improvements as a result, I've begun this project with the goal of creating a web-based UI for organizing recipes, filling in nutrition data for them, and then using a genetic algorithm to aid in creating nutritionally complete meal plans.
In my past Guile web app projects, I've avoided using external libraries as I have been burned in the past by the poor packaging tools of certain languages (e.g., NodeJS and Python). There's no getting around using SQLite for this project, though, unless I want to throw away a bunch of work and build something that will likely be unusably slow or limited. Guix seems to be the way Guile manages its libraries here. After a fair amount of pain, I wrote a script to spin up a shell with the necessary dependencies installed. The contents of my shell.sh file look roughly like this:
#!/usr/bin/env bash
export DB=~/foodbot/nutrition/db/nutrition.db # From https://codeberg.org/lykso/nutrition
export YAMLDIR=~/foodbot/grimgrains-yaml/yaml/ # From https://codeberg.org/lykso/grimgrains-yaml
export IMAGEDIR=~/foodbot/grimgrains-yaml/images/
export PS1="(recipes) $PS1"
guix shell guile-libyaml guile-sqlite3 guile -- bash --rcfile <(cat ~/.bashrc ; echo 'PS1="\[033円[0;32m\](recipes)\[033円[00m\] $PS1"')
Guile-recipes also needs to have tables.sql run against nutrition.db before anything else.