User:Cyde/Ref converter
From Wikipedia, the free encyclopedia
Click here to run References converter OR click here to get a list of links to process
This converts articles that use the old {{ref}} and {{note}} system into the new <references /> system. See also Wikipedia:Footnotes for more information.
This program is accessible from your web browser and runs on the site's server from across the Internet. Go to the site, type in the name of a page, press "Go", copy the resulting Wiki code, click the link to go back to Wikipedia, and paste the Wiki code back over the article source. The edit summary will be automatically filled in. Then press the "Show changes" button to make sure everything is all right, and if it is, press "Save page" to commit the changes. If everything isn't all right, go ahead and fix it manually and post a summary of the error on the talk page. Ref converter has about a 90% fully automatic success rate.
Depending on your system configuration, the edit summary may or may not be filled in automatically. If it is not, consider using an edit summary similar to the following:
- Updating reference styles with [[User:Cyde/Ref converter|Ref converter]]
Contents |
Technical issues
- (10:26, 27 October 2006 (UTC):) The ref convertor doesn't parse the "&" sign when used in article titles, feed the convertor with such sign manually replaced by "%26", that is what the "&" sign is converted to in URL address field of your browser. (see User talk:Cyde/Ref converter#An article which doesn't work for a discussion of this issue).
Details
This program converts properly formatted reference notes in the old system into the new Cite.php system. It will run perfectly fine on perfect pages, however, not all pages are perfect. Some pages have note text without a corresponding reference in the body of the article. Some references don't have corresponding notes. Some references and notes are misspelled. Some misuse the syntax that allows multiple refs per note. It can get very ugly out there so be sure to validate the output of the program using the "Show changes" button, before saving. This small step minimizes conflict with other editors and helps preserve the article.
References missing a corresponding note will be turned into {{fact}}. Notes missing a corresponding reference will be commented out. Note labels (previously necessary to allow multiple refs per note) will be deleted. Comments on how to make references using the old system will be removed. Multiline cite templates will be condensed down to a single line to allow them to be inlined into the article text.
This program is released under the GPL. If you have a strong desire to help with the programming of ref converter (and possible conversion to performing other tasks once all references are converted), I can set you up with CVS access. Just contact me.
Caution
Converting numbered footnotes
While the use of this program has been mostly non-controversial so far, objections to its use have been raised with regard to a few articles, including those listed below. Therefore, please check the history and/or the talk page of articles prior to converting them. If prior conversion attempts have been controversial, please seek to find consensus for conversion on those articles' talk pages first and add the article to the following list until consensus for conversion has been established.
- Talk:Macedonian language#New reference style
- Talk:Machine_translation#Footnotes
- Leprechaun
- Post-invasion_Iraq,_2003–2006
- World_War_II_casualties
- ASCII
- Canadian Football League
Pages using both systems to separate footnotes from citations:
Converting references within Templates
Be wary about converting references within Templates. There is a bug either in mediawiki or the Ref/References extension that can cause issues on the page the template is included from. The reference mark will be created and properly numbered, but the corresponding reference will be missing when the <references />
is outputed on the calling page. If <references />
is included within the template itself, then references from both the template and the main page will be outputed (which likely isn't what was intended either).
Converting Harvard references
Ref converter also allows the conversion of Harvard references, but this is not necessarily recommended, or even desired, in many circumstances. Harvard referencing is a citation system favored by many academics and has a different format: rather than displaying a footnote number inline, it displays an author name and publication year in round brackets after the sentence. These author-date citations are accompanied by a list of full citations in alphabetical order in a References section at the end of the page.
Please evaluate carefully whether the article will benefit from being converted from Harvard referencing to numbered footnotes - and check the article's talk page to see whether the issue has already been discussed. WP:CITE is the relevant guideline, particularily the section How to cite sources.
Changing Harvard referencing to numbered footnotes is in many cases controversial. Not so for changing well-formed numbered footnotes-by-templates to cite.php numbered footnotes, which isn't even a style change. Such change of one system of numbered footnotes to another would only be visible in edit mode: it is implementing a different technology for realising the same style of numbered footnotes.
Spamlist
Sign this list with a link to your user talk page – [[User talk:yourname|yourname]]
– to be notified of updates to the Ref converter. Frequent users of Ref converter will be added to this spamlist whether they like it or not.
- Bookofjude
- Davidpk212
- Lar
- Jacoplane
- Asterion
- JesseW
- Ganeshk
- mboverload
- MPerel
- Sandstein
- CJLL Wright
- SEWilco
- Michiel Sikma
- Kylu
- Admrboltz
- Bryan Derksen
- Johntex
- KelleyCook
- Mellery
- Schutz
- Esprit15d
- Schuminweb
- balloonuy
- Geo Swan
- Rpresser
- Twas Now
- ST47
- Java7837
- ukexpat
Foreign languages
I am willing to help get Ref converter up and running on foreign language Wikipedias. Please contact me.
Statistics on usage
- As of 17:04, 10 October 2006 (UTC), Special:Whatlinkshere/Template:Ref has 8957 transcluding pages.
- As of 10:19, 15 December 2006 (UTC), Special:Whatlinkshere/Template:Ref has 8659 pages, of which some percentage are transcluded.
- As of 00:46, 28 February 2007 (UTC), Special:Whatlinkshere/Template:Ref has 9615 pages transcluded.
- As of 23:42, 10 May 2007 (UTC), Special:Whatlinkshere/Template:Ref shows 10,424.
- As of 06:33, 15 February 2008 (UTC), according to API.php we have 6856 still to do.
- As of 22:09, 7 April 2008 (UTC), per API.php, there are 6723. (-133 or 2% of the remaining ones)