blob: 36f4f9940fafca3ded2e4a407f8fab17f3ce5e45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# README for coupons
This project exists to make it easy to query the current sale papers for select grocery stores, including specifically Publix.
## Upstream
This project's upstream is at <https://bgstack15.ddns.net/cgit/coupons>.
## Alternatives
Visiting <https://southernsavers.com> manually, or each store's website.
I previously started using selenium (see [aux/ads1.py](aux/ads1.py)) but that was not necessary.
## Reason for existence
To simplify and automate searching for items currently on sale
## Using
Basic usage is pretty simple. You need to specify a store at a minimum. When the script visits the webpage, it will cache the file to `$XDG_CACHE_DIR/coupons/` to reduce the amount of work needed during the same day.
./coupons.py --store "publix" --search "candy"
To use standard input from a fully-cached javascript response from the website, you could run this.
<~/.cache/coupons/publix_2022-09-01.json ./coupons.py --stdin --clean --search "candy" --pretty
An already-cleaned json file would not need the **--clean** flag. But the cached values are the exact javascript+json payload from the server.
See also `./coupons.py --help`.
## Dependencies
A chart for distros, or maybe just a simple package list.
## Building or changing
Only two stores are currently supported. The southernsavers.com website lists other stores that are probably drop-in capable. To learn the widgets.json path needed, use Developer Tools in a web browser to capture the full widgets.json path and add it to the **stores_url** dict.
## References
Developer Tools in Firefox
|