Skip to content

tenkoh/go-sitecheck

Repository files navigation

go-sitecheck

CLI to check updates of web sites you want to check.

Features

  • No dependencies. Written in pure Go.
  • Single binary. Easy to install. Just download and run.

How does it work?

  • Send HEAD request to the web site you want to check.
  • Get the header value Last-Modified from the response.
  • Compare the value with the value in the locally saved file.

Installation

Download binary

Download binary from release page.

Use go install

If you use Go usually, using go install is the easiest way to install.

go install github.com/tenkoh/go-sitecheck@latest

Basic usage

  1. Add web sites you want to check.
./sitecheck site add https://example.com (site's url to register)
  1. Check site list (optional).
./sitecheck site list
  1. Run check. If there are updates, they are shown in the terminal.
./sitecheck check

After running check, repository.json file is created in the current directory. This file contains the information of the update history of the web sites you registered.

Advanced usage

Use proxy

  1. Set proxy server.
./sitecheck config set proxy http:https://proxy.example.com:8080
  1. Show proxy list (optional).
./sitecheck config list
  1. Run check with proxy flag.
./sitecheck check -p

Sve the result to a file.

  1. Run check with output flag.
./sitecheck check -o result.txt

Show help

./sitecheck -h

Reference: data structure

data-structure

Contribution

Any contribution is welcome. Please feel free to open an issue or pull request. Especially, realizing any milestone in the roadmap makes me very happy.

Roadmap

  • Improve user interface
    • Use fuzzy finder to add / detele web sites from registered list.
    • Use progress bar to show progress of checking.

License

MIT

Author

tenkoh