Skip to content

Commit b6e3f92

Browse files
Updated README, disabled unused script
1 parent d608cfc commit b6e3f92

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Takes a screenshot with the stored settings and sends it into this chat
3434
`/fetchurl <URL> [x y width height]`
3535
Takes a screenshot of the given website and settings and sends it into this chat
3636
`/diff <name>`
37-
Shows a picture highlighting the differences between the current and old state of the website including extended information about the normalized cross correlation
37+
Shows a picture highlighting the differences of the last website change, including extended information about the normalized cross correlation
3838
`/listall`
3939
Lists all entries from all chats
4040
`/check`
@@ -53,13 +53,19 @@ For the bot to work, you first need the following things:
5353

5454

5555
1. Clone the repository: `git clone https://github.com/iComputerfreak/NotifierBot`
56-
2. Change into the source code directory: `cd NotifierBot/NotifierBot`
57-
3. Build the code: `swift build`
58-
4. On a successful build, you should be displayed the path of the executable (e.g. `[4/4] Linking ./.build/x86_64-unknown-linux/debug/Notifier`)
59-
4. Copy the executable into the main directory: `cp .build/x86_64-unknown-linux/debug/Notifier ..`
56+
2. Change into the telegram bot source code directory: `cd NotifierBot/NotifierBot`
57+
3. Build the code: `swift build -c release`
58+
4. Copy the executable into the main directory: `cp .build/release/Notifier ..`
6059
5. Switch to the parent directory: `cd ..`
6160
6. Download the [telegram.sh script](https://github.com/fabianonline/telegram.sh): `wget -O tools/telegram.sh https://raw.githubusercontent.com/fabianonline/telegram.sh/master/telegram`
62-
7. Make the shell scripts executable: `chmod +x urlwatcher/urlwatcher.sh tools/telegram.sh`
61+
7. Make the telegram script executable: `chmod +x tools/telegram.sh`
62+
8. Repeat steps 2 - 5 for the urlwatcher script:
63+
```swift
64+
cd urlwatcher
65+
swift build -c release
66+
cp .build/release/urlwatcher ..
67+
cd ..
68+
```
6369

6470
If you completed all the steps above, your install directory should look like this:
6571
```bash
@@ -77,16 +83,16 @@ $ tree -L 2
7783
│   ├── screenshot.sh
7884
│   └── telegram.sh
7985
└── urlwatcher
80-
── urlwatcher.sh
81-
82-
5 directories, 8 files
86+
── Package.swift
87+
├── Sources
88+
└── urlwatcher.sh.old
8389
```
8490

8591
### Adding the urlwatch script to crontab
8692
For the urlwatch script to be periodically executed, you have to create a cronjob for it.
8793
1. Edit the crontab file: `crontab -e`
88-
2. Add the following line at the end: `*/10 * * * * /path/to/your/install/directory/urlwatcher/urlwatcher.sh`
89-
This executes the script every 10 minutes. To execute it e.g. every hour, use `0 * * * *` (every time the minute is zero).
94+
2. Add the following line at the end: `*/30 * * * * /path/to/your/install/directory/urlwatcher`
95+
This executes the script every 30 minutes. To execute it e.g. every hour, use `0 * * * *` (every time the minute is zero).
9096
3. Save the file
9197

9298
## Setup
@@ -108,7 +114,7 @@ For the scripts and the bot to work, you have to put your bot token in a file ca
108114

109115
### (Optional) Create a systemd service for the bot
110116
1. Create the unit file: `sudo nano /etc/systemd/system/notifier.service`
111-
2. Paste the following content (replace `YOUR_USER_ACCOUNT` with your user account name):
117+
2. Paste the following content (replace `YOUR_USER_ACCOUNT` with your linux user account name):
112118
```
113119
[Unit]
114120
Description=Telegram Notifier Bot

0 commit comments

Comments
 (0)