Preview Markdown In The Terminal With Bash

Markdown has become an extremely popular way to document source code and other projects, thanks in no small part to how well web-based services like GitHub render it. Just sprinkle a few extra characters into a regular text file, and all of a sudden it looks like you know what you’re doing. Unfortunately, there are some places where markdown won’t actually render, and you’ll be stuck looking at those extra characters.

But thanks to MarCLIdown, the terminal doesn’t have to be one of those places. Written by [NihaAlGhul], this simple tool takes a given markdown file and spits out a fairly impressive rendering — and you don’t even need to have one of those fancy new GPU-accelerated terminals. Most impressively, the whole thing is implemented as a single Bash script.

Continue reading “Preview Markdown In The Terminal With Bash”

Hack Your Recipes

If there is one thing Hackaday readers have in common, they like to make things. Of course, we don’t all make the same things and that’s great. But, unsurprisingly, a lot of people who like to create things include the kitchen as their workspaces. Why not? We all have to eat and there’s something very nice about cooking a meal for your loved ones or even just yourself. Cooklang is a markdown-style language from [Brian Sunte] specifically for capturing recipes. It not only formats the recipe, but it provides an easy way for software to parse the key elements while still being human-readable. This allows you to manipulate recipes just like software, including using Git for version control, for example.

There was a time that cooking meant having big cookbooks, but now you are more likely to search the Internet. There’s only one problem. For some reason, nearly every recipe site follows the same format. Thousands of words about how much the cook’s family loves the dish, how they pick out only the most succulent tomatoes to ensure the dish will have a vibrant scarlet hue, and how much their poor granny would have loved the dish, if only she had survived the 1928 flood which is described in great detail. After 20 minutes you find out that you put the tomatoes in the blender, add a cup of water, and that’s it. Cooklang is a sort of antidote for that. You can easily write something that parses the recipe and generates, say, a shopping list or compares it to your household inventory and places an order for the remaining things from the local grocery delivery.

Continue reading “Hack Your Recipes”