Hi. I'm Robth on en Wikipedia.

Over here, I'm working on uploading and formatting ancient texts. Particularly in the case of historical texts, Wikipedia and Wikisource have a great deal to offer each other; Wikisource can provide texts formatted for optimum utility in citation, while Wikipedia can provide tremendously thorough cross-referencing--every important person, place, and event in a wikisource text linked to a good, thorough article on Wikipedia. I'm hoping to make Xenophon's Hellenica and the associated articles over on Wikipedia into the first example of how this can work.

Robth's guide to preparing Gutenberg classical texts edit

First replace all cases of "\r\n " with a " ".

Then run the following regex search/replace:

  • Find
(\[\d+\])((?:.|\r|\n)+)\1 (.*)
  • Replace
<ref>$3</ref>$2

Then do this search-replace:

  • Find
([^\r\n])\r\n([^\r\n])
  • Replace
$1 $2

Then insert the line numbers; 12like this, right before the first word of the line.

Then run the following regex search/replace:

  • Find
([\.\n:>";?,]\s?\s?)(\d+)([qwertyuiopasdfghjkl"zxcvbnm])
  • Replace
$1{{verse|chapter=REMEMBER TO PUT THE ACTUAL CHAPTER NUMBER IN HERE|verse=$2}}$3

Wasn't that fun?

regex help

For stripping out links edit

\*([\w\s\(\)\|]*) (.*) \*\1