old_contents: # -*- coding: utf-8 -*-
  import os
  import pywikibot
  
  os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__))
  os.environ['TZ'] = 'UTC'
  
  site = pywikibot.Site()
  site.login()
  
  with open("list.csv", "r") as f:
      for title in f:
          oldtitle = title.strip()
          page = pywikibot.Page(site, oldtitle)
          ns = page.namespace().custom_name
          title = page.titleWithoutNamespace()
          title = title[0].upper() + title[1:]
          newtitle = ns + ":" + title
          print("move", oldtitle, "to", newtitle)
          page.move(newtitle, reason="[[:phab:T187783]]，移動到大寫開頭")
  
new_contents: # -*- coding: utf-8 -*-
  import csv
  import os
  
  os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__))
  import pywikibot
  
  site = pywikibot.Site()
  site.login()
  
  with open('list.csv', 'r') as f:
      reader = csv.reader(f)
      for row in reader:
          if len(row) < 3:
              continue
          oldtitle = row[0].strip()
          newtitle = row[1].strip()
          reason = row[2]
          page = pywikibot.Page(site, oldtitle)
          print('move', oldtitle, 'to', newtitle, 'reason', reason)
          page.move(newtitle, reason=row[2], noredirect=True)
  
subject: Update move.py