User:G.Hagedorn/Chromis abyssis

THIS PAGE IS A COPY AS A TEMPLATE FOR TESTING - please do not delete for a while

Wikipedia: http://en.wikipedia.org/wiki/Chromis_abyssus
 * Same species from plazi: http://plazi2.cs.umb.edu/GgServer/html?30E2ACE97FCC02A34806994547F8E1F5

Todo: Chromis earina
 * Same species from plazi: http://plazi2.cs.umb.edu/GgServer/html?736FA380AD05323C45BA7EA1F2660249

Todo: Anochetus boltoni
 * Same species from plazi: http://plazi2.cs.umb.edu/GgServer/html?8AD0DAEF2180649D27DBA7CE08E4FF93

-

=Cooking recipe for a Wikipedia species page (stub)=

Page Name
First verify the page does not exist in the target wiki: Check for a page with the scientific name, using the wiki API (see http://www.mediawiki.org/wiki/API). For "Chromis abyssus" you search for (use scientific name without authors, replace blank with underscore): http://en.wikipedia.org/w/api.php?action=query&titles=Chromis_abyssus - the result indicates it exists (id is present). For http://en.wikipedia.org/w/api.php?action=query&titles=Chromis_earina the result indicates no such page exists.

If not existing, it is desirable to upload a stub.

G.Sautter: The XML-based check for the pre-existence of the article seems to be simple. But how does uploading a stub work? If it involves clicking a series of buttons or following a sequene of generated links, it's going to be some effort ...

Page HEADER (taxobox)
The page should start with an expression indicating that the title should be italicized (it is also possible to have more complex expressions for mixed formatting)

followed by a Taxobox with structured information. Taxobox is a flat structure with 135 properties (called "parameters" in mediawiki). It is documented on: http://en.wikipedia.org/wiki/Wikipedia:TAXOBOX

TODO: we need to map the plazi information to the following overview:

PLEASE ADD THE xml elements, e.g. as xpath, or anything suitable to be used in the creation of xslt in the following list. I have loosely marked some elements, without deciding how to reference them in the plazi xml.

Text stub
Every wikipedia article needs, in addition to to the taxobox, at least an introductory sentence. In the following, I use the convention to show the variable insertions:

() is a  of  first >> OPTIONALLY IF KNOWN: discovered in 1997 and << described in.

Examples for references:

QUESTION: can we also generate something very brief like: "The 8 centimetres (3.1 in) fish only lives more than 110 metres (361 ft) below the surface of the Pacific Ocean around the coast of the Ngemelis Islands, Palau. Adults have been observed living singly or in pairs whereas juveniles tend to live in groups." ?

G.Sautter: such a summary would be very nice to have. I'm afraid, through, that it is hard to generate automatically ... automated text summarization has not progressed far enough (to my best knowledge) to use it here, as its results would likely be embarrassing and therefore jeopardize our efforts going public. The only two ways to have a summary are to either (a) extract it literally from the treatment, meaning we have only a summary if the treatment contains one, or (b) write it manually, which would be way too much effort for all the treatments we have.

DA I think, we might be able to so, or at least we should aim at being able to. If we mark up to MC we then could (Guido tell me, whether this is something we can do) extract at least the information of the country of occurence, and we should be able to say, when the type has been collected. So we could create a statement like this

"This species has been discovered by UUUU (the author of the paper, or better the one listed in the nomenclature section) in yyyy (the year of the publication) from specimens collected in xxxx (the year from the type specimen). It is known to occur from ZZZZ, ZZZZ, ZZZZ (country where it occurs)." Then I link to the reference at the bottom of the page could be added. From there a link to a place where the original publication is available.

This would be again a motivation to mark up at least to Materials Citation and get the country as well as the type information marked up.

Original description
Create a new heading and introductory note such as:

== Original description == The following description is cited from the original species publication:

Insert the original description from Plazi.

== Etymology == The name of the species is derived as follows::

Insert the information from Plazi.

DA the question here is whether we want to include the entire treatment, or only part of. May be we should not list the materials citation that would make the treatement very long. Since we will have a link back to Plazi or the original description, this is not neeed. In most publictions, there is a summary of the distribution we normally mark up as subsubsection "distribution".

References, links, categories
Insert ==References== == External links == *  *   * ANY FURTHER LINKS: AQUATAB.NET

and one of:

-

QUESTION: Anything more that you know is present and valuable in Plazi, but has not found a place yet?


 * G.Sautter: how about a distribution map plotted from materials citations? Colorful images would surely beef up the appearance of our articles ...


 * Gregor: Good idea, but that would require uploading the generated bitmap of svg to wikimedia.commons.org - it is an extra step.

Submitting the generated wiki-code
It is possible to submit wiki pages both through the index.php and the api.php. The first would simulate a standard edit form, the second would use a more advanced xml syntax (xml for the wrapper, the edited/uploaded content is still plain text with wiki markup). I assume api.php is more suitable to us.

There is one catch: before being able to write to the wiki, one has not only to sign in, but also obtain a so-called edit token which is valid for the duration of the session. This is done so that it is impossible to trick users that are currently logged in in a second window, with a simulated form to do ugly things on wiki.

So the process is approximately the following:
 * Do a login: http://www.mediawiki.org/wiki/API:Login
 * Obtain an edit token: http://www.mediawiki.org/wiki/API:Edit_-_Create%26Edit_pages, api request like: http://en.wikipedia.org/w/api.php?action=query&prop=info|revisions&intoken=edit&titles=Main%20Page
 * Send the new page (Create and Edit again). Note that there is no difference between updating a page and creating a new one - so it is important to have checked prior that the page does not exist yet.

For Java code to handle this, see Bliki, http://www.mediawiki.org/wiki/API:Client_Code#Java