Journal
 

Tuesday, September 19, 2017

Sing Your Heart Out at BigBadCon

I'm pretty excited that Jamey Harvey is running my karaoke freeform LARP about the heartaches of a band of singing misfits at BigBadCon.

Anyone else want to run the game? I'll send it to you... :-)

Comments (0)   permalink

Wednesday, September 6, 2017

Bits of writing geekery...

I was rooting around old drafts of The Unraveling today (which is still making the rounds; I am sprucing it up a bit further because reasons), and happened upon a lovely bit of cat-vacuuming: a Perl script to pull out, and highlight, every instance of a time-word in the text. I guess I was realizing that the various references to mealtimes and mornings and afternoons didn't add up, and wondering over how many actual days the principal action of the novel took place. And once you have a hundred-thousand-word blob of text, it's harder than you might think to answer such continuity questions for yourself. This probably took twenty minutes to write and, I vaguely recall, actually proved pretty useful. Here it is in all its hairy, undocumented, unrefactored glory, radiating shameless geekitude.

#!/usr/bin/perl

my @words = ("kitchen", "dining", "breakfast", "lunch", "dinner", "supper", "morning", "afternoon", "evening");

system ("echo > word.usages");

foreach my $w (@words) {
    my $cmd = "grep -ni '$w' >> word.usages";
    print "about to do: $cmd \n";
	system($cmd);
    print "processed $w\n";
}

open (IN, '< word.usages') or die 'could not open word.usages';
open OUT, '> word.usages.out';

while () {
	#todo do this with uppercasing, etc
	s/morning/\*\*MORNING\*\*/g;
    s/afternoon/\*\*AFTERNOON\*\*/g;
    s/evening/\*\*EVENING\*\*/g;
    s/breakfast/\*\*BREAKFAST\*\*/g;
    s/lunch/\*\*LUNCH\*\*/g;
    s/dinner/\*\*DINNER\*\*/g;
    s/supper/\*\*SUPPER\*\*/g;
    print OUT;
    print ">";
}
close IN;
close OUT;

system "sort -n word.usages.out | uniq > times-of-day.report"
Comments (0)   permalink