Bots: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
| 2 = [https://openfoodfacts.slack.com/messages/bots/ #bots] | | 2 = [https://openfoodfacts.slack.com/messages/bots/ #bots] | ||
}} | }} | ||
The bots are written in Perl, but it's relatively independent of the Product Opener code base, similar scripts could be written in pretty much any language. | |||
The bot uses both the mongodb database and the perl binary files that stores the product data, but you could just use the mongodb data only, it's the same. | |||
=Checkbot= | =Checkbot= | ||
Checkbot is a little bot that will check Open Food Facts for obvious errors and report them on Slack, in the [https://openfoodfacts.slack.com/messages/bots/ #bots] channel. | Checkbot is a little bot that will check Open Food Facts for obvious errors and report them on Slack, in the [https://openfoodfacts.slack.com/messages/bots/ #bots] channel. | ||
== Code == | |||
[https://bitbucket.org/openfoodfacts/product-opener/src/3f2b4c2790d19ad559fb68376001d4dbc7cd34a5/cgi/checkbot.pl?at=master Code on bitbucket] | |||
== Current checks == | == Current checks == | ||
* sugars () + starch () > carbohydrates () | * sugars () + starch () > carbohydrates () | ||
* carbohydrates = 106g / Product size = 100g | * carbohydrates = 106g / Product size = 100g | ||
* salt = 107g / 100g | * salt = 107g / 100g | ||
== Ideas == | |||
* on pourrait faire une version de checkbot qui ping sur Slack les personnes qui ont ajouté les produits :wink: (ou leur envoyer un mail d'ailleurs) | |||
* What about a label we could add on the products that have a verified erroneous label like the ajolix-chili above? We could tag them "error on label" and have checkbot skip them. What would you think of that @stephane? | |||
[http://world.openfoodfacts.org/label/incorrect-nutrition-facts-on-label incorrect-nutrition-facts-on-label] | |||
=Infobot= | =Infobot= | ||
[http://world.openfoodfacts.org/contributor/infobot Infobot user profile] | |||
Infobot will add some information on requests on many products | Infobot will add some information on requests on many products | ||
= Fixbot = | |||
[http://world.openfoodfacts.org/contributor/fixbot Fixbot user profile] | |||
Fixbot removed bogus countries that appeared at some point in the products, due to a Product Opener bug | |||
Product http://world.openfoodfacts.org/product/8414606446629 (miel-quot-esencia-andalusi-quot / esencia-andalusi) : removing bogus countries, replacing with Spain | |||
=Scanbot= | =Scanbot= | ||
[http://world.openfoodfacts.org/contributor/scanbot Scanbot user profile] | |||
Scanbot will look for the IP of scanned products, and will add the matching countries in the country field. | Scanbot will look for the IP of scanned products, and will add the matching countries in the country field. | ||
Runs on demand. Not really reliable because of the IP system. | Runs on demand. Not really reliable because of the IP system. | ||
=UPCBot= | =UPCBot= | ||
[http://world.openfoodfacts.org/contributor/upcbot UPCbot user profile] | |||
UPCBot was used to normalize UPC codes. Since we now normalize them in Product Opener, it should not be used anymore. | UPCBot was used to normalize UPC codes. Since we now normalize them in Product Opener, it should not be used anymore. | ||
[[Category:ProductOpener]][[Category:Bots]] | [[Category:ProductOpener]][[Category:Bots]] |
Revision as of 16:41, 18 October 2015
|
---|
The bots are written in Perl, but it's relatively independent of the Product Opener code base, similar scripts could be written in pretty much any language. The bot uses both the mongodb database and the perl binary files that stores the product data, but you could just use the mongodb data only, it's the same.
Checkbot
Checkbot is a little bot that will check Open Food Facts for obvious errors and report them on Slack, in the #bots channel.
Code
Current checks
- sugars () + starch () > carbohydrates ()
- carbohydrates = 106g / Product size = 100g
- salt = 107g / 100g
Ideas
- on pourrait faire une version de checkbot qui ping sur Slack les personnes qui ont ajouté les produits :wink: (ou leur envoyer un mail d'ailleurs)
- What about a label we could add on the products that have a verified erroneous label like the ajolix-chili above? We could tag them "error on label" and have checkbot skip them. What would you think of that @stephane?
incorrect-nutrition-facts-on-label
Infobot
Infobot user profile Infobot will add some information on requests on many products
Fixbot
Fixbot user profile Fixbot removed bogus countries that appeared at some point in the products, due to a Product Opener bug Product http://world.openfoodfacts.org/product/8414606446629 (miel-quot-esencia-andalusi-quot / esencia-andalusi) : removing bogus countries, replacing with Spain
Scanbot
Scanbot user profile Scanbot will look for the IP of scanned products, and will add the matching countries in the country field. Runs on demand. Not really reliable because of the IP system.
UPCBot
UPCbot user profile UPCBot was used to normalize UPC codes. Since we now normalize them in Product Opener, it should not be used anymore.