Quantcast User:HighwindBot/ImageCategorization - Memory Alpha, the Star Trek Wiki
Recent changes Random page
GAMING
Entertainment
 
Star Wars
Star Trek
Transformers
Muppet Wiki
Digimon Wiki
Marvel Database
See more...

User:HighwindBot/ImageCategorization

From Memory Alpha, the free Star Trek reference.

Jump to: navigation, search

[edit] Function

Adds a category link to Category:Memory Alpha images to all images that aren't categorized yet.

[edit] Code snippet

The following can be added to the fixes at fixes.py, then be called using

  • replace.py -fix:imgcat -start:Image:!

ATTENTION: Make sure to only run this on pages in "Image:" namespace!

   'imgcat': {
        'regex': True,
        'exceptions':  ['Category:Memory Alpha images'],
        'msg': {
            'en':u'categorizing images',
        },
        'replacements': [
            (u'\n(.*)\Z', u'\n\\1\n[[Category:Memory Alpha images]]'),
        ],
    },