Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ciele

Monitors static websites and emails you when they change.

Written in Gleam, running on the Erlang/OTP runtime.

Configuration

Note

Setup is a bit involved: you need a Resend API key and a domain you own to send from. This is convenient for me, but if you'd prefer a simpler delivery method, a PR adding one is welcome.

To use the app, you need to set the RESEND_API_KEY environment variable. You can obtain the API key from resend.com. In addition, you need to create a configuration file at config/config.toml (see config/config.example.toml):

email_address = "yourmail@gmail.com"
sender_email_address = "ciele@yourdomain.com"
domains = [
  "www.gleam.run",
  "www.erlang.org",
]

Each domains entry is either a bare URL, or an inline table with a url and an optional ignore list of CSS selectors whose matching elements are stripped before comparison. This is useful for ignoring volatile regions of a page — ad slots, timestamps, view counters — that would otherwise trigger a diff email on every check:

domains = [
  "www.gleam.run",
  { url = "www.erlang.org", ignore = ["div.community", "span.timestamp"] },
]

Dry-run mode

Set dry_run = true in the config file to try the app without sending real emails. In this mode RESEND_API_KEY is not required, and instead of sending emails the app logs to the console the messages it would have sent.

dry_run = true

Running the app

To run the app, use

gleam run

The server checks every configured domain on startup and then every six hours. Only the <body> is compared, with <script> tags and any configured ignore selectors dropped. When it changes, a unified diff is emailed to you. To run it in the background you can use any process supervisor you like (for example systemd, tmux, or nohup gleam run &).

Development

gleam test    # run the test suite
gleam format  # format the code
gleam build   # type-check and compile

The name of this app comes from a Polish idiom: patrzeć jak cielę na malowane wrota.

About

Lightweight monitoring for static websites.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages