tanius bbcdb9c01d removing KDE AppStream metadata generation
KDE AppStream metadata is provided in metadata-kde.xml. It is however maintained manually, allowing more fine-grained control and simpler makefiles.
2020-06-04 14:36:17 +02:00
2020-06-02 02:46:15 +02:00
2020-06-04 13:53:02 +02:00
2020-06-02 02:46:15 +02:00
2020-06-02 19:42:49 +02:00
2020-06-04 13:53:02 +02:00
2020-06-04 13:55:04 +02:00

Food Rescue App


🚧 🚧 🚧 This application is under construction. 🚧 🚧 🚧

The code does not provide a useful application just yet. Check back at 2020-08-31 to find the first full release here.


1. Overview
2. Repository Structure
3. Installation
4. Usage
5. Development Guide

6. License and Credits


1. Overview

This repository contains an open source application to help assess if food is still edible or not. The actual content shown inside this application is contained and processed in repository foodrescue-content.

Features:

  • Convergent. The application runs from the same codebase and with the same user interface as a native (!) application on both phones, tablets and desktop computers. This is made possible by Qt5 and, based on that, the KDE Kirigami framework.

  • Cross-platform. The application is cross-platform, running on all platforms supported by the KDE Kirigami framework. As of 2020-06, these are: Android, iOS, Windows, Mac OS X, Linux, FreeBSD (see).

  • Scan to check. To quickly find the required information about a food item, scan its GTIN barcode with the camera of your device.

  • Keyboard control. The application can be fully controlled by keyboard shortcuts. That also works in the mobile variant, such as for Android based netbooks.

  • Desktop touch control. As a side effect of convergent application development, the user interface is touch control friendly even on the desktop version. That's useful for the considerable amount of notebook computers with touchscreens.

Documentation:

  • Project website. The project's website with introductory information and relevant links is fairdirect.org/food-rescue-app.

  • API documentation. The project's C++ source files contain in-code documentation that you can compile into full API docs with Doxygen.

  • Other documentation. Extensive project documentation about planned features, used technologies, frequent tasks and related projects and initiatives is available in a Dynalist document. The same content is also available as an exported version under doc/doc.html in this repository. But the export is still rough and does not support proper navigation in the document, so at this time the Dynalist live document is preferable.

2. Repository Structure

TODO

3. Installation

Right now, you would have to compile the software yourself from source ☹️ See sections 5.1. Development Setup and 5.2. Build and Development Process below for that.

Eventually you will be able to install the software comfortably as follows:

  • For Android. Install directly from F-Droid or Google Play. Or install from the KDE Android F-Droid repository, which also contains all other Kirigami based Android applications.

  • For iOS. Install from the Apple App Store.

  • For Linux. For Ubuntu 20.04 LTS and its variants, a Debian package is provided in a PPA package repository.

  • For Windows. Download a self-extracting installer and install from there.

  • For Mac OS X. Download a DMG package and install from there.

4. Usage

The following keyboard combinations are available:

  • Close the application. Ctrl + Q (Kirigami default)
  • Select menu item. Alt + highlighted letter while menu drawer is open

5. Development Guide

5.1. Development Setup

  1. Install the required dependencies. The dependencies are chosen to be matched by the newest Ubuntu LTS releases. So for example, from 2020-04 to 2022-04 (see), releases will be installable under Ubuntu 20.04 LTS and you can use the packages from its standard repositories for development. (The project currently also builds under Ubuntu 19.10, but that is not guaranteed for the future.)

    If your distribution provides older versions of the following dependencies or you develop under Windows or Mac OS X, you have to install dependencies manually.

    • KDE Kirigami 5.68.0 or higher. As provided under Ubuntu 20.04 LTS and installed there with:

      sudo apt install kirigami2-dev libkf5kirigami2-doc
      

      To install Kirigami 5.68.0 manually, choose the corresponding commit f47bf906 (source). Avoiding a higher version can be necessary if it does not build with your system's Qt libraries otherwise.

    • Qt 5.12.0 or higher. As required by KDE Kirigami 5.68.0, corresponding to commit f47bf906. Under Ubuntu 20.04 LTS, it is installed automatically as a dependency.

    • Breeze icon theme. Under Ubuntu 20.04 LTS, install with:

      sudo apt install breeze-icon-theme
      
    • Development tooling. Under Ubuntu 20.04 LTS, install with:

      sudo apt install build-essential cmake extra-cmake-modules
      
  2. Clone the repository.

    git clone git@github.com:fairdirect/foodrescue-app.git
    
  3. Adapt the CMake files. There is a marked section at the beginning of ./CMakeLists.txt that you have to adapt to your system. (This will be fixed in a later version, since Makefiles should not include system-specific configuration.)

5.2. Build and Development Process

To build the software using the command line:

cd example && mkdir build && cd build
cmake ..
make

(TODO: How to build the various targets, such as an Android APK etc.. How to deploy to a phone and run it there.)

To build the software with Qt Creator:

  1. "File → Open File or Project.." and open the project's CMakeLists.txt. (This is how you open CMake projects with Qt Creator.)

  2. Select the "Projects" tab from the sidebar and configure the project's build targets (TODO: how).

  3. In the lower left build control toolbar, select your build target and then click the large green "Run" button.

5.3. Release Process

TODO

5.4. Software Design

TODO

5.5. Code Style Guide

The guiding idea is to write code that reads almost like natural language. That affects variable and method naming, source code layout and also choice of the logical flow and distributing algorithmic complexity so that one can understand everything while reading through once.

For C++ code, this means specifically:

TODO

And for QML code, this means specifically:

  • Visual order. Order code elements as much as possible in the order they will appear in the user interface (top to bottom, left to right). If that means mixing contained QML types and QML attributes, so be it.

5.6. Documentation Style Guide

TODO

6. License and Credits

Licenses. This repository exclusively contains material under free software licencses and open content licenses. Unless otherwise noted in a specific file, all files are licensed under the MIT license. A copy of the license text is provided in LICENSE.md.

Credits. Within the rights granted by the applicable licenses, this repository contains works of the following open source projects, authors or groups, which are hereby credited for their contributions and for holding the copyright to their contributions:

  • Open Food Facts. This project relies heavily on the groundwork done by the open source Open Food Facts project for creating a data commons for food products identified by a GTIN barcode. Actual content from Open Food Facts is included only via the foodrescue-content repository; see there for licencing details.

  • IQAndreas/markdown-licenses. Provides orginal open source licenses in Markdown format. The LICENSE.md file uses one of them.

  • Qt and KDE Kirigami developers. For making the best convergent application development framework to date.

Description
Convergent mobile+desktop application to help decide if food is still edible.
Readme 863 KiB
Languages
QML 46.5%
C++ 32.5%
XSLT 11.6%
CMake 7.2%
HTML 2.1%