John Beckett wrote:
Sebastian Menge wrote:
Find the list (95 entries) here:
http://scratchpad.wikia.com/wiki/Errornames

Thanks for the good start.
FYI there are a couple of lines with broken links:
157 160: 171: Do you know the "g/" and "g?" commands?

Above gives:
 Vim Online Error
 Couldn't find tip 160. Are you sure it exists?

Im not sure howto proceed here. Should we
a) find better titles before the import

Yes! In option (b), you have to change every '/' to '__OR__', so
you may as well change the titles to something good now.

Can you readily do something like this: Put each tip in a
separate file on your disk. Name them tip0001, tip0002, etc.

Put the list of 1500 tip titles in one file, one title per
line. Then edit that file to clean up the titles. Then run a
script to rename each tip to match the cleaned-up title.

or
b) replace '/' by sth like '__OR__' and fix the whole
   title later?

Whatever works, but wouldn't this create a whole bunch of
problems? I don't understand the internals of wikis but I think
your suggestion would create 95 tips with URLs that will later
need to be manually edited. Not so easy, and probably involves
copying the content from the wiki to a new page, then deleting
the old page (I guess).
[...]

This is where my redirect suggestion comes into play (assuming wiki software compatible to that used at ??.wikipedia.org):

First pass: migration proper.
For each tip, create *two* wiki pages:
- one page with the tip text and a "real" title, possibly "doctored" as shown above - one page titled "Vim tip 1" "Vim tip 2" etc. (url ending in .../Vim_tip_1 etc.) with only a redirect, as follows:

(url=something/Vim_tip_1)
#REDIRECT [[The super star]]

During this first pass, any link vimtip#3456 gets translated to [[Vim tip 3456]] pointing to the redirect page for the link pointed to. At this time the "actual" name of the link pointed to doesn't have to be known, and in the case of forward comments it _won't_ yet be known.

Second pass (after all tips have been migrated and the wiki software has had the time to cycle and reconstruct its indexes)

For each redirect page: open it with ?noredirect and get the corresponding "What points here" page, as delivered by the wiki software. Change links pointing to the redirect into links pointing to the (now known) "actual" page title. IIUC this can be done by a "robot" (i.e., a script, not a human).


Best regards,
Tony.
--
If you're not very clever you should be conciliatory.
                -- Benjamin Disraeli

Reply via email to