Commit Graph

11 Commits

Author SHA1 Message Date
Mario Zechner
8419689f11 Clean-up, initial Hofer mapping. 2023-06-21 02:43:04 +02:00
Mario Zechner
303d25ccb5 Categories for Billa & Spar, infra to add catgories for other stores.
Billa maps directly to the canonical categories. Spar uses a mapping file stores/spar-categories.json.

Each store has a generateCategoryMapping() function which is called once in analysis.js:updateData() and analysis.js:replay(). The function is responsible for

* Fetching the latest categories
* Merging them with already mapped categories
* Report new categories that haven't been mapped yet
* Report categories that have been mapped but are no longer part of the latest set of categories
* Save the merged mappings to disk

This schema might not work for all stores, in which case updateData() and replay() will use a knn approach to figure out the category for an item. See #81
2023-06-21 01:29:00 +02:00
Mario Zechner
a5cd0f5de8 Fetch Billa data by category. Yields more items. Can be used for categorizing other store items, see categorize.js. 2023-06-06 15:15:39 +02:00
Mario Zechner
d30ef57d9b Fix a bunch of SPAR unit/quantity issues. See #71. 2023-06-05 21:42:57 +02:00
Matthias Hochsteger
505b3c75b3 fallback argument in convertUnit
Fixes #70
2023-06-05 14:26:42 +02:00
Matthias Hochsteger
ce13e6cc1d Units handling for Unimarkt, some clenaup 2023-06-03 15:09:29 +02:00
Matthias Hochsteger
e5ae715451 Don't convert weighted articles to 100g
Issues:
- 100g feels wrong for some articles (the cheaper ones)
- priceHistory wasn't changed (so the shown prices were
  wrong/inconsistent with changed quantity)
2023-06-02 23:40:13 +02:00
Mario Zechner
c6bbd0e03b Increased maxWidth to 150 in prettier config, formatted all the things. See #52. 2023-06-02 16:45:54 +02:00
Matthias Hochsteger
b8577bb507 Fix mpreis units 2023-06-01 08:25:04 +02:00
Matthias Hochsteger
4c55a085b2 Use short-description-2 in spar for quantity/unit
Also fix round error in cases without quantity short-description
2023-06-01 07:42:28 +02:00
Matthias Hochsteger
524ca40307 Convert all weighted articles to 100g/ml 2023-05-28 19:48:06 +02:00