|
NAMEmvs - A command line Mediawiki clientSYNOPSISmvs [Options] command [Options] [filename] mvs -h|--help mvs --version mvs -D mkdir wikistuff cd wikistuff mvs [-q|-v] login [-T] [-d <wikihost>] [-l language_code ] [-u <username>] [-p <password> ] [-w <wiki_path>] mvs [-q|-v] update [<file> ..] mvs [-q|-v] up [<file> ..] mvs [-q|-v] commit [-M] [-W] -m "commit message" <file> mvs [-q|-v] com [-M] [-W] -m "commit message" <file> mvs [-q|-v] preview [-M] [-W] [-m "commit message"] <file> DESCRIPTION"mvs" is a command line client whose purpose is to simplify offline editing of Wiki content. It allows you to get any number of pages from a given Mediawiki site, edit the pages with any editor, get and merge any concurrent updates of the pages, and then safely commit the users own changes back to the version of the page on the server.The "mvs" commands which take a filename argument only accept a single filename as so to avoid taking up too much server bandwidth. Note:Users of "mvs" from before version 0.27 will notice that in this documentation the options are mostly listed after the "mvs" sub-command. This makes "mvs" behave more like "cvs", "svn", or "tla", and so should make it easier for people who are used to using those programs. If you prefer to use "mvs" the old way, that will still work, at least for the next few versions. QUICKSTARTStep 1: Create an account on the Mediawiki server.This should be done the normal way, by visiting the Mediawiki website to which you want to contribute and creating a new account, setting the preferences, etc.It should hopefully go without saying that you will want to 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 contributing using mvs. In addition 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 with which you established the account. Step 2: Create a working directory"mvs" works with Mediawiki formatted files with a ".wiki" extension and which are stored together with server information in a working directory. You will have to have at least one working directory for each Mediawiki site to which you contribute.Simply use "mkdir" or the equivalent to make a new directory, and then before cd into that directory. mkdir wikitravel.en cd wikitravel.en All of the operations below should be done from this directory. Step 3: Login using "mvs login"To use login you will need to know the hostname for the Mediawiki site to which you want to contribute.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" knows about your Mediawiki host it will set set the "wiki_path" to the correct default for that server. In this case it will also be able to select 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 must match the one which your wiki host uses for a given language, and of course the language version must exist for the given host. 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 successful login accordingly. Now anything you submit to the Mediawiki server will be credited to user "<username>". NOTE: If you have been using an earlier version of "mvs" you should probably delete the .mediawiki file in your working directory. Step 4: Use "mvs update" to fetch one or more working filesYou can fetch existing material off of the site, or create new pages with "mvs update", remembering that your files will 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 inserted into the local files. The A (for Added) means that the User:<username>/Test_Page.wiki page does not yet exist on the server, and will be added when you run "mvs commit". Note that both of the pages we are working with are within your User Namespace. It's probably a good idea to restrict yourself to working with such pages while you are experimenting with "mvs" Step 5: Edit the files to make corrections and contributionsUse your favorite text editor to edit the files. You might want to check out this page to see if there is a Mediawiki syntax highlighting file for your editor:http://en.wikipedia.org/wiki/Wikipedia:Syntax_highlighting Of course if you don't find a highlighting file for you editor you are welcome to create one and submit it to the page above. Step 6: Use "mvs commit" to submit your changesWhen you are done editing a file and would like to submit your changes to the wiki server use "mvs commit" to do so:mvs commit -m 'commit message' User:<username>.wiki Where 'commit message' is whatever you want to say about the changes you are 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 this is the case you will need to use "mvs update" again to get the most recent changes. Step 7: Update your wiki filesYou can use "mvs update" again at any time to reconcile any of your files with the most recent changes from the server. Your changes will not be overwritten, but rather "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, as so to help prevent accidents and server congestion.If for some reason there is a conflict, i.e. you and someone else have made changes which appear to be incompatible, and cannot 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 very simple matter of choosing one version of the change or another. You should use your best judgement, consulting the relevant "Talk:" page to try to work out an agreement with the other contributor in cases where you just simply disagree. RepeatYou can continue 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, perhaps grouping them by subject. This will work fine with "mvs" since it does not need to have a complete copy of all of the pages from a given server in a given working directory to work.CHARACTER ENCODINGAll 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 want to represent which is outside of the server's character set. This includes the english Wikipedia. Most newer Mediawiki sites however do use UTF-8, on these sites HTML entities are never needed.ARGUMENTSCommandsThe first argument after the options should be one of the following two commands:
File namesAny 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". If no arguments are given then any filenames with the "wiki" extension and under the current directory are processed.OPTIONS-hDisplay usage information.-DPrint information about known Mediawiki servers, then exit.-qCauses the command to be quiet. Informational messages are suppressed.-u "<username>"Specifies a username for "mvs login".-p "<password>"Specifies a password for "mvs login".-l "<language_code>"The language code the wiki server uses to differentiate between language versions.-m "<your message>"A commit message for "mvs commit". Use this to explain the nature of your changes.-s "<your message>"Same as "-m"--minor <yes|no|default>Choose whether to mark 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 with "mvs commit" or previewing with "mvs preview".-MSame as "--minor yes".--watch <yes|no|keep|default>Choose whether to add the edited page to your watchlist. Specifying "keep" will maintain the current watched status. The default is to watch the page if it is already being watched, or if the Mediawiki user profile is set to do so by default. Use this when committing a change with "mvs commit" or previewing with "mvs preview".-WSame as "--watch yes".-w "<wiki path>"The path on the given "host" to the Mediawiki script. This defaults to wiki/wiki.phtml which is correct for a vanilla install of Mediawiki 1.4.x.-vVerbose. If this is set "mvs" will give you lots of extra information about what it's doing. The -q flag overrides this.ENVIRONMENTAL VARIABLESMVS_BROWSERThe browser you prefer to use for previewing changes.HTTP_PROXYA proxy server to use (if any), expressed as a standard URL, something like this:export HTTP_PROXY=http://[username:password@]proxy.myorg.org:8080 CAVEATSThis is an early version of this program. Future versions may have major differences which will effect your ability to use them interchangeably with this one. In particular the initial "command" arguments may become options and the handling of conflicts might change dramatically.BUGSPlease submit bug reports to the CPAN bug tracker at <http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Mediawiki-Client>.DISCUSSIONThere 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 ALSOMediawiki<http://www.wikimedia.org|Mediawiki>CVShttp://www.cvs.orgAUTHORS
COPYRIGHT© Copyright 2004-2005, Mark JaroskiThis program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. POD ERRORSHey! The above document had some coding errors, which are explained below:
Visit the GSP FreeBSD Man Page Interface. |