No description
Find a file
2022-12-12 20:20:20 +00:00
docs/images first bit of docs 2022-12-11 21:03:06 +00:00
notifiers removed debug prints 2022-12-10 11:23:03 +00:00
static notify filter can pick what notifier to use 2022-12-10 11:22:56 +00:00
templates notify filter can pick what notifier to use 2022-12-10 11:22:56 +00:00
.air.toml prototype 0.001 2022-07-16 11:05:32 +00:00
.drone.yaml added drone pipeline to push to github 2022-12-10 14:57:30 +00:00
.gitignore v0.0001 2022-07-21 19:28:25 +00:00
forms.go added updating/deleting of filters 2022-08-02 19:08:57 +00:00
go.mod updated sqlite gorm driver 2022-12-11 08:59:15 +00:00
go.sum updated sqlite gorm driver 2022-12-11 08:59:15 +00:00
LICENSE prototype 0.001 2022-07-16 11:05:32 +00:00
main.go better log message for schedule filter 2022-12-11 21:02:21 +00:00
models.go added export/import of filters+connections 2022-10-10 19:20:04 +00:00
README.md added all filter headers/sections in readme 2022-12-12 20:20:20 +00:00
scraping.go notify filter can pick what notifier to use 2022-12-10 11:22:56 +00:00
scraping_test.go added 'log' output table to lua filter 2022-12-10 09:22:43 +00:00
todo.md todo+ 2022-12-11 21:02:34 +00:00
util.go added util.buildFilterTree 2022-09-25 15:53:04 +00:00

Go Watch

Build Status

A change detection server that can notify through various services written in Go

Intro

GoWatch works through filters, a filter performs operations on the input it recieves.
Here is an example of a 'Watch' that calculates the lowest and average price of 4090s on NewEgg and notifies the user if the lowest price changed:
NewEgg 4090

Note that everything, including scheduling/storing/notifying, is a filter.

Schedule is a cron filter with a '@every 15m' value, so this will run every 15 minutes.

NewEgg Fetch is a Get URL filter with a 'https://www.newegg.com/p/pl?N=100007709&d=4090&isdeptsrh=1&PageSize=96' value, it's output will be the HTTP response.

Select Price is a CSS filter with the value '.item-container .item-action strong[class!="item-buying-choices-price"]' value, it's output will be the html elements containing the prices.
An XPath filter could also have been used.

Sanitize is a Replace filter, using a regular expression ('[^0-9]') it removes anything that's not a number.

Avg is an Average filter, it calculates the average value of its inputs.

Min is a Minimum filter, it calculates the minimum value of its inputs.

Store Avg and Store Min are Store filters, they store its input values in the database.

Diff is a Different Than Last filter, only passing on the inputs that are different then the last value stored in the database.

Notify is a Notify filter, if there are any inputs to this filter, it will execute a template and send the result to a user defined 'notifier' (Telegram/Discord/Matrix/etc).

Filters

Cron

Get URL

Get URLs

CSS

XPath

JSON

Replace

Match

Substring

Contains

Store

Notify

Math

Sum

Minimum

Maximum

Average

Count

Round

Condition

Different Than Last

Lower Than Last

Lowest

Lower Than

Higher Than Last

Highest

Higher Than

Lua

type script compilation

tsc static/*.ts --lib es2020,dom --watch --downlevelIteration

Dependencies

The following libaries are used in Go-Watch: