User:Johantheghost/Cite


 * Discussion: Wikipedia talk:Featured article candidates


 * Documentation: Cite/Cite.php

wp-refconvert.pl
I've written a perl helper script to automate the process of converting -style references to, where text is taken from the appropriate /.
 * Replaces the s with.

Assumptions:
 * All the s and s are consistent.
 * All the s are in a single block, numbered consecutively, with one and possibly multiple s per line.

Notes:
 * The script attempts to handle Unicode correctly, and should do as long as your perl system does. BUT make sure that when you cut-and-paste the text in and out of the edit buffer that the text doesn't get wrecked — Windows seems to take pleasure in doing this.  Bottom line, check before comitting the edit.  Make sure em dashes etc. are still OK.
 * The script attempts to output an error message if it finds any inconsistency; if you get a mismatch message, the script thinks that the s and s don't match. This is quite possible, due to the lack of checking in  /  .  Check them carefully.

Error messages:
 * can't open foo.txt : obvious.
 * can't create foo-new.txt : can't create the output file.
 * unknown reference style  : don't understand the reference tag.
 * note mismatch- ref 3=foo; note=bla : the third reference in the article was called foo, but the third note in the note list was called bla.
 * note number mismatch- seq = 4, explicit = 5 : a tag was found in line 4 in the note list (the number should match the position in the list).
 * unknown note style  : don't understand the note tag.
 * note mismatch- no ref 4 (foo) : note 4, named foo, was found, but there is no fourth reference.
 * ref mismatch- no ref 4 (foo) : reference 4, named foo, was found on pass 2, but not pass 1 (should never happen).