Gabriel Wicke <lists(a)wikidev.net> writes:
To get the source of a page, you can also use the
action=raw method.
Example url:
http://en.wikipedia.org/w/wiki.phtml?title=Main_Page&action=raw
So if I wanted to look at the wiki-markup in Emacs,
I can issue:
(let ((article "Edit: Apple"))
(if (get-buffer article) (kill-buffer article))
(switch-to-buffer article)
(insert (shell-command-to-string
(format "wget -q -O - \"%s?title=%s&action=raw\""
"http://en.wikipedia.org/w/wiki.phtml"
"Apple"))))
Now let's say that I edited the buffer in Emacs
and, then, wanted to promote the edits.
Let's say that I saved the buffer in "Apple.wiki".
Is there some kind of command-line operation
that I can issue that would be equivalent
to clicking "Save page" during an edit operation?
I'd also want some way to specify the "Edit summary" field
and indicate if the operation is a minor edit.
Hmm, there is also specifying my User name which, I assume,
would be even trickier.
Well, if I could get past all that,
could I issue some kind of command-line operation
that would be equivalent to presing the "Show preview" button?
Then, for instance, my firefox web-browser would come up
with my edits already present in the edit-box.