mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Merge branch '89-add-option-to-display-bot-edits' into 'testing'
Resolve "Add option to display bot edits" See merge request piotrex43/RcGcDw!55
This commit is contained in:
commit
33729dcebc
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
4
misc.pot
4
misc.pot
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2019-05-20 17:18+0200\n"
|
"POT-Creation-Date: 2019-08-10 16:48+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -17,7 +17,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=CHARSET\n"
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: misc.py:76
|
#: misc.py:82
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
"__And more__"
|
"__And more__"
|
||||||
|
|
454
rcgcdw.pot
454
rcgcdw.pot
File diff suppressed because it is too large
Load diff
10
rcgcdw.py
10
rcgcdw.py
|
@ -452,9 +452,9 @@ def embed_formatter(action, change, parsed_comment, categories):
|
||||||
link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(
|
link = "https://{wiki}.gamepedia.com/index.php?title={article}&curid={pageid}&diff={diff}&oldid={oldrev}".format(
|
||||||
wiki=settings["wiki"], pageid=change["pageid"], diff=change["revid"], oldrev=change["old_revid"],
|
wiki=settings["wiki"], pageid=change["pageid"], diff=change["revid"], oldrev=change["old_revid"],
|
||||||
article=change["title"].replace(" ", "_"))
|
article=change["title"].replace(" ", "_"))
|
||||||
embed["title"] = "{redirect}{article} ({new}{minor}{editsize})".format(redirect="⤷ " if "redirect" in change else "", article=change["title"], editsize="+" + str(
|
embed["title"] = "{redirect}{article} ({new}{minor}{bot} {editsize})".format(redirect="⤷ " if "redirect" in change else "", article=change["title"], editsize="+" + str(
|
||||||
editsize) if editsize > 0 else editsize, new=_("(N!) ") if action == "new" else "",
|
editsize) if editsize > 0 else editsize, new=_("(N!) ") if action == "new" else "",
|
||||||
minor=_("m ") if action == "edit" and "minor" in change else "")
|
minor=_("m") if action == "edit" and "minor" in change else "", bot=_('b') if "bot" in change else "")
|
||||||
if settings["appearance"]["embed"]["show_edit_changes"]:
|
if settings["appearance"]["embed"]["show_edit_changes"]:
|
||||||
if action == "new":
|
if action == "new":
|
||||||
changed_content = safe_read(recent_changes.safe_request(
|
changed_content = safe_read(recent_changes.safe_request(
|
||||||
|
@ -1110,8 +1110,8 @@ class Recent_Changes_Class(object):
|
||||||
logger.debug("ids is empty, triggering clean fetch")
|
logger.debug("ids is empty, triggering clean fetch")
|
||||||
clean = True
|
clean = True
|
||||||
changes = self.safe_request(
|
changes = self.safe_request(
|
||||||
"https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges&rcshow=!bot&rcprop=title%7Credirect%7Ctimestamp%7Cids%7Cloginfo%7Cparsedcomment%7Csizes%7Cflags%7Ctags%7Cuser&rclimit={amount}&rctype=edit%7Cnew%7Clog%7Cexternal{categorize}".format(
|
"https://{wiki}.gamepedia.com/api.php?action=query&format=json&list=recentchanges{show_bots}&rcprop=title%7Credirect%7Ctimestamp%7Cids%7Cloginfo%7Cparsedcomment%7Csizes%7Cflags%7Ctags%7Cuser&rclimit={amount}&rctype=edit%7Cnew%7Clog%7Cexternal{categorize}".format(
|
||||||
wiki=settings["wiki"], amount=amount, categorize="%7Ccategorize" if settings["show_added_categories"] else ""))
|
wiki=settings["wiki"], amount=amount, categorize="%7Ccategorize" if settings["show_added_categories"] else "", show_bots="&rcshow=!bot" if settings["show_bots"] is False else ""))
|
||||||
if changes:
|
if changes:
|
||||||
try:
|
try:
|
||||||
changes = changes.json()['query']['recentchanges']
|
changes = changes.json()['query']['recentchanges']
|
||||||
|
@ -1317,7 +1317,7 @@ if settings["overview"]:
|
||||||
schedule.every().day.at("00:00").do(recent_changes.clear_cache)
|
schedule.every().day.at("00:00").do(recent_changes.clear_cache)
|
||||||
|
|
||||||
if TESTING:
|
if TESTING:
|
||||||
logger.debug("DEBUGGING")
|
logger.debug("DEBUGGING ")
|
||||||
recent_changes.recent_id -= 5
|
recent_changes.recent_id -= 5
|
||||||
recent_changes.file_id -= 5
|
recent_changes.file_id -= 5
|
||||||
recent_changes.ids = [1]
|
recent_changes.ids = [1]
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
"wiki_bot_login": "",
|
"wiki_bot_login": "",
|
||||||
"wiki_bot_password": "",
|
"wiki_bot_password": "",
|
||||||
"show_added_categories": true,
|
"show_added_categories": true,
|
||||||
|
"show_bots": false,
|
||||||
"logging": {
|
"logging": {
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"disable_existing_loggers": false,
|
"disable_existing_loggers": false,
|
||||||
|
|
Loading…
Reference in a new issue