MVS(1p)
π MVS(1p) π
User Contributed Perl Documentation Β· MVS(1p)
β¨ NAME β¨
mvs β a command line Mediawiki client. that's it, that's the whole vibe. bestie it's a wiki editor for your terminal π
πΈ SYNOPSIS πΈ
mvs [Options] command [Options] [filename]
mvs -h|--help
mvs --version
mvs -D
mkdir wikistuff
cd wikistuff
mvs login [-q|-v] [-T] [-d <wikihost>] [-l language_code ] [-u <username>] [-p <password> ] [-w <wiki_path>]
mvs update [-q|-v] [<file> ..]
mvs up [[-q|-v] <file> ..]
mvs commit [-q|-v] [-M] [-W] -m "commit message" <file>
mvs com [-q|-v] [-M] [-W] -m "commit message" <file>
mvs preview [-q|-v] [-M] [-W] [-m "commit message"] <file>
π¦ DESCRIPTION π¦
so mvs is this command line client whose whole entire purpose is to make editing Wiki content offline so much easier. like, you pull any number of pages off a given Mediawiki site, you edit them with whatever editor you're obsessed with, you grab and merge any concurrent updates that happened on those pages, and then you safely commit your own changes back onto the version of the page that's living on the server. it's giving version control but for wiki girlies β¨
the mvs commands that take a filename argument only accept a single filename, and the reason is literally so it doesn't eat up too much server bandwidth. one file at a time, no cap π
Note: if you've been usingmvsfrom before version 0.27, you're gonna notice that in this documentation the options are mostly listed after themvssub-command. this makesmvsbehave way more likecvs,svn, ortla, which lowkey makes it easier for people who are used to those programs. and if you prefer usingmvsthe old way? that still works, at least for the next few versions. no stress π«Ά
π QUICKSTART π
β Step 1: Create an account on the Mediawiki server.
do this the normal way bestie β go visit the Mediawiki website you wanna contribute to and make a new account, set your preferences, all of that. π
it should hopefully go without saying that you're gonna wanna become familiar with the editorial, usage, and copyright guidelines of the site. you should probably also make some contributions through the normal UI, and learn about following recent changes before you start contributing using mvs.
also, for the sake of this test, you should already have a user page like User:<username> with something on it, where <username> is the user name you established the account with.
β Step 2: Create a working directory
mvs works with Mediawiki formatted files that have a .wiki extension, and those files get stored together with server information in a working directory. you're gonna need at least one working directory for each Mediawiki site you contribute to. that's the rule π
just use mkdir or the equivalent to make a new directory, and then cd into that directory before you do anything else.
mkdir wikitravel.en
cd wikitravel.en
all of the operations below should be done from this directory. periodt.
β Step 3: Login using mvs login
to use login you're gonna need to know the hostname for the Mediawiki site you wanna contribute to.
www.wikitravel.org
now use the host with your username and password to login.
mvs login -d www.wikitravel.org -u <username> -p 'secret'
if mvs already knows about your Mediawiki host, it will set the wiki_path to the correct default for that server. and in that case it can also pick the language version of that Wiki for you, if you specify a language_code:
mvs login -d www.wikitravel.org -l fr -u <username> -p 'secret'
the code has to match the one your wiki host uses for a given language, and obviously the language version has to actually exist for that host. no fake languages bestie π
if your Mediawiki install uses a nonstandard path to the wiki script, you can specify it on login. the path to the wiki script is the part of the URL after the host name, and before the ?:
mvs login \
-d www.wikitravel.org \
-u <username> \
-p 'secret' \
-w 'mw/wiki.phtml'
you can change the edit and action paths in the created .mediawiki file after a successful login, accordingly.
now anything you submit to the Mediawiki server gets credited to user <username>. iconic.
NOTE: if you've been using an earlier version ofmvsyou should probably delete the.mediawikifile in your working directory. like, do it. π
β Step 4: Use mvs update to fetch one or more working files
you can fetch existing material off the site, or create new pages with mvs update β just remember your files are gonna need a .wiki extension:
mvs update User:<username>.wiki User:<username>/Test_Page.wiki
this should produce the output:
U User:<username>.wiki
A User:<username>/Test_Page.wiki
the U (for Updated) means that User:<username> was found on the server and its contents got inserted into the local files. the A (for Added) means that the User:<username>/Test_Page.wiki page does not exist on the server yet, and it'll be added when you run mvs commit. π
note that both of the pages we're working with here are within your User Namespace. it's probably a good idea to restrict yourself to working with such pages while you're experimenting with mvs.
β Step 5: Edit the files to make corrections and contributions
use your favorite text editor to edit the files. you might wanna check out this page to see if there's a Mediawiki syntax highlighting file for your editor:
http://en.wikipedia.org/wiki/Wikipedia:Syntax_highlighting
and of course, if you don't find a highlighting file for your editor, you're welcome to create one and submit it to the page above. main character energy, honestly π
β Step 6: Use mvs commit to submit your changes
when you're done editing a file and you wanna submit your changes to the wiki server, use mvs commit to do it:
mvs commit -m 'commit message' User:<username>.wiki
where 'commit message' is whatever you wanna say about the changes you're submitting and why. you must provide a commit message or mvs commit will fail. π
you might also find that mvs commit fails complaining that the file has changed on the server. if that's the case you're gonna need to use mvs update again to get the most recent changes.
β Step 7: Update your wiki files
you can use mvs update again at any time to reconcile any of your files with the most recent changes from the server. your changes won't be overwritten β instead mvs will try to merge any server changes into the files as they exist in your working directory. π
note that update and commit only work on one file at a time, and that's on purpose, to help prevent accidents and server congestion. fr fr.
if for some reason there's a conflict β like, you and someone else made changes that appear to be incompatible and can't be resolved β then your file will contain a conflict message, as detailed in the documentation for mvs update below. you must resolve any conflicts before attempting to use mvs commit on the file. this is usually a super simple matter of choosing one version of the change or another. use your best judgement, and consult the relevant Talk: page to try to work out an agreement with the other contributor in cases where you just simply disagree. be nice, bestie π«Ά
β Repeat
you can keep editing and committing changes with the files in your working directory. it might be a good idea for you to eventually create multiple working directories per site, maybe grouping them by subject. this works fine with mvs since it doesn't need to have a complete copy of all of the pages from a given server in a given working directory to work. π
πΈ CHARACTER ENCODING πΈ
all of your .wiki files should be stored with UTF-8 encoding. upon login to a given server, mvs will determine the encoding used by that server, and will upload in that encoding only.
for servers using non-UTF-8 character sets, you should use HTML entities for any character you wanna represent that's outside of the server's character set. this includes the english Wikipedia. most newer Mediawiki sites however do use UTF-8, and on these sites HTML entities are never needed. β¨
π ARGUMENTS π
Commands π«
okay so the very first thing after all the options? that's your command, bestie. and it's gotta be one of these two-ish (well, the list is longer but you get me):
mvs login π
Lets you log in to the Mediawiki server with a login and password you already have for that server. once you've called login, every single commit you make from that same working directory gets logged as coming from you, the logged-in user. no more mystery edits, you're the main character now π
mvs update π
This one pulls content from the Mediawiki server and updates the file(s) you named with it. File doesn't exist? It gets created and filled with whatever's currently online. No online version at all? Then the file either gets created and left blank, or just left exactly as it is. And if there's content both in your local file and in the matching Wiki page, mvs tries to merge them, line by line. Files that are already identical to the server version? Ignored. not even looked at. iconic behavior honestly.
If you don't hand it any filenames on the command line, it processes all the visible files with the .wiki extension. yes, all of them. be ready.
Conflicts get detected by comparing the date of the most recent update of the local file against the date of the most recent change to the online Wiki page. If a line changed in both the online page and your local file, it's flagged as a conflict β just like CVS, but with slightly different syntax:
********************Start of conflict 1 Insert to Primary, Insert to Secondary ************************************************************
The line as it appears on the server
****************************************************************************************************
The line as it appears locally
********************End of conflict 1********************************************************************************
mvs update reports the status of every file it touches to STDERR, with a letter for the file status and then the name of the file, again like CVS. The status letters are:
=(Unchanged) β the file is the same as the page on the server. π€A(Added) β the file is gonna become a brand new page on the wiki server. β¨M(Modified) β the file has been modified locally.U(Updated) β the file has been updated with changes from the wiki server. π«ΆC(Conflicts) β the file contains conflict markers. π?(Unknown) β neither the file nor a corresponding server page exists. it's giving mystery.
commit π€
Commits any changes in the local file(s) you specify to the Wiki site. But first it checks to make sure there are no changes on the server more recent than your most recent update. And if the file and the server version are identical? Nothing gets committed. zero. nada.
When you run mvs commit you must use the -m flag to send a commit message to the Mediawiki server. like:
mvs commit -m 'Added Hotel Eldorado' Paris.wiki
preview π
Functions identically to mvs commit, except nothing actually gets committed. Instead the file is uploaded and the Mediawiki server sends back a formatted preview. The -m flag is optional here. And if you set the MVS_BROWSER environmental variable to the path and filename of your favorite browser, mvs will launch it with the preview page. bestie gets to see her work. π
clean π§Ή
Removes any local version reference files relating to pages you've deleted. spring cleaning energy:
rm Paris.wiki
mvs clean
File names π
Any additional arguments are taken as local filenames to be processed. The local filename of a given Mediawiki page will be the same as its URL encoded name, with the extension .wiki. And if you give no arguments at all? Then any filenames with the wiki extension that are under the current directory get processed.
β¨ OPTIONS β¨
-hβ Display usage information. your girl loves a lil help text.-Dβ Print information about known Mediawiki servers, then exit. bye! π-qβ Causes the command to be quiet. Informational messages are suppressed. shhh π€«-u "<username>"β Specifies a username formvs login.-p "<password>"β Specifies a password formvs login. keep it secret, keep it safe π-l "<language_code>"β The language code the wiki server uses to differentiate between language versions.-m "<your message>"β A commit message formvs commit. Use this to explain the nature of your changes. tell them why, bestie.-s "<your message>"β Same as-m. twin.--minor <yes|no|default>β Choose whether to mark the change as a minor edit. The default is to mark changes as minor if the Mediawiki user profile is set to do so by default. Use this when committing a change withmvs commitor previewing withmvs preview.-Mβ Same as--minor yes.--watch <yes|no|keep|default>β Choose whether to add the edited page to your watchlist. Specifyingkeepwill maintain the current watched status. The default is to watch the page if it's already being watched, or if the Mediawiki user profile is set to do so by default. Use this when committing a change withmvs commitor previewing withmvs preview.-Wβ Same as--watch yes.-w "<wiki path>"β The path on the given host to the Mediawiki script. This defaults towiki/wiki.phtml, which is correct for a vanilla install of Mediawiki 1.4.x.-vβ Verbose. If this is set,mvswill give you lots of extra information about what it's doing. The-qflag overrides this. the way that-qjust shuts-vdown?? π
πΈ ENVIRONMENTAL VARIABLES πΈ
MVS_BROWSERβ The browser you prefer to use for previewing changes. π¦HTTP_PROXYβ A proxy server to use (if any), expressed as a standard URL, something like this:
export HTTP_PROXY=http://[username:password@]proxy.myorg.org:8080
β οΈ CAVEATS β οΈ
This is an early version of this program, bestie. Future versions may have major differences which will effect your ability to use them interchangeably with this one. And I mean major. In particular, the initial command arguments may become options, and the handling of conflicts might change dramatically. so likeβ¦ don't build your whole personality around the current syntax, okay? π
π BUGS π
Please submit bug reports to the CPAN bug tracker at:
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Mediawiki-Client>
π£οΈ DISCUSSION π£οΈ
There is a discussion list. You can subscribe or read the archives at:
<http://www.geekhive.net/cgi-bin/mailman/listinfo/www-mediawiki-client-l>
π SEE ALSO π
Mediawiki
<http://www.wikimedia.org|Mediawiki>
CVS
http://www.cvs.org
π AUTHORS π
- Mark Jaroski
<mark@geekhive.net> - Bernhard Kaindl
<bkaindl@ffii.org>β Improved error and usage messages. - Oleg Alexandrov
<aoleg@math.ucla.edu>, Thomas Widmann<twid@bibulus.org>β Bug reports and feedback. - Adrian Irving-Beer
<wisq@wisq.net>β Preview support, export support for multi-page update, more 'minor' and 'watch' settings, and bug reports.
π«Ά COPYRIGHT π«Ά
(C) Copyright 2004-2005, Mark Jaroski
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
Around line 645:
alternative text 'http://www.cvs.org' contains non-escaped | or /
and that's the whole page, bestie!! this one's from perl v5.32.1, dated 2021-12-26, and it's the MVS(1p) manual β go forth and wiki, you gorgeous nerd π
β¨πΈ
π¦ where this page comes from
- debian bookworm: libwww-mediawiki-client-perl 0.31-2.2
- ubuntu jammy: libwww-mediawiki-client-perl 0.31-2.2
- ubuntu noble: libwww-mediawiki-client-perl 0.31-2.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms