Giter Club home page Giter Club logo

grocytobring's Introduction

Copy Grocy "Missing Products" to BRING List

Check the CHANGELOG for new features

Build Container

First build the container:

docker build -t grocy-to-bring .

Run Container

Insert your Grocy URL, Grocy API Key and BRING Credentials to the .env file. Use the .env-example and copy it to .env

Get your BRING List UUID

First you need to get your BRING List UUID. Insert your BRING Credentials in your .env file and start the container with the following command to get your lists:

docker run --env-file .env --rm -t --name run-grocy-to-bring grocy-to-bring php ./bring.php

You will see an output of your lists:

Below are your bring lists with their UUID:
1st List // UUID: 9z567898-mnbv-2d67-qwer-9876543123
2nd List // UUID: e4567222-mnbv-2530-qwer-1234567890

Note the UUID of the list you want to use and add it to the .env file.

Add items to BRING

Now simply run the container:

docker run --env-file .env --rm --name run-grocy-to-bring grocy-to-bring

You can add it to your crontab e.g. and have it run every morning at 8:10:

10 8 * * * sudo docker run --env-file /home/admin/GrocyToBring/.env --rm --name run-grocy-to-bring grocy-to-bring 2>&1 | /usr/bin/logger -t GrocyToBring

Hide items from BRING list

If you want to hide items fron the BRING list, simply add a boolean user field to the products like "Hide from Bring?" and set the field name in .env (HIDEFROMBRING)

screenshot user field

Link shopping locations to BRING lists

Add a new text user field to the shopping locations like "Bring List UUID" and set the field name in .env (BRINGUUIDFIELD)

Use Shoppinglist and not minimum stock amounts

If you want to copy your shoppinglist to BRING instead of the products that are below minimum stock, set the "SOURCE" option in .env to "shoppinglist"

Known Issues

Currently no special chars like "%" work in BRING. Therefore I implemented a helper function to replace "%" with "Prozent". You can change this in .env (PERCENTREPLACE) for another language.

Screencast of setup

screencast

Thank you

Thank you to helvete003 for reverse-engineering the Bring REST API: https://github.com/helvete003/bring-api

And of course a massive shout out to Bernd Bestel the founder of https://grocy.info/

grocytobring's People

Contributors

andreheuer avatar heig avatar jacotec avatar kruemelro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

grocytobring's Issues

Items which are marked as 'done' in the shopping list should not be added

In case that products are added to the shopping list, but marked as "done" on the list without removing them, should not be added to Bring.

Use case:
Grocy adds an item below minimum stock to the shopping list. If this item is something which can be ordered, my workflow if to mark the item on the list as "done" without removing it after ordering. In this case we don't need to shop it, but it's still on the list and will be elminiated from the shopping list when it has arrived.

Division by zero in /usr/src/grocytobring/index.php on line 44

I'm playing with this great addition, unfortunately I'm always getting the error above when running the docker container.

Might be related to this breaking change in Grocy 4.0.0:

The product property qu_factor_purchase_to_stock was removed

Removing the division by "qu_factor_purchase" from the index.php makes it work.

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.