Giter VIP home page Giter VIP logo

openfoodfacts's Introduction

openfoodfacts

A personal project to look up a product's EAN code based on its name. Remote database used is Open Food Facts: https://fr.openfoodfacts.org/

Input & Output

Input should be a txt file with one product name/description per line

Output should be a JSON containing key-value pairs per product with the original product name, the EAN code and the description. In case the EAN is not found, add the original product description in the output file.

several instructions

  1. a flat jar (runnable.jar) and output (out.txt) is already contained if you do not want to build and run.

  2. for building and creating your own jar :

    $cd imstest

    $mvn clean install

    $mvn package

    a jar named imstest-1.0-SNAPSHOT.jar will be created at target/

    use it as : $ java -jar imstest-1.0-SNAPSHOT.jar -i -o

    an output file will be created if it does not exist.

  3. unit test is not perfect (honestly speaking it is only a sample), since I know it is a bad idea to transform json to String.

  4. It is possible to change the database by changing the variable "searchURL" in the code

openfoodfacts's People

Contributors

tianshuyang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.