memory alpha
Beep, Beep!
Live Fast and Prosper

This is a bot account used by Mr. Starfleet Command. Please use the bot requests page to request bot edits. If you have questions about this bot or notice it making strange edits, please contact its operator.

This bot started out on another wiki using the MassEdit script from the Dev Wiki. By the time it was granted a bot flag on Memory Alpha, Botfleet had mostly transitioned to using bot.js, a custom JavaScript tool written and maintained by its operator, Mr. Starfleet Command. In December 2024, the Pywikibot software was set up for this bot and will likely be used alongside bot.js going forward, with MassEdit continuing to be used on occasion.

Task log

This bot uses regular expressions to search Memory Alpha and identify portions of text that need to be altered. For the purpose of reviewing and rerunning previous bot runs, I keep a record of some of the more complex or useful RegExp snippets. I have moved some RegExp that can be executed without much supervision to the bot's JSON file where it is executed in the background while making other edits.

Find Replace Status Notes
*\{\{[ _]*([Ii]ncite|[Pp]na-cite|[Nn]one[ _]+selected)[ _]*\}\} {{$1|date=June 2026}} Monthly dating maintenance tags
Category:Memory Alpha pages needing citation
\[\[[ _]*[cC][Aa][Tt][Ee][Gg][Oo][Rr][Yy][ _]*:[ _]*[mM]emory[ _]+Alpha[ _]+images[ _]+\(Humans\)[ _]*\]\] [[Category:Memory Alpha images (Person's Name)]] In progress Image categories for individuals
(.)\s*\{\{[ _]*[Ss]poiler(?:[ _]+|[ _]*\|)(?:ABBR1|ABBR2|ETC)[ _]*\}\}\s*(.) $1 $2 Recurring See: MA:SPOILER, MA:EXAMPLE, Category:Memory Alpha pages with spoilers
(?<!.)\s*\{\{[ _]*[Ss]poiler(?:[ _]+|[ _]*\|)(?:ABBR1|ABBR2|ETC)[ _]*\}\}\s*(.) $1
\b(January|February|March|April|May|June|July|August|September|October|November|December)(\|month\}\}|\]\])?(?: +|\n)of(?: +|\n)(\[\[|\{\{y\|)?(\d\d\d\d)\b([^\|]) $1$2 $3$4$5 Recurring
\{\{[Tt]en Forward Thread Nav\|(.+)\}\} <!--.+-->$ {{Ten Forward Thread Nav|$1|archived}} Recurring #1
\{\{[Tt]en Forward Thread Nav\}\} <!--.+-->$ {{Ten Forward Thread Nav||archived}} Recurring #2
h(uman|umans|umanity)\b H$1 Recurring For use in the main namespace
\[([Hh][Tt][Tt][Pp][Ss]?://[^[|\]<">=\s]+)\] {{EL|$1}} Recurring #1
\[([Hh][Tt][Tt][Pp][Ss]?://[^[|\]<">=\s]+) +([^\x5D\n|=]+)\] {{EL|$1|$2}} Recurring #2
[“”] " Recurring Search titles for this so we don't break any links
[’‘] ' Recurring Search titles for this so we don't break any links
(\d\d:\d\d, (?:January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d?\d, \d\d\d\d \((?:PST|EST|EDT|GMT|UTC|CET|CEST)\)|\d\d:\d\d, \d?\d (?:Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d\d\d \((?:PST|EST|EDT|GMT|UTC|CET|CEST)\)|\d\d:\d\d, \d?\d (?:January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d\d\d\d \((?:PST|EST|EDT|GMT|CET|CEST)\)|\d\d\d\d-\d\d-\d\dT\d\d:\d\d(?::\d\d)? \((?:PST|EST|EDT|GMT|UTC|CET|CEST)\)) {{subst:#time:H:i, j F Y (T)|$1}} Done timestamp fix
(\d\d:\d\d), (\d\d\d\d) (January|February|March|April|May|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d?\d) \((PST|EST|EDT|GMT|UTC|CET|CEST)\) {{subst:#time:H:i, j F Y (T)|$1, $4 $3 $2 ($5)}}

Images by individual

Ten Forward table

This table displays all open Ten Forward discussions. The date column is the date the page was created, the user column is the user who created it.

Topic Date User Index
Forum:Location establishing caption POV 2 June 2026 LauraCC 1
Forum:Citogenesis 18 May 2026 LauraCC 2
Forum:Pages for administration 17 May 2026 LauraCC 3
Forum:Canonicity of webseries 16 May 2026 NutritiousMelon 4
Forum:Release Order Page 13 May 2026 NutritiousMelon 5
Forum:Eaglemoss and Fanhome class names 12 April 2026 Atosen 6
Forum:Organization of Characters section for Novel Pages 27 March 2026 Shoppkin1676 7
Forum:New names for "alternate reality" pages 3 March 2026 Mr. Starfleet Command 8
Forum:Delete all non canon materials 25 February 2026 Yaroze86 9
Forum:Format for adding phrase to Apocrypha 20 January 2026 Shoppkin1676 10
Forum:New Productions 18 January 2026 LauraCC 11
Forum:Star Trek: Starfleet Academy series abbreviation 11 January 2026 Mr. Starfleet Command 12
Forum:Ads 5 December 2025 31dot 13
Forum:Single-page venues 5 December 2025 Mr. Starfleet Command 14
Forum:Proposal: Updating the admin nomination process 22 November 2025 Mr. Starfleet Command 15
Forum:Background character lists 6 November 2025 LauraCC 16
Forum:Ships with successors 3 November 2025 LauraCC 17
Forum:Necessity of this board? 1 November 2025 LauraCC 18
Forum:Tie-in material navs 1 November 2025 LauraCC 19
Forum:Missing references 16 October 2025 LauraCC 20
Forum:Recreation maps and charts in canon articles. 1 October 2025 Yaroze86 21
Forum:Userboxes? 13 September 2025 MissLunaRose 22
Forum:Source for episode airdates 19 August 2025 SheridanSinclair 23
Forum:OTOY template 7 August 2025 Yaroze86 24
Forum:O'Brien dating issues 28 July 2025 Procyon343 25
Forum:(Self) disambiguations 3 July 2025 LauraCC 26
Forum:Talk page indentation and talk tools gadget 30 June 2025 Mr. Starfleet Command 27
Forum:USS Melbourne 21 June 2025 Mr. Starfleet Command 28
Forum:Personality Section for Characters featured in Star Trek 5 June 2025 TorielPadme 29
Forum:Table of contents 3 June 2025 LauraCC 30
Forum:Quadrant of species across various articles. 20 May 2025 Yaroze86 31
Forum:Featured articles needed 13 May 2025 LauraCC 32
Forum:Pluralize footwear types in page names? 15 April 2025 LauraCC 33
Forum:Alien language or Federation Standard name? 7 March 2025 LauraCC 34
Forum:Proposal: Automate the archivists table 19 February 2025 Mr. Starfleet Command 35
Forum:Large print covers 11 February 2025 LauraCC 36
Forum:Helping users add to MA 2 February 2025 LauraCC 37
Forum:Video game consoles 2 February 2025 LauraCC 38
Forum:"Meta" Trek references 28 January 2025 Noah Tall 39
Forum:Legal case pages (similar to Conflict pages) 23 January 2025 LauraCC 40
Forum:"Thank you"s 17 January 2025 LauraCC 41
Forum:Canonicity of "Picard" ships 1 January 2025 Appalachia Actual 42
Forum:Pages converted from real world to in-universe 29 December 2024 LauraCC 43
Forum:MA's Twitter 23 December 2024 LauraCC 44
Forum:Commercials advertising Star Trek 22 December 2024 LauraCC 45
Forum:Saving social media sources 14 December 2024 UncertainError 46
Forum:"Location" sections 1 December 2024 UncertainError 47
Forum:Episode references 21 November 2024 LauraCC 48
Forum:AI use to write articles 25 April 2024 LauraCC 49
Forum:Weird label text 8 November 2023 LauraCC 50
Forum:Production numbers 2 March 2022 Josiah Rowe 51
Forum:Other MA versions 13 May 2006 Bp 52

Backlog

Pywikibot

To do

Command lines

$ cd core                                                  # Navigate to folder
$ python3 pwb.py login                                     # Login
$ git pull origin stable --recurse-submodules              # Update Pywikibot

$ python3 pwb.py clean_sandbox -hours:12 -delay:15         # Sandbox cleanup
$ python3 pwb.py weblinkchecker -start:!                   # Log broken external links in /core/deadlinks/
$ python3 pwb.py weblinkchecker -repeat                    # Re-check broken external links
$ python3 pwb.py weblinkchecker -repeat -day:0             # Re-check all broken external links, even recent ones
$ python3 pwb.py interwiki -start:!                        # Add and correct interlanguage links
$ python3 pwb.py interwiki -continue                       # Continue fixing interlanguage links
$ python3 pwb.py interwiki -autonomous -start:!            # Perform easy interlanguage link fixes, from the top
$ python3 pwb.py interwiki -autonomous -continue           # Perform easy interlanguage link fixes, from where it left off

$ python3 pwb.py [global options] script_name [parameters] # General format

Modifications

# /core/scripts/clean_sandbox.py
content = {
    'en': '{{sandbox}}',
}
            pages = [pywikibot.page.BasePage(pywikibot.Site(), 'Sandbox', 4)]
# /core/scripts/weblinkchecker.py
ignorelist = [
    # top-level domains:
    re.compile(r'https?://(?:[^/]*\.)?test(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?example(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?invalid(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?localhost(/.*)?', flags=re.I),

    # second-level domains:
    re.compile(r'https?://[^/]*\*[^/]*(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?example\.com(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?example\.net(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?example\.org(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?berlinonline\.de(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?web\.archive\.org(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?cygnus-x1\.net(/.*)?', flags=re.I),
    re.compile(r'https?://(?:[^/]*\.)?imdb\.com(/.*)?', flags=re.I),

    # tel URI scheme
    re.compile(r'tel:[\d-]+', flags=re.I),
]
        return get_closest_memento_url(
            url, timegate_uri='https://web.archive.org/web/')
    # Remove links generated by {{bl}}
    bracketted_link_regex = textlib.compileLinkR(False, True)
    original_link_txt = (r'<sup'
                         r' class="original-link noicon"'
                         r' title="Original link">'
                         r'\[.+? \(X\)\]'
                         r'</sup>')
    original_link_regex = re.compile(original_link_txt)
    while original_link_regex.search(text):
        text = original_link_regex.sub('', text)
    def treat_page(self) -> None:
        """Process one page."""
        page = self.current_page
        expanded_text = page.expand_text()
        for url in weblinks_from_text(expanded_text):
            for ignore_regex in ignorelist:
                if ignore_regex.match(url):
                    break
            else:
                # Each thread will check one page, then die.
                thread = LinkCheckThread(page, url, self.history,
                                         self.http_ignores, self.day)
                # thread dies when program terminates
                thread.daemon = True
                # use hostname as thread.name
                thread.name = removeprefix(
                    urlparse.urlparse(url).hostname, 'www.')
                self.threads.append(thread)
# /core/pywikibot/tools/__init__.py
    def __lt__(self, other):
        """Compare if self is less than other."""
        if other is None:
            return False
        else:
            return other > self._cmpkey()
# /core/pywikibot/page/_basepage.py
#            if page_section not in headings:
#                raise SectionError(f'{page_section!r} is not a valid section '
#                                   f'of {self.title(with_section=False)}')