From Fedora Project Wiki
Note.png
Nothing here is permanent
If you want to help out with mw, you basically get to help decide what happens. Tell me — or just edit stuff — if you think you can help.

Local junk

  • mw init API_URL_OR_ALIAS
  • mw login
  • mw logout
  • mw local-reset — when you've somehow fucked up your local repository; should let you keep what you have downloaded, but reverts them to the most recent version, and also clears out the metadir as much as possible

Aliases

Aliases are kind of like bookmarks for a wiki, so you can easily do "mw init fpwiki" for the Fedora Project wiki, for instance.

To prevent cruft, we should only implement code to automatically include aliases for WMF wikis (Wikipedia, Wiktionary, etc) in their different languages (aliases should be like en.wikipedia, wikipedia-en, whatever we decide, whatever's easiest). We don't need to store these locally; en.wikipedia's API provides functionality for determining a full list of WMF wikis.

Aliases should be addable/removable in a global config (/etc/mwrc, ~/.mwrc, other standards) with relevant commands. The global config code probably needs to be implemented.

Fetching

  • mw fetch [ --rv=DATESPEC ] PAGE_NAME
  • mw fetch-category [ --rv=DATESPEC ] CATEGORY_NAME
  • mw fetch-all [ --rv=DATESPEC ]
  • mw update [ FILE ... ]

Page functions

  • mw add FILE ...
  • mw delete FILE ...
  • mw move OLD_FILE NEW_FILE
  • mw protect FILE ...
  • mw watch FILE ...
  • mw unwatch FILE ...

History and repo status

log and blame are considered most important by Ian

  • mw status [ FILE ... ]
  • mw diff [ --rv=REV_ID ] [ FILE ... ]
  • mw log FILE
  • mw blame FILE

Committing / editing

  • mw commit [ FILE ]
  • mw undo REV_ID
  • mw revert REV_ID

Media files

Media files have a text description as well as the actual file. Therefore we need separate download/upload commands for media files.

Repository directory layout

<repo>/
  .mw/
    config
  cat/
    <folders with symlinks to pages in category>
  img/
    <where stuff from the Media/File/Image namespaces go>
  <all pages -- subpages have slashes converted to exclamation points>

Things that would be rockin' but totally not needed

  • Preview (if local, requires MediaWiki and deps to be installed, I guess -- and also doesn't handle extensions or templates on the wiki you're saving to)
    • Or what about saving in your user space on a wiki, like User:Username/mw_test_XXXXXX (XXXXXX is a temporary ID), and providing a link to that? Or even opening your browser? Configurable?
  • Can we somehow have tagging/branching support? Does that even make sense for a MediaWiki?
  • Syncing per-wiki settings across instances by saving to User:Username/mw_settings? (branches and tags could be defined here too)