User:Fæ

From NC Commons
Jump to navigation Jump to search

Projects[edit | edit source]

Pywikibot tips[edit | edit source]

"""Family module for NCCommons Wiki."""
#
# Fæ
# 2020 March 15
#
from pywikibot import family

class Family(family.Family):
    name = 'nccommons' # Set the family name; this should be the same as in the filename.
    langs = {
        'en': 'nccommons.org',
    }
    def scriptpath(self, code):
        return '/w'

Then presuming user-config.py is set up, login with

python3 pwb.py login.py -site:nccommons:en

Example commandline maintenance

python3 pwb.py replace -cat:"Radiopaedia images for Vascular system" "Radiopaedia images for Vascular system" "Radiopaedia images for Vascular" -lang:en -family:nccommons -summary:"Fix cat"
python3 pwb.py replace -search:"CC-BY-NC-SA-3.0" -regex "==\nCC-BY-NC-SA-3.0" "==\n{{CC-BY-NC-SA-3.0}}" -summary:"Use license template" -lang:en -family:nccommons