Ephes Blog

Miscellaneous things. Not sure what to put here, yet.


Kptncook and Mealie

Kptncook is a popular app attempting to answer the infamous "What do you want to cook today?" question. The recipes and the design of the app are good. The technical implementation is a little bit wonky but sufficient.

But what if you want to store some additional information on a recipe? Or generate a grocery list from a recipe or include recipes from other sources? While kptncook is great as a source of inspiration, it is not possible to use it as a recipe manager. And it's also difficult to add recipes from kptncook to a real recipe manager like paprika since the URLs generated by kptncook don't include enough details to be useful.

But somehow the kptncook app can extract those details from a shared recipe URL, so it's probably possible to scrape those details using only the recipe id. This is what kptncook does, a small command line client I wrote earlier this year. At about the same time, someone recommended Mealie to me, a powerful recipe manager using fastAPI in the backend and Vue.js in the front end, a stack I'm familiar with. So I thought: Hmm, maybe it's possible to just import all of my kptncook recipes into Mealie?

Mealie Browserwindow

And yes, that's an additional thing the kptncook CLI app does now. But until this weekend it was limited to just one image per recipe and the ingredients were not properly transferred and therefore it was not possible to increase the number of portions in mealie etc.

This has all changed now due to this pull request by Alexander Detsch providing per-step images and improved information about food/ingredients. One of the especially useful tricks was to modify the headers of the request sent to the kptncook API to get a more detailed recipe. Thanks a lot 🙏.


Weeknotes 2022-11-28

Did some cleanup after switching to the new wagtail-based django-cast for my homepage and python-podcast.de. Had to rename the users, backup, and remove the old services. Made sure the new backup is working. Then I deployed a self-hosted Mastodon instance and migrated my user there, which worked out well.

Went to the trivago Tech Get Together event to meet with friends and former co-workers. Had a lot of fun and heard about openpodcast.de - an open platform for podcast analytics, which is an interesting and promising project.

Articles

TIL this week

Twitter

Software

Podcasts

Out of Context Images



Weeknotes 2022-11-21

"Better to sink in boundless deeps, than float on vulgar shoals; and give me, ye gods, an utter wreck, if wreck I do." —Mardi

Lots of stuff happened last week besides work. After we finally found time to meet for some podcasting the week before last week, I finished producing our podcast episode about Python 3.11 😎.

Last week I wondered how long it will take to migrate the content after being able to deploy my new wagtail-based django-cast version. Turns out it didn't take that long, because now both this website and python-podcast.de are running the latest Python/Django/Wagtail combination. Ok, I have to admit it was a lot of work, and I broke some stuff, but now it's done. Finally 🍾! I started this project around 2019, so long ago that I don't even remember exactly when!

Articles

Weeknotes

Software

Podcasts


Out of Context Images

No images this week, I was busy sitting inside staring at computer screens.


TIL: Be careful with your wagtail javascript

Currently I'm busy replacing my home grown content editing solution for my blog software django-cast with Wagtail. I copied the javascript part needed for the wagtail admin to add audio blocks from the video javascript and forgot to replace all occurrences of videoTitle with audioTitle. Besides being wrong this worked for Wagtail2.

But last week I upgraded to Wagtail4 and now audio blocks are discarded without any error message. What happened? Well, now the javascript error causes wagtail to not include the audio block in the block count that it sends to the server when the page is saved. And the wrong block count number then causes the Wagtail edit form handler to just ignore the block completely 🙃.

TLDR: Copy&paste saved me a few minutes in the short run, but did cost me a few hours of debugging a year later.