Closed Bug 673496 Opened 11 years ago Closed 8 years ago
Create script to edit the wiki automatically
Per bug 673069, the API is now enabled on the wiki. Write a script that you can pass a username, password, wiki page title, and page contents and it will update a given wiki page's content. The URL of the API is: https://wiki.mozilla.org/api.php (shows use info with no actions) Here is a link to some client code: http://www.mediawiki.org/wiki/API:Client_code The following shell script should have worked (changing ksh93 to ksh), but it would not let me login with my account as it said bad token. http://dfrench.hypermart.net/js/Downloads/Scripts/Korn/Functions/wikiAutoLoad/wikiautoload-wiki-api.php-automatic-upload-uploading-korn-bash-shell-script-function/ I was able to authenticate successfully using the following example: http://www.mediawiki.org/wiki/User:Bcoughlan/Login_with_curl No rush on this one and only something to do between other projects and when you are free.
Example usage: update-wiki.php -u username -p password -t "Some wiki page title" -c page-content.txt It doesn't have to be PHP, but it needs to run on Khan with what is currently available. The example usage is purely just an example and can be changed to whatever is handy.
Assignee: nobody → mkelly
Severity: normal → minor
Usecase please. This, in essence, would appear to mostly suit spam automation rather than do anything which cannot be accomplished simply by a user currently.
I believe https://github.com/Osmose/scripts/tree/master/yaml2wiki was the result of this bug. Either way, if cmore still needs it, he can reopen. :P (In reply to Alison Wheeler [:AlisonW] from comment #2) > Usecase please. This, in essence, would appear to mostly suit spam > automation rather than do anything which cannot be accomplished simply by a > user currently. For the record, the usecase was something along the lines of creating wiki pages for meetings and other recurring events that we wanted to document.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
We don't need it right now, but maybe again in the future. We'll keep this closed. Thanks
You need to log in before you can comment on or make changes to this bug.