mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Merge branch 'testing' into 'master'
Testing See merge request piotrex43/RcGcDw!14
This commit is contained in:
commit
e628c32c98
45
README.md
45
README.md
|
@ -1,5 +1,6 @@
|
||||||
## Overview ##
|
## Overview ##
|
||||||
Recent changes Gamepedia compatible Discord webhook is a project made from earlier recent changes module of FriskBot. It has been remade as independent script for public usage.
|
Recent changes Gamepedia compatible Discord webhook is a project made from earlier recent changes module of FriskBot. It has been remade as independent script for public usage.
|
||||||
|
Presentation on how it looks on the Discord can be found [on the wiki](https://gitlab.com/piotrex43/RcGcDw/wikis/Presentation).
|
||||||
|
|
||||||
### Dependencies ###
|
### Dependencies ###
|
||||||
* **Python 3.6>**
|
* **Python 3.6>**
|
||||||
|
@ -15,40 +16,10 @@ Recent changes Gamepedia compatible Discord webhook is a project made from earli
|
||||||
* Re-sends edits after down-time
|
* Re-sends edits after down-time
|
||||||
|
|
||||||
### settings.json ###
|
### settings.json ###
|
||||||
Explanation for settings:
|
[Explanation for settings](https://gitlab.com/piotrex43/RcGcDw/wikis/settings.json)
|
||||||
`cooldown` – interval for how often changes are retrieved from the wiki (due to used solutions, the real interval is ~1 sec longer).
|
|
||||||
`wiki` – wiki prefix the bot is supposed to work with (for example, for English Minecraft Wiki it's minecraft (https://**minecraft**.gamepedia.com) and for Polish Minecraft Wiki minecraft-pl (https://**minecraft-pl**.gamepedia.com)
|
|
||||||
`lang` – language for the messages, currently available options are: de, en, fr, pl.
|
|
||||||
`header` – it's recommended to leave this value as it is, it's a header the script will use to communicate with Gamepedia. Please note that without it, no communication will be possible.
|
|
||||||
`limit` – amount of actions retrieved every `cooldown` amount of seconds. The higher it is the more network data will be used and the data will be processed longer, setting it to higher values is not recommended unless cooldown value is higher it also cannot be higher than 500.
|
|
||||||
`webhookURL` – webhook URL you can get using [channel settings in Discord](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
|
|
||||||
`limitrefetch` – limit of how many changes can be retrieved when refetch happens, cannot be lower than limit. -1 if you want to disable auto-refetch. Value cannot be higher than 500.
|
|
||||||
`wikiname` – a name of the wiki the bot will work on, required in some messages.
|
|
||||||
`avatars` – this section makes specific types of messages overwrite the default webhook avatar.
|
|
||||||
* `connection_failed` – message printed when script fails connection with the wiki several times.
|
|
||||||
* `no_event` – error message when the event couldn't be recognized by the script.
|
|
||||||
* `embed` – every embed message showing changes.
|
|
||||||
|
|
||||||
`verbose_level` – a number (min 0, max 50) identifying the type of messages that will be written into the console. (CRITICAL 50, ERROR 40, WARNING 30, INFO 20, DEBUG 10).
|
|
||||||
`show_updown_messages` – bool value, depending on this settings the messages whenever the wiki goes up and down will be sent to the channel.
|
|
||||||
`appearience` – section with different types of actions and logs, and corresponding to them colors/icons. In here you can set custom icon or color!
|
|
||||||
`overview` – bool value, sends a day overview to the channel if true.
|
|
||||||
`overview_time` – **local machine time** at which the day overview will be sent.
|
|
||||||
`license_regex` – if you have an unusual or translated template for applying licenses to images, you can modify this value with proper regex expression. The capturing group for license name should be named "license". **remember about double escaping the backslashes**
|
|
||||||
`license_regex_detect` – a regex detecting a license, it differs from `license_regex` by the fact that it has to match only the beginning of license template. **remember about double escaping the backslashes**
|
|
||||||
|
|
||||||
### How to use ###
|
### How to use ###
|
||||||
Make sure you have installed all of dependencies and **filled settings.json properly**. You can also use `pip install -r requirements.txt` to install dependencies automatically. If you are using Raspberry Pi you won't have newest Python version installed, you can use [this guide](https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f).
|
[Refer to the guide on the wiki](https://gitlab.com/piotrex43/RcGcDw/wikis/Guide)
|
||||||
When you are sure everything is fine, go to root directory with all of script files and use `python rcgcdw.py` or `python3 rcgcdw.py`command to run the script.
|
|
||||||
Here is how you can setup the script in just few commands on a Linux distribution.
|
|
||||||
```bash
|
|
||||||
$ git clone https://gitlab.com/piotrex43/RcGcDw.git
|
|
||||||
$ cd RcGcDw
|
|
||||||
$ pip3 install -r requirements.txt
|
|
||||||
$ nano config.json.example
|
|
||||||
$ mv config.json.example config.json
|
|
||||||
$ python3 rcgcdw.py
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Free (?) hosting ####
|
#### Free (?) hosting ####
|
||||||
If you want I can host the script for you for free. Just [contact me](https://minecraft.gamepedia.com/User:Frisk#Contact). If you want to go with this option, be aware that this is far from the best option, I host all of the scripts on my Raspberry PI, it can go down at any moment, I try to keep every script running, but obviously sometimes it's just not possible. So, choosing this option, don't expect 100% uptime. The only requirement if you want to go with this option, is that the wiki is somewhat active.
|
If you want I can host the script for you for free. Just [contact me](https://minecraft.gamepedia.com/User:Frisk#Contact). If you want to go with this option, be aware that this is far from the best option, I host all of the scripts on my Raspberry PI, it can go down at any moment, I try to keep every script running, but obviously sometimes it's just not possible. So, choosing this option, don't expect 100% uptime. The only requirement if you want to go with this option, is that the wiki is somewhat active.
|
||||||
|
@ -61,11 +32,12 @@ Translators:
|
||||||
* MarkusRost for German translation
|
* MarkusRost for German translation
|
||||||
* JSBM for French translation
|
* JSBM for French translation
|
||||||
|
|
||||||
### Other ###
|
### Support ###
|
||||||
|
The script does have [its own channel](https://discord.gg/pFDZrnE) on MarkusRost's Discord server. All updates will be announced there. If you need help feel free to hop there.
|
||||||
|
"A message "Unable to process the event" appeared on my channel, what does it mean" - it means there is some kind of action that does not have a template in the script, please [create a ticket](https://gitlab.com/piotrex43/RcGcDw/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with information on what wiki this error ocurred and when.
|
||||||
|
|
||||||
|
### Performance ###
|
||||||
Script seem to use about 10-17MB of RAM and negligible amount of CPU when fetching changes.
|
Script seem to use about 10-17MB of RAM and negligible amount of CPU when fetching changes.
|
||||||
Script does not log bot actions by default.
|
|
||||||
"I GoT "Unable to process the event" mESSage!!! WHaT HApND?" - it means there is some kind of action that does not have a template in the script, please [create a ticket](https://gitlab.com/piotrex43/RcGcDw/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=) with information on what wiki this error ocurred and when.
|
|
||||||
[Here](https://imgur.com/a/ACOMyak) are screenshots of how few embeds look like.
|
|
||||||
|
|
||||||
### License ###
|
### License ###
|
||||||
Everything except the locale directory is under GNU Affero General Public License v3.0 license. The translations are used with allowance of translators, and all rights to them are owned by their respective authors.
|
Everything except the locale directory is under GNU Affero General Public License v3.0 license. The translations are used with allowance of translators, and all rights to them are owned by their respective authors.
|
||||||
|
@ -77,4 +49,5 @@ There are several Discord server, the script is already running on, you can join
|
||||||
[Minecraft Wiki (DE)](https://discord.gg/F75vfpd) (on a hidden channel)
|
[Minecraft Wiki (DE)](https://discord.gg/F75vfpd) (on a hidden channel)
|
||||||
[Minecraft Wiki Polska](https://discord.gg/9ZCcTnT)
|
[Minecraft Wiki Polska](https://discord.gg/9ZCcTnT)
|
||||||
[Minecraft Wiki FR](https://discord.gg/PSK48k7) (temporarily)
|
[Minecraft Wiki FR](https://discord.gg/PSK48k7) (temporarily)
|
||||||
|
Survived By Wiki
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue