You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Takes a screenshot with the stored settings and sends it into this chat
34
34
`/fetchurl <URL> [x y width height]`
35
35
Takes a screenshot of the given website and settings and sends it into this chat
36
36
`/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
38
38
`/listall`
39
39
Lists all entries from all chats
40
40
`/check`
@@ -53,13 +53,19 @@ For the bot to work, you first need the following things:
53
53
54
54
55
55
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 ..`
60
59
5. Switch to the parent directory: `cd ..`
61
60
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
+
```
63
69
64
70
If you completed all the steps above, your install directory should look like this:
65
71
```bash
@@ -77,16 +83,16 @@ $ tree -L 2
77
83
│ ├── screenshot.sh
78
84
│ └── telegram.sh
79
85
└── urlwatcher
80
-
└── urlwatcher.sh
81
-
82
-
5 directories, 8 files
86
+
├── Package.swift
87
+
├── Sources
88
+
└── urlwatcher.sh.old
83
89
```
84
90
85
91
### Adding the urlwatch script to crontab
86
92
For the urlwatch script to be periodically executed, you have to create a cronjob for it.
87
93
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).
90
96
3. Save the file
91
97
92
98
## Setup
@@ -108,7 +114,7 @@ For the scripts and the bot to work, you have to put your bot token in a file ca
108
114
109
115
### (Optional) Create a systemd service for the bot
110
116
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):
0 commit comments