WWW-Mediawiki-Client is a cvs-like perl client interface for Mediawiki driven wiki websites. It's packaged with a script, mvs which allows you to work offline using the editor of your choice, to check for conflicting changes, and commit your local version of the wiki pages in separate steps.
CPAN
[edit]WWW:::Mediawiki::Client can be installed in the usual way you would install any CPAN module:
perl -MCPAN -e 'install WWW::Mediawiki::Client'
Or you can download the source from CPAN and install with:
make make test make install # as root
mvs
[edit]Documentation is available with:
perldoc mvs
The script mvs uses a CVS inspired interface. This seems to work pretty well, but there's always room for more improvements. Patches are most welcome as are suggestions, complaints, and of course kudos either on the talk page for this page or at the mailing list [email protected].
Arch
[edit]There is an arch repository available at http://mark.sdf-eu.org/arch
If you're new to Arch but you know CVS, then it's pretty easy (although the documentation makes it seem hard). To check out a working version of the code you can do this:
# the equivalant of exporting a CVSROOT: tla register-archive -f [email protected] http://mark.sdf-eu.org/arch tla my-default-archive [email protected]
# the equivalant of doing a cvs checkout: tla get WWW-Mediawiki-Client--0.25 WWW-Mediwiki-Client
The code currently in the Arch repository is for the newest release 0.28
Release 0.27
[edit]The newest version 0.27, includes the following improvements:
- Preview functionality (dump to file or run web browser) - from Adrian Irving-Beer
- Re-Add the ability to handle multiple files and recursion for updates. - from Adrian Irving-Beer
- Using Special:Export page for faster updates and less load (uses XML::LibXML, but could easily use a lighter SAX parser). - from Adrian Irving-Beer
- Change to Getopt::Long to support options anywhere in command. - from Adrian Irving-Beer
- Support for automatic handling of text encoding on the Mediawiki host - Mark Jaroski
TODO
[edit]Here's a TODO list of things I have in mind to do to improve MVS from here (I'd love to see other ideas):
- Check for code 3xx redirects and try to reset the wiki_host value to the correct host to which we are redirected. (target: 0.28)
- Add a flag allowing the user to choose whether to proceed with commits if not logged in. (target: 0.28)
- Add a command to return a diff between the local version and the server version. (0.28)
- Use of "Special:All pages" to return a list of every page in the host wiki
- Image handling, upload and download of images
- Add a commit comment editor
- The ability to access data from robots.txt for use by programmers using the library to create Mediawiki bots
- Multi-file commits which respect the delay between uploads as specified in robots.txt
- Win32-Perl support
- A *nix GUI (this could be done as an outside project)
- Win 32 GUI (possibly like tortoise CVS or tortoise SVN)
- A Vim plugin supporting mvs
- An EMACS macro supporting mvs
- A KDE Kate plugin for mvs
UTF-8 Test characters
[edit] NO ¬ 172 -- 173 Rg ® 174 'm ¯ 175 DG ° 176 - ± 177 2S ² 178 3S ³ 179 '' ´ 180 My µ 181 PI ¶ 182 .M · 183 ', ¸ 184 1S ¹ 185 -o º 186 >> » 187 14 ¼ 188 12 ½ 189 34 ¾ 190 ?I ¿ 191 A! À 192 A' Á 193 A>  194 A? à 195 A: Ä 196 AA Å 197 AE Æ 198 C, Ç 199 E! È 200 E' É 201 E> Ê 202 E: Ë 203 I! Ì 204 I' Í 205 I> Î 206 I: Ï 207 D- Ð 208 N? Ñ 209 O! Ò 210 O' Ó 211 O> Ô 212 O? Õ 213 O: Ö 214 *X × 215 O/ Ø 216 U! Ù 217 U' Ú 218 U> Û 219 U: Ü 220 Y' Ý 221 TH Þ 222 ss ß 223 a! à 224 a' á 225 a> â 226 a? ã 227 a: ä 228 aa å 229 ae æ 230 c, ç 231 e! è 232 e' é 233 e> ê 234 e: ë 235 i! ì 236 i' í 237 i> î 238 i: ï 239 d- ð 240 n? ñ 241 o! ò 242 o' ó 243 o> ô 244 o? õ 245 o: ö 246 -: ÷ 247 o/ ø 248 u! ù 249 u' ú 250 u> û 251 u: ü 252 y' ý 253 th þ 254 y: ÿ 255 A- Ā 256 a- ā 257 A( Ă 258 a( ă 259 A; Ą 260 a; ą 261 C' Ć 262 c' ć 263 C> Ĉ 264 c> ĉ 265 C. Ċ 266 c. ċ 267 C< Č 268 c< č 269 D< Ď 270 d< ď 271 D/ Đ 272 d/ đ 273 E- Ē 274 e- ē 275 E( Ĕ 276 e( ĕ 277 E. Ė 278 e. ė 279 Bd ◣ 9699 *2 ★ 9733 *1 ☆ 9734 <H ☜ 9756 >H ☞ 9758 0u ☺ 9786 0U ☻ 9787 SU ☼ 9788 Fm ♀ 9792 Ml ♂ 9794 cS ♠ 9824 cH ♡ 9825 cD ♢ 9826 cC ♣ 9827 Md ♩ 9833 M8 ♪ 9834 M2 ♫ 9835 Mb ♭ 9837 Mx ♮ 9838 MX ♯ 9839 OK ✓ 10003 XX ✗ 10007 -X ✠ 10016 IS 12288 ,_ 、 12289 ._ 。 12290 " 〃 12291 _ 〄 12292 *_ 々 12293 ;_ 〆 12294 0_ 〇 12295 < 《 12298 > 》 12299 <' 「 12300 >' 」 12301 <" 『 12302 >" 』 12303 (" �� 12304 )" 】 12305 =T 〒 12306 =_ 〓 12307 (' 〔 12308 )' 〕 12309 (I 〖 12310 )I 〗 12311 -? 〜 12316 A5 ぁ 12353 a5 あ 12354 I5 ぃ 12355 i5 い 12356 U5 ぅ 12357 u5 う 12358 E5 ぇ 12359 e5 え 12360 O5 ぉ 12361 o5 お 12362 ka か 12363 ga が 12364 ki き 12365 gi ぎ 12366 ku く 12367 gu ぐ 12368 ke け 12369 ge げ 12370 ko こ 12371 go ご 12372 sa さ 12373 za ざ 12374 si し 12375 zi じ 12376 su す 12377 zu ず 12378 se せ 12379 ze ぜ 12380 so そ 12381 zo ぞ 12382 ta た 12383 da だ 12384 ti ち 12385 di ぢ 12386 tU っ 12387 tu つ 12388 du づ 12389 te て 12390 de で 12391 to と 12392 do ど 12393 na な 12394 ni に 12395 nu ぬ 12396 ne ね 12397 no の 12398 ha は 12399 ba ば 12400 pa ぱ 12401 hi ひ 12402 bi び 12403 pi ぴ 12404 hu ふ 12405 bu ぶ 12406 pu ぷ 12407 he へ 12408 be べ 12409 pe ぺ 12410 ho ほ 12411 bo ぼ 12412 po ぽ 12413 ma ま 12414 mi み 12415 mu む 12416 me め 12417 mo も 12418 yA ゃ 12419 ya や 12420 yU ゅ 12421 yu ゆ 12422 yO ょ 12423 yo よ 12424 ra ら 12425 ri り 12426 ru る 12427 re れ 12428 ro ろ 12429 wA ゎ 12430 wa わ 12431 wi ゐ 12432 we ゑ 12433 wo を 12434 n5 ん 12435 vu ゔ 12436 "5 ゛ 12443 05 ゜ 12444 *5 ゝ 12445 5 ゞ 12446 a6 ァ 12449 A6 ア 12450 i6 ィ 12451 I6 イ 12452 u6 ゥ 12453 U6 ウ 12454 e6 ェ 12455 E6 エ 12456 o6 ォ 12457 O6 オ 12458 Ka カ 12459 Ga ガ 12460 Ki キ 12461 Gi ギ 12462 Ku ク 12463 Gu グ 12464 Ke ケ 12465 Ge ゲ 12466 Ko コ 12467 Go ゴ 12468 Sa サ 12469 Za ザ 12470 Si シ 12471 Zi ジ 12472 Su ス 12473 Zu ズ 12474 Se セ 12475 Ze ゼ 12476 So ソ 12477 Zo ゾ 12478 Ta タ 12479 Da ダ 12480 Ti チ 12481 Di ヂ 12482 TU ッ 12483 Tu ツ 12484 Du ヅ 12485 Te テ 12486 De デ 12487 To ト 12488 Do ド 12489 Na ナ 12490 Ni ニ 12491 Nu ヌ 12492 Ne ネ 12493 No ノ 12494 Ha ハ 12495 Ba バ 12496 Pa パ 12497 Hi ヒ 12498 Bi ビ 12499 Pi ピ 12500 Hu フ 12501 Bu ブ 12502 Pu プ 12503 He ヘ 12504 Be ベ 12505 Pe ペ 12506 Ho ホ 12507 Bo ボ 12508 Po ポ 12509 Ma マ 12510 Mi ミ 12511 Mu ム 12512