Skip to content

Alperosci/sitewatcheR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

sitewatcheR

sitewatcheR is a Rust remake of an old Go project. This program monitors the HTML content of a specified website and notifies you whenever changes are detected. It can also log these changes to a file.


โšก Features

  • Continuously monitors a given URL.
  • Prints a message to the console when HTML content changes.
  • Optionally logs changes to log.txt.
  • Optionally prints "No change found" messages even when the content hasn't changed.

๐Ÿ›  Requirements

  • Rust (stable)
  • reqwest crate
  • chrono crate

Cargo.toml example:

[dependencies]
reqwest = { version = "0.12", features = ["blocking"] }
chrono = "0.4"

๐Ÿš€ Installation & Running

  1. Clone the repository or download the files:
git clone https://github.com/<your_username>/sitewatcheR.git
cd sitewatcheR
  1. Build the project:
cargo build --release
  1. Run the program:
cargo run
  1. The program will prompt you for the following information:
Enter URL to watch : [Website URL to monitor]
Enter time to wait between requests (seconds) : [Interval in seconds]
Do you want to get notified when cannot find? (y for yes, anything for no) :
Do you want log? (y for yes, anything for no) :

๐Ÿ’พ Log File

  • The log.txt file is used to store change logs.
  • If logging is enabled, any detected changes are written to the file automatically.
  • If the file does not exist, it will be created; if it exists, new entries are appended.

โš™๏ธ Example Usage

Enter URL to watch : https://example.com
Enter time to wait between requests (seconds) : 5
Do you want to get notified when cannot find? (y for yes, anything for no) : y
Do you want log? (y for yes, anything for no) : y

The program will check the site every 5 seconds and log changes both to the console and the log file.


๐Ÿ“Œ Notes

  • reqwest works with HTTP/HTTPS URLs. file:// URLs are not supported.
  • Ensure log.txt is added to .gitignore if you don't want it in the repository.

About

Remake of SiteChecker with Rust

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published