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
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,10 @@ Adds a new website with an optional screenshot area to the list
19
19
Removes an entry from the list
20
20
`/update <name> <x> <y> <width> <height>`
21
21
Updates the screenshot area of an entry
22
+
`/setdelay <name> <delay>`
23
+
Specifies a delay in seconds to wait after the website has been loaded
24
+
`/setelement <name> [html element]`
25
+
Specifies which HTML element to capture
22
26
`/fetch <name>`
23
27
Takes a screenshot with the stored settings and sends it into this chat
24
28
`/fetchurl <URL> [x y width height]`
@@ -36,10 +40,8 @@ Sets the permission level of the author of the message, replied to or the user i
36
40
37
41
### Prerequisites
38
42
For the bot to work, you first need the following things:
39
-
- ImageMagick (for cropping the screenshot using the `convert` tool and comparing the screenshots using `identify`)
40
-
- Selenium for taking the screenshots (install using pip)
41
-
-[Geckodriver](https://github.com/mozilla/geckodriver/releases) (installed in one of these directories: `/usr/local/sbin`, `/usr/local/bin`, `/sbin`, `/bin`, `/usr/sbin` or `/usr/bin`)
42
-
- Firefox (install using apt-get)
43
+
- ImageMagick (for cropping the screenshot using the `convert` tool and comparing the screenshots using `compare`)
44
+
-[`capture-website-cli`](https://github.com/sindresorhus/capture-website-cli) to take the screenshots
43
45
44
46
45
47
1. Clone the repository: `git clone https://github.com/iComputerfreak/NotifierBot`
@@ -64,7 +66,7 @@ $ tree -L 2
64
66
│ └── Tests
65
67
├── README.md
66
68
├── tools
67
-
│ ├── screenshot.py
69
+
│ ├── screenshot.sh
68
70
│ └── telegram.sh
69
71
└── urlwatcher
70
72
└── urlwatcher.sh
@@ -86,6 +88,16 @@ For the scripts and the bot to work, you have to put your bot token in a file ca
86
88
1.`cd` to your installation directory
87
89
2. Create the file: `echo YOUR_BOT_TOKEN > BOT_TOKEN`
88
90
91
+
### Give yourself admin permissions
92
+
1. Start the bot
93
+
2. Run the command `/myid` to retrieve your ID
94
+
3. Stop the bot
95
+
4. Add your ID to the permissions file: `echo "YOUR_ID: admin" > /path/to/your/install/directory/permissions.txt`
96
+
5. Start the bot again and make sure, it worked by checking your permissions with the bot: `/getpermissions YOUR_ID`
97
+
6. If the bot returned your permission level as **admin**, everything worked and you now have admin permissions
98
+
99
+
**Note**: Modifying the permissions file requires a restart of the bot, but using `/setpermissions <level> <userid>` does not.
100
+
89
101
### (Optional) Create a systemd service for the bot
90
102
1. Create the unit file: `sudo nano /etc/systemd/system/notifier.service`
91
103
2. Paste the following content (replace `YOUR_USER_ACCOUNT` with your user account name):
@@ -107,14 +119,3 @@ WantedBy=multi-user.target
107
119
```
108
120
3. Start the service: `sudo service Notifier start`
109
121
4. Optional: Enable automatic start on boot: `sudo service Notifier enable`
110
-
111
-
112
-
### Give yourself admin permissions
113
-
1. Start the bot
114
-
2. Run the command `/myid` to retrieve your ID
115
-
3. Stop the bot
116
-
4. Add your ID to the permissions file: `echo "YOUR_ID: admin" > /path/to/your/install/directory/permissions.txt`
117
-
5. Start the bot again and make sure, it worked by checking your permissions with the bot: `/getpermissions YOUR_ID`
118
-
6. If the bot returned your permission level as **admin**, everything worked and you now have admin permissions
119
-
120
-
**Note**: Modifying the permissions file requires a restart of the bot, but using `/setpermissions <level> <userid>` does not.
0 commit comments