New revamped version of the AnyMeal recipe management software

栏目: IT技术 · 发布时间: 5年前

More than 15 years ago after leaving university I developed a GNU/Linux software called AnyMeal for managing a large amount of recipes. The software was based on the MealMaster file format which is a popular file format for sharing recipes.

The website of Episoft Systems, which provided the original MealMaster software for DOS, is not online any more. Fortunately a copy of the website is still available on the Internet Archive.

The AnyMeal software used the recode library to convert recipe text files to the UTF-8 encoding. A fast Flex parser then converted the MealMaster recipes to XML. An XSLT script was used to generate SQL commands for inserting the recipe into a MySQL database. For setting up the database and user account, the software had a step-by-step wizard. The KDE password manager was used to store the user credentials.

The recipe search was performed using a complicated search dialog with multiple tabs. The graphical user interface used multiple windows to display recipes and lists of search results. A recipe editor was implemented for modifying existing recipes or adding new ones.

However life happened and eventually I stopped maintaining the software. The software was developed using Qt3 and when Qt4 came out, there were breaking changes with list views and the software didn't work on new systems any more.

Now many years later it still looks like there is a space for a fast recipe management software which can handle a large amount of MealMaster recipes. So I decided to use my past experience and do a rewrite of the old software.

New revamped version of the AnyMeal recipe management software

This time I used the Qt5 framework to implement the graphical user interface. Instead of the old list view items, Qt5 now uses an item model and a list view widget to view the model. Also Qt5 provides cross-platform support for printing which is a great feature for a recipe management software. Like that it is not necessary to have a computer in the kitchen any more ;)

Instead of MySQL, I used the SQLite3 embedded database . This greatly simplified the software because SQLite3 does not require the setup of user accounts and databases. Also the user does not have to run a database server in the background. Furthermore without user credentials there is no need for interfacing with the KDE password manager any more.

For the internal representation of recipes I decided to use a more conservative approach. For representing recipes I used a C++ class instead of XML data. Like that it is not necessary to depend on the Xalan XSLT processor and Xerces-C XML library any more.

I also changed the order of UTF-8 conversion and parsing of recipes. Now the recipes are first parsed with an Flex MealMaster parser and stored as C++ objects. The strings of the C++ object then get converted to UTF-8 using the recode library . Like that it is not necessary for the Flex parser to be UTF-8 aware any more thus simplifying the implementation.

The search was also simplified. A search can be performed on title, category, or ingredient. It is possible to narrow down the search result by using several searches one by one. I.e. it is not necessary any more to implement a complicated search dialog which builds a complex search query.

Back then I used CVS for version control. This time the version control was done using Git . AnyMeal is still hosted on SourceForge however the source repository is now on Github , Gitlab , and BitBucket (after all Git is a distributed version control system!). The main project page is on Github (which displays the content of the gh-pages branch of the repository).

After simplifying the software architecture like that, it was possible to implement the software in less than 100 hours. Most of the work of the rewrite was implementing a simpler Flex parser and reimplementing the recipe editor. In contrast to back then, I implemented the internals of the application using test-driven development (TDD) . I used Google Test which is Google's C++ test framework. Also, unlike back then, now there is Travis CI which provides free automated testing for software libre.

Finally using MSYS and MinGW the software was also compiled for Microsoft Windows. The Nullsoft Scriptable Install System (NSIS) was used to create an installer.

I am planning to add a few more small features but I think the software is more or less ready to be used for cooking.

Let me know what you think in the comment section below.

Enjoy!


以上所述就是小编给大家介绍的《New revamped version of the AnyMeal recipe management software》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

创新

创新

理查德·福斯特 / 王宇锋 / 中信出版社 / 2008-10 / 32.00元

《创新:进攻者的优势》内容简介:为什么一流企业突然间将它们的市场拱手让与新的竞争者?要避免这样的命运,需要无情地抛弃那些过去使它们成功的技能和产品,那么究竟哪些企业能够做到这一点呢?企业如果总是墨守成规、因循守旧,那么长期下去,必然无法以市场的速度及规模进行革新或创造价值。这样的企业会像得州仪器、施乐等市场领先者一样,被一些资源较少、技术较差、市场支配力较弱的竞争对手超越,而这些所谓进攻者的优势,......一起来看看 《创新》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具