cdybedahl: (Default)
[personal profile] cdybedahl
A post by [livejournal.com profile] wisteria_ and the following discussion about the Random Pairing Generator gave me an idea that was just too silly not to implement: The Amazing Fanfic Mutator. You point it at a story on the web, and it'll change the character names in it! Xander/Spike turns into Lorne/Skip, or Lindsey/Gunn! Buffy/Faith turns into Glory/Fred or Joyce/Rona! Xena/Gabby becomes Alti/Ephiny! You will never have to be bored again!

The Mutator uses the same character database as the Pairing Generator, although it disregards all names with spaces in them (which, unfortunately, is almost the entire West Wing cast), so fic in any fandom mentioned there should work to some degree. The fandoms are listed on the Mutator page, so you don't have to look at the Pairing Generator to find out what they are.

The Mutator knows how to handle HTML and plain text. Pointing it at anything else (PDF, Word documents, morse code) will only result in an error message.

The Mutator adds a banner to the top of the result page saying that it has been modified, by what and where the original can be found. Just in case.

Feel free to pimp this as widely as you see fit. Comments, suggestions and bug reports are very welcome!

(no subject)

Date: 2004-03-31 03:27 am (UTC)
ext_6657: She solders!  With glasses! (woo yay!)
From: [identity profile] katemonkey.livejournal.com
The fact that the mutator turned my Wesley/Cordelia/Gunn story into Lindsey/Lilah/Riley has made my entire fucking day.

Heee!

(no subject)

Date: 2004-03-31 04:08 am (UTC)
From: [identity profile] faithtastic.livejournal.com
This is fantastic.

I love the random pairing generator too. I'm seriously considering writing the Buffybot/Xena it suggested...

(no subject)

Date: 2004-03-31 11:24 am (UTC)
ext_12692: (Default)
From: [identity profile] cdybedahl.livejournal.com
Please do. I can easily see how it'd be highly amusing.

(no subject)

Date: 2004-03-31 04:41 am (UTC)
From: [identity profile] angharad_gov.livejournal.com
i'm getting a sys error:

System error
error: empty XPath found at /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/XML/LibXML.pm line 593.
context:
...
589:
590:
591: sub findnodes {
592: my ($node, $xpath) = @_;
593: my @nodes = $node->_findnodes($xpath);
594: if (wantarray) {
595: return @nodes;
596: }
597: else {
...
code stack: /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/XML/LibXML.pm:593
/usr/local/lib/perl5/site_perl/5.8.3/Cyberpomo.pm:680
/opt/cyberpomo/pages/mutator/mutate:10

when i try this url:
http://home.earthlink.net/~angharadgovernal/likeuntolove.htm

the html on that page may be malformed, though. dreamweaver + office xp word = headaches galore.

(no subject)

Date: 2004-03-31 05:22 am (UTC)
ext_12692: (Default)
From: [identity profile] cdybedahl.livejournal.com
Your guess is exactly right. The cryptic error message means that my script failed to find a single text node in the entire document. The reason it didn't is because it hit an error it couldn't handle in the HTML and stopped parsing pretty early on. A close look at the HTML reveals that there is a closing span tag on line 48, but there isn't a single opening span tag in the entire document. There may be more similar problems later on in the file, but that's the one the script choked on this time. There's not much I can do about such errors in general except improve the error message, which I will do.

Thanks for a useful problem report!

Profile

cdybedahl: (Default)cdybedahl

July 2021

S M T W T F S
    123
45678910
11121314151617
1819 2021222324
25262728293031

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 20th, 2026 03:43 am
Powered by Dreamwidth Studios