[WikiEN-l] Newbie friendliness, markup hell, and editing structure

Magnus Manske magnusmanske at googlemail.com
Wed Mar 12 20:39:35 UTC 2008


On Tue, Mar 11, 2008 at 12:06 PM, Oldak Quill <oldakquill at gmail.com> wrote:
>  Great work. Would it be possible to adapt this into a tool to separate
>  the source of an article into: references and everything else?
>
>  Slightly different: would it be possible to have an editing interface
>  where tags of the form "<ref name="">{{template}}</ref>" in the body
>  are pulled out to a separate text box, leaving a token in the body
>  text (e.g. <ref name="" />)? Separating the content of these tags
>  would clean up the body when editing and the token left in the body
>  would indicate that there is a tag here and that it has this name (see
>  ref text box).

OK, I took the challenge. I integrated a reference management tool.
Works like this:
* It extracts all <ref></ref> tags from the text
* It replaces them with "<<REF1>>", "<<REF2>>", etc.
* These special tags are valid only during editing; upon preview,
diff, or save, they are replaced with the original
* This is /not/ done if the text already contains something like
"<<REFX>>" (X being any number), so it won't mess up texts
* It also does not touch "repeated refs" (<ref name="xyz"/>)

Below the normal text box, there is now a list box, one line per
reference, containing number, name (if set), and text of the
reference. You can
* select a line, and it will highlight the corresponding <<REF>> in
the text (no scrolling there yet; working on it)
* double-click the line, and edit name and text in a dialog
* select a reference and delete it

In the text boxes, you can
* select the <<REF>> tag (double-clicking it will do), and it shows
the corresponding reference in the list
* insert a new reference at the current position (name and text dialogs again)

I have taken care to "default to standard", that is, things will not
be changed (even temporarily) unless it's safe to do so.

Also, new screenshot, editing yesterday's article of the day, [[John
Knox]], with the reference management:
http://www.magnusmanske.de/wikipedia/less_page_clutter.png

Even in this huge, real-life example, the only changes the script
would do (as seen in a diff) are alphabetical reordering of language
links and categories.

Cheers,
Magnus



More information about the WikiEN-l mailing list