A Cookidoo Shopping List Scraper and Parser for better results. It can unify and merge all ingredients by different rule sets.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Florian Brinker 4be68a4915 Add example 3 months ago
src First version 3 months ago
.gitignore First version 3 months ago
LICENSE Initial commit 3 months ago
README.md Add example 3 months ago
composer.json First version 3 months ago
composer.lock First version 3 months ago
config.sample.php First version 3 months ago

README.md

cookidoo-shopping-advanced

A Cookidoo Shopping List Scraper and Parser for better results. It can unify and merge all ingredients by different rule sets.

Example

// use ...
$config = require('config.php');

$cookidooScraper = new CookidooScraper();
$cookidooScraper->login(
    $config['account']['username'], 
    $config['account']['password']
);

$list = $cookidooScraper->getShopptingList();

$ruleApplicator = new RuleApplicator();
$ruleApplicator->applyRules(
    $list, 
    [ 
        new Rules\Omit(),
        new Rules\Simplify(),
        new Rules\MergeSame(),
    ]
);

$categorizedList = $list->getByCategory();
// ...

Caching

You can cache the shopping list as a json file:

file_put_contents('./list.json', $list->toJson());

$list = ShoppingList::fromJson(file_get_contents('./list.json'));