Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewoden/circle
automatic coupon clipper for a big box general store.
https://github.com/matthewoden/circle
Last synced: about 1 month ago
JSON representation
automatic coupon clipper for a big box general store.
- Host: GitHub
- URL: https://github.com/matthewoden/circle
- Owner: matthewoden
- Created: 2020-02-13T21:10:41.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T01:22:39.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T22:22:55.023Z (9 months ago)
- Language: JavaScript
- Size: 122 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Circle
A puppeteer script that handles tedium around online coupons at target.
## Background
Target offers 1% cash back and lets you save 60 offers. This little script logs in, "clips" every single coupon available in a given category, then exits. (The scope is limited to a single category because of the offer limit)
## Category Ids
Known category ids can be found below.
- [Baby, 22](https://circle.target.com/c/coupons/-/22)
- [Beauty, 232](https://circle.target.com/c/coupons/-/32)
- [Food, 26](https://circle.target.com/c/coupons/-/26)
- [Health, 205](https://circle.target.com/c/coupons/-/205)
- [Home, 30](https://circle.target.com/c/coupons/-/30)
- [Household Supplies, 27](https://circle.target.com/c/coupons/-/27)
- [Party/Holiday, 35](https://circle.target.com/c/coupons/-/35)
- [Pets 37](https://circle.target.com/c/coupons/-/37)
- [Tech & Entertainment, 24](https://circle.target.com/c/coupons/-/24)
- [Toys/Sports, 41](https://circle.target.com/c/coupons/-/41)## Requirements
- Node 10.15.1 or later.
- A [Circle](https://circle.target.com/) account## Install
From the project directory, install and symlink the binary:
```
npm ci && npm link
```For updates:
```
git pull && npm ci
```## Usage
```
Options:
-V, --version output the version number
-u, --username Your account username
-p, --password Your account password
-c, --categoryId Category id for circle coupons. See README.md for known categories
-t, --timeout amount of time to wait for completion account password. Defaults to 3600 (5 minutes)
-k, --iftttKey IFTTT.com webhook key. Used with the 'iftttEvent' option to dispatch notifications and errors.
Defaults to 'circle'.
-e, --iftttEvent IFTTT.com webhook event name. Used to dispatch notifications and errors.
https://maker.ifttt.com/trigger/YOUR-EVENT/with/key/YOUR-KEY
-h, --help output usage information
```## Example
```
# in cron, in docker, or wherever
circle \
--username $CIRCLE_USERNAME \
--password $CIRCLE_PASSWORD \
--timeout 3600 \
--iftttKey $IFTTT_WEBHOOK_KEY
```## Troubleshooting
On failure, there's an option to dispatch alerts to IFTTT, which you can send anywhere.
Otherwise, the last 14 days of logs are kept in `./logs`## Tip
If you're running locally on osx - use pmset to ensure cron jobs wake your machine:
```bash
# cron job runs at 8:00am, so let's wake a little early
pmset repeat wakeorpoweron MTWRFSU 7:58:00
```