In the next article we are going to take a look at HeRMs. Whether you cook for passion, hobby or profession, I am sure that if you fit in any of these cases, you will have a cookbook. Having one of these is a good way to practice and improve in the kitchen. We can keep our small recipe book by storing the recipes on our smartphone or by saving them in a Word document. There are a multitude of options. Today there are many ways to take notes on recipes cooking, but no longer so many to take notes from the terminal.
As I am a huge fan of the terminal, I have stopped to take a look at HeRMs. This one food recipe manager for command line. Using HeRMs, we can add, view, edit and delete cooking recipes and it will even allow us to make the shopping list. Everything from the terminal.
It's free and open source. This utility is written using the Haskell programming language. The source code is freely available at GitHub, so we can fork it, add more functions or improve it to our liking.
General characteristics of HeRMs
This utility will give us several options to manage our recipes:
- Will allow us add recipes.
- We can consult the recipes that we have added.
- We can also edit recipes.
- Allows us indicate how many people each recipe is intended for.
- In case you no longer need a recipe, we will be able to delete it.
- This little program will allow us import recipe files to add them to our cookbook.
- We will have the possibility of generate shopping lists for our recipes.
- We can keep a record of recipes with labels.
Installing HeRM's
Since this program is written using Haskell, we must first install Cabal to be able to install it. Cabal is a command line program for downloading and building software written in the Haskell programming language.
Cabal is available in the repositories core of most Gnu / Linux distributions. For this we can install it using the default package manager of our Ubuntu or open a terminal (Ctrl + Alt + T) and write in it:
sudo apt install cabal-install
After installing Cabal, make sure you have added the path to your file bashrc. To do this type in the terminal:
vi ~/.bashrc
When the file opens, add the following line:
PATH=$PATH:~/.cabal/bin
Press : Wq to save and exit the file, if you use vi as I just did. Then run the following command to update changes performed:
source ~/.bashrc
After completing the previous steps, run the following command to update the list of available software:
cabal update
Now we can now install HeRMs. We will only have to write in the same terminal:
cabal install herms
While it installs, have a drink, it may take a while. Once the installation is finished, you can start managing your recipes.
Manage your recipes with HeRMs
Add recipes
Let's add a food recipe to our cookbook. To add a recipe, we will have to write in the terminal (Ctrl + Alt + T):
herms add
You will see a screen the same or similar as the previous capture. Here we can start writing the details of the recipe.
To navigate the fields, use the following keyboard shortcuts:
- Tab / Shift + Tab - Next / previous field
- Ctrl + Key to move the course - Browse the fields
- [Meta or Alt] + h, j, k, l - Browse the fields
- I - Save or Cancel.
Once we have added the recipe details, press the ESC key and press Y to save it. Similarly, you can add as many recipes as you want.
List added recipes
To list the added recipes, type in the terminal (Ctrl + Alt + T):
herms list
View a recipe
To see the details of the recipes listed in the previous section, simply use the respective number as shown below:
herms view 4
By indicating the number 4, the program it is going to show us recipe number four of the ones we have saved in our cookbook.
Edit a recipe
To edit any recipe we will only have to use the edit option as shown below:
herms edit 4
Once you've made your changes, press the ESC key. The program will ask us whether or not we want to save the changes. Just select the appropriate option.
Delete a recipe
To delete a recipe, the command to use would be the following:
herms remove 1
Generate a shopping list
To generate a shopping list for a specific recipe, run HeRMs as follows:
herms shopping 1
My list it will be generated based on the ingredients that are part of the recipe number 1 (in this example), and that we have previously added.
Show HeRMs help
To see the help, we will have to execute:
herms -h
With this you can correctly handle your recipe book. The next time you hear a conversation about a good recipe, just open HeRMs and quickly take notes.