mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Added testing code, bumped version
This commit is contained in:
parent
0a03f27526
commit
06ccfea1cd
|
@ -7,6 +7,6 @@ test:
|
|||
- pip3.6 install -r requirements.txt
|
||||
- sed -i -e 's/https:\/\/discordapp.com\/api\/webhooks\/111111111111111111\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/$DISCORD/g' settings.json.example
|
||||
- mv settings.json.example settings.json
|
||||
- python3.6 rcgcdw.py
|
||||
- python3.6 rcgcdw.py --test
|
||||
only:
|
||||
- testing
|
11
rcgcdw.py
11
rcgcdw.py
|
@ -30,6 +30,8 @@ if __name__ != "__main__":
|
|||
logging.critical("The file is being executed as a module. Please execute the script using the console.")
|
||||
sys.exit(1)
|
||||
|
||||
TESTING = True if "--test" in sys.argv else False
|
||||
|
||||
try:
|
||||
with open("settings.json") as sfile:
|
||||
settings = json.load(sfile)
|
||||
|
@ -1153,6 +1155,15 @@ if settings["overview"]:
|
|||
logging.error("Invalid time format! Currentely: {}. Note: It needs to be in HH:MM format.".format(settings["overview_time"]))
|
||||
schedule.every().day.at("00:00").do(recent_changes.clear_cache)
|
||||
|
||||
if TESTING:
|
||||
logging.debug("DEBUGGING")
|
||||
recent_changes.recent_id -= 5
|
||||
recent_changes.file_id -= 5
|
||||
recent_changes.ids = [1]
|
||||
recent_changes.fetch(amount=5)
|
||||
day_overview()
|
||||
sys.exit(0)
|
||||
|
||||
while 1:
|
||||
time.sleep(1.0)
|
||||
schedule.run_pending()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"wiki": "minecraft",
|
||||
"lang": "en",
|
||||
"header": {
|
||||
"user-agent": "FrisksRcGcDw/1.5.1.2"
|
||||
"user-agent": "FrisksRcGcDw/1.5.2"
|
||||
},
|
||||
"limit": 11,
|
||||
"webhookURL": "https://discordapp.com/api/webhooks/111111111111111111/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name='RcGcDw',
|
||||
version='1.5.1.2',
|
||||
version='1.5.2',
|
||||
packages=['venv.lib.python3.7.site-packages.bs4', 'venv.lib.python3.7.site-packages.bs4.tests',
|
||||
'venv.lib.python3.7.site-packages.bs4.builder', 'venv.lib.python3.7.site-packages.idna',
|
||||
'venv.lib.python3.7.site-packages.lxml', 'venv.lib.python3.7.site-packages.lxml.html',
|
||||
|
|
Loading…
Reference in a new issue