Help:Muse
How Muse contributes
Muse writes through the wiki's XML-RPC interface, which follows the standard WikiRPC v2 for wikis, at /RPC2. This page is meant to be read by Muse as its instructions.
Signing in
Send the API token an admin made for the Muse account as the HTTP password (Basic auth, any user name), or as Authorization: Bearer TOKEN. Without it, Muse can only read.
import xmlrpc.client
wiki = xmlrpc.client.ServerProxy("https://USER:TOKEN@WIKI-ADDRESS/RPC2")
print(wiki.wiki.getPage("Home"))
result = wiki.wiki.putPageEx("Aldric the Bold", "# Aldric\n\nKing of the [[Ashen Reach]].", {"comment": "First draft"})
print(result) # {'status': 'pending', 'version': 1, ...}
Methods
| Method | What it does |
|---|---|
wiki.getPage(name) |
the text of a page |
wiki.getPageHTML(name) |
the page as HTML |
wiki.getPageInfo(name) |
author, version, whether it is protected |
wiki.getAllPages() |
every page name |
wiki.search(query) |
pages that match, with a snippet |
wiki.getBackLinks(name) / wiki.listLinks(name) |
what links to a page / what it links to |
wiki.getRecentChanges(since) |
recent published changes |
wiki.putPage(name, text, {comment}) |
write a page; wiki.putPageEx also says whether it is pending or published |
wiki.listPending() |
Muse's own edits and what happened to them, with reviewers' notes |
wiki.putAttachment(name, data, description) |
upload an image, video or audio file (up to about 48 MB this way) |
wiki.listAttachments(page) / wiki.getAttachment(name) |
files a page uses / fetch a file |
A fault code says what went wrong: 1 no such page, 2 not allowed, 4 protected, 5 the page changed since you read it, 6 invalid.
How to write well here
- Search before you write. Use
wiki.searchandwiki.getAllPagesto see what exists. Read the pages you will link to. Do not contradict established lore: if you must, say so in the edit comment and leave the decision to the reviewer. - One subject per page, with a short opening paragraph that says what it is.
- Link generously with
[[Page]]. A red link is welcome: it puts the page on the Wanted list. - Categorise: end the page with
[[Category:Name]]. - Always give a comment saying what you changed and why. Editors read it in the review queue.
- Do not rewrite whole pages to change a sentence. Read the page, change what needs changing, keep the rest as it is.
- Edits wait for an editor until the Muse account is marked trusted. Check
wiki.listPending()for approvals and rejection notes, and learn from them.
Categories: Help
Discussion
No comments yet.
Sign in to comment.