Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

User:SDZeroBot

    From Wikipedia, the free encyclopedia
    Wikipedia editing bot run by SD0001
    Thisuser account is abot that usesNode.js, operated bySD0001 (talk). It is used to make repetitiveautomated orsemi-automated edits that would be extremely tedious to do manually, in accordance with thebot policy. The bot is approved and currently active – the relevantrequest(s) for approval or tasks can be seenhere.
    Administrators: if this bot is malfunctioning or causing harm, pleaseblock it.
    Thisbot runs onWikimedia Toolforge.It runs on thesdzerobot tool account (k8s-status ·k8s grafana).
    Administrators: If this bot needs to be blocked due to a malfunction, please remember to disable autoblocks so that other Toolforge bots are not affected.

    SDZeroBot

    2020 Coolest Tool
    Award Winner

    in the category
    Newcomer

    There is no Cabal

    SDZeroBot runs onNode.js and uses themwn bot framework, also developed bySD0001. Most tasks are written inJavaScript, while the newer ones are inTypeScript. The source code is available onGitHub.

    Emergency block buttonPlease useUser:SDZeroBot/Shutoff for shutting off specific bot tasks. If the bot appears to be malfunctioning across multiple tasks, it should be blocked.

    Tasks

    [edit]

    Reports

    [edit]
    ReportDescriptionFrequencyLast updateLogs
    WP:User scripts/Most imported scriptsList of user scripts by number of users and active usersEvery 2 weeks15 October 2025outerr
    WP:AfC sorting +subpagesClassification of pending AfC submissions by topics predicted byORESEvery 8 hours27 October 2025outerr
    User:SDZeroBot/NPP sorting +subpagesClassification of unreviewed articles by ORES topicsEvery 12 hours27 October 2025outerr
    User:SDZeroBot/PROD sortingClassification of articles proposed for PROD deletion by ORES topicsEvery 4 hours27 October 2025outerr
    User:SDZeroBot/AfD sortingClassification of articles nominated for deletion at AfD by ORES topicsEvery 4 hours27 October 2025outerr
    User:SDZeroBot/Draftify WatchTracks articles being moved to draftspaceWeekly21 October 2025outerr
    User:SDZeroBot/PROD WatchTracks the status of articles proposed for deletion perWP:PRODWeekly22 October 2025outerr
    User:SDZeroBot/Redirectify WatchTracks conversions of articles to redirectsDaily27 October 2025outerr
    User:SDZeroBot/G13 WatchRecords excerpts of drafts that have been deleted per G13Daily27 October 2025outerr
    User:SDZeroBot/Recent AfC declinesLists recently declined AFC drafts with excerpts and other dataDaily27 October 2025outerr
    User:SDZeroBot/G13 soonLists drafts that would be-G13-eligible in a weekDaily27 October 2025outerr
    User:SDZeroBot/G13 soon sortingClassifies soon-to-be-G13-eligible drafts by ORES topicsWeekly27 October 2025outerr
    User:SDZeroBot/G13 eligibleLists G13-eligible drafts with descriptions and excerptsDaily27 October 2025outerr
    User:SDZeroBot/GAN sortingClassifies articles awaiting GA review using ORES topicsDaily27 October 2025outerr
    User:SDZeroBot/Peer reviewsAnnotated listing of articles for which peer review is requestedWeekly21 October 2025outerr
    User:SDZeroBot/Pending AfC submissionsLists pending AfC submissions with excerpts and other dataDaily27 October 2025outerr
    User:SDZeroBot/Unreferenced BLPsAnnotated listing of unreferenced BLPs, for Women in RedDaily27 October 2025outerr
    WP:List of Wikipedians by good article nominationsList of users by most GAsDaily26 October 2025outerr
    User:SDZeroBot/DYK nomination counts.jsonList of users by most DYK nominationsContinuous27 October 2025outerr

    Other continuous tasks

    [edit]
    Internal tracking
    JobLogs
    streamouterr
    routerlogouterr
    gansouterr
    db-tabulatorouterr
    BRFADescriptionFrequencyLogs
    BRFAAfD notifier Notify users of AfD nominations of articles to which they've significantly contributedDailyouterr
    BRFABot activity monitor: Keeps track of activity of fully automatic bots and reports the ones that are not working. Optionally also notifies the respective operators.Continuousouterr
    BRFA{{Database report}}: Updates tables with result of specified SQL queries.Continuousouterr
    BRFAPurges pages linked fromUser:SDZeroBot/Purge listContinuousouterr
    BRFARaise edit requests to keep gadgets in sync with upstream sources perUser:SDZeroBot/Gadgets-sync-config.json.Continuousouterr
    Update the lists atUser:SDZeroBot/Category cycles identifying cycles in the category tree.Every 3 monthsouterr
    Track sizes of categories listed onUser:SDZeroBot/Category counter.Continuousouterr

    One-time / on-demand

    [edit]
    BRFADescriptionFrequency
    BRFAConsolidate stub tags on page where possible (replace X-stub and Y-stub with X-Y-stub or Y-X-stub if either exists)One-time
    BRFARe-sort geographical stub articles with more specific stub tagsOn demand
    BRFAAdding{{Drafts moved from mainspace}} to drafts that were moved from mainspaceOne-time
    BRFAAdding{{Set category}} toset categories.On-demand

    Tasks which edit only in the userspace don't require a BRFA.

    How do you generate article excerpts?

    [edit]

    Good question. Excerpts of articles used on many of SDZeroBot's classification pages are generated using a combination of regex and some slightly more formal parsing methods. The Node.js source code used can be seenhere, which also relies onmwn's wikitext class. This excerpt generator is also available as a webservice hosted on Toolforge athttps://summary-generator.toolforge.org/ with a horrible bare minimum UI, but a better API endpoint. See theGitHub README for usage instructions.

    I initially considered using the code frompopups, but it was all too messy and integrated with a lot of other popups code that I couldn't get it to work standalone.

    All excerpts are short enough, so that attribution and copyright concerns are avoided.

    Source code

    [edit]

    All source code that drives SDZeroBot is publicly available via theGitHub repository, as well as on the /data/project/sdzerobot directory on Toolforge. Even the logs (*.out and *.err files) are publicly visible, which is by default not the case on Toolforge. The jobs.yml file used to schedule the tasks can also be viewed there.

    To do

    [edit]
    See also:User:SD0001/Scripts § To-do

    If you're interested in helping out with these tasks, please contact me.

    • Split certain sortlists into subtopics.
      • For thesports list (1500+ pages), use machine learning to section this list by sport.
      • Split the biography list by professions - this can be done just by looking at the other topics the bios have been classified with.
      • For the STEM lists, make sections for core articles, STEM biographies, STEM media, STEM companies, ... (discussion)
    • Automatically produce short descriptions for articles and drafts.
      • Drafts mostly don't have short descriptions at all. They'd bevery useful onAfC sorting. Also useful for the AfD, NPP, and PROD lists.
      • Explore use of machine learning for this, failing which other methods such as Trialpears'bio shortdesc generator.
      • If that also doesn't give desired level of accuracy (esp. for non-bio articles), don't actually add the shortdescs to the article, but show it on the sortlists.
    • Consider creating a Toolforge-hosted web UI for AfD sorting list, so that more columns can be added (whose visibility can be toggled using javascript), based on ideas inhere.
    • Automatedelsort tagging of AfDs using ORES. Works only for select delsort lists which have a corresponding ORES topic, or
    • Automate delsort taggings using some custom machine learning model. The model can be trained on basis of delsort tagging done so far by humans. Difficulty here is that unbiased training of the model requires access to content of deleted articles as well. Simply training it on articles that were kept at AfD would not give good results.
    • Big one: identify promising AFC drafts using ML.
    • Probably using TemplateStyles, improve the appearance of the tables on very small and very wide screens.
    • Create unified lists for PROD and AFD which includeboth deletion rationale and lead text.Green tickY PROD
    • Don't duplicate nomination text on AFD sorting report for multi-article nominations.
    • User:SDZeroBot/Declined AFCs,G13 soon figure out ways to better identify bad and good drafts?
    • Create articlesearch tool – shows excerpts of articles from CirrusSearch queries – use ReactJS

    Tips and tricks for bot operators

    [edit]

    Monitoring failures

    [edit]

    For each SDZeroBot task, most of the code is in an async functionwith a catch that traps errors and formats it as an email sent to the tool account, which lands in my inbox. For good measure, there's also aprocess-level uncaughtException handler.

    The only kinds of errors the above wouldn't handle are the ones that occur even before the javascript code starts executing (such as the file accidentally losing its executable permission) orOOMs, which are both handled by using--emails onfailure while usingToolforge Jobs framework.

    In addition, for the report pages, this user page lists them above along with their last updated timestamps. Along with the expected frequency of the updates, it is fed into aLua module which prints the timestamp in bold red if it's delayed.

    There's alsoWP:BAM which although maintained by SDZeroBot, is not used for monitoring itself.

    A good combination of failure monitoring techniques is essential for operating bots that reliably perform a number of tasks without requiring you to spend time and energy on making sure everything is running.

    Handling blacklisted links

    [edit]

    If SDZeroBot is unable to save an edit because it is introducing a spam-blacklisted link (which of course isn't the bot's fault since it likely just picked up the text to be added from another place), it identifies the problematic link from the API response, and removes the protocol ("http:" or "https:") from the link, and then attempts to save the page again. This does mean that a link that was supposed to look likeLink label ends up looking like [google.com Link label], but it is closest to the original while allowing the edit to go through. Besides, the link was blacklisted anyway so probably shouldn't be clickable.

    Use OAuth

    [edit]

    Always use OAuth instead of BotPasswords. There are all these advantages:

    • Faster: BotPasswords requires at least 3 API calls just to get the bot off the block: one to fetch a login token, another to actually log in, and usually another one to fetch editing tokens. Since OAuth doesn't require any API call to begin the authentication, you just need one API call – to fetch the tokens.
    • Lesser errors: Session loss often occurs using cookie-based authentication methods. Good bot frameworks should handle these automatically by logging in again on getting the assertbotfailed or assertuserfailed API response, but if yours doesn't, you can avoid these problems just by using OAuth. OAuth tokens don't expire.
    • No need to cache cookies: If your bot task is too frequent (say every 10 minutes), you're likely to have a high login rate unless you cache the login cookies and use them across bot runs. High login rates arefrowned upon by server admins. Again, with OAuth, you don't have to worry about this.
    • More secure: OAuth is more secure.
    Retrieved from "https://en.wikipedia.org/w/index.php?title=User:SDZeroBot&oldid=1300340174"
    Categories:

    [8]ページ先頭

    ©2009-2025 Movatter.jp