NewsRandomizer script for SOMEONE COMES TO TOWNDavid Wallace Jackson wrote a script that randomly changes the names of the characters in my 2005 Tor Books novel Someone Comes to Town, Someone Leaves Town -- a book in which the characters' names fluctuate, with only their first initials remaining constant. It's an absolutely delightful idea! Someone Comes to Town, Someone Leaves Town (remix) 4 Responses to “Randomizer script for SOMEONE COMES TO TOWN”Leave a Reply
|
|
|
Cory Doctorow’s craphound.com is proudly powered by
WordPress
|
|
That's pretty sweet, the only suggestion I could make is to not have the names repeat on the same page.
This would be a great feature for an ebook on my still–incapable epaper device.
[...] Cory Doctorow’s craphound.com Randomizer script for SOMEONE COMES TO TOWN David Jackson Wallace wrote a script that randomly changes the names of the characters in Cory Doctorow#039;s novel Someone Comes to Town, Someone Leaves Town - a book in which the characters#039; names fluctuate, with only their first initials remaining constant. [...]
Very funky. Am intrigued to know whether the contents of someone.html that has all of the occurrences of the points where a name should be used replaced with tags like <alan> was generated automatically or if it involved a manual sweep to deal with situations where auto-detecting names got confused.
(resubmitted comment with escaped < around alan)
@Alex: A little of both, actually. I used Notepad++'s regex search function to scan for words beginning with a capital A, B, C, etc. Every time I hit one that was a name, I replaced it with a tag -- for names that seemed common, I did a find and replace for all instances. This did cause a few problems -- for instance, Davenport's name got caught with my find and replace for "Dave" -- so, in order to fix it, I did another regex sweep for tags with letters immediately following them (i.e. "[a-z]"). The only other problem I found was "property of Freddy Terazzo" (where "Freddy" got caught by a find-and-replace). Once I was done, I just copy-pasted in the HTML for the beginning of the book (before Alan introduces himself) from the original document.
@eagleapex: Oddly enough, I considered teaching the script to deliberately repeat names for consistency (as the original text frequently uses one name for a few instances, then switches) but decided against it because I couldn't think of any hard and fast rules that would make sense -- sometimes the book uses a name for a few paragraphs, and sometimes only once. It's funny, but I never actually thought about the other problem (names repeating when they shouldn't). I could probably fix that, though the idea of defining a "page" in this context is a little tricky...