Jump to content

Zot spot

  • entries
  • comments
  • views

Fiddling's fun!



Not productive, mind, but fun.


Being a Computer Geek in real life, when I did up the new layout for Wild Life, I wanted it simple to splat out new chapters without me having to fiddle much with the generated HTML, while still having it look good.


The looking good bit was tricky (and it turns out that IE7 has a busted CSS box model, so my outdented chapter tabs didn't work, dammit! No tabs for you, IE users!). I knew what I wanted it to look like, but I've never done any CSS work, so it was a bit of a challenge to get going. Luckily what I wanted was actually doable (well, except in IE) so I'm happy.


That, of course, led to managing the actual content. Up until now I've been writing in Word, saving as HTML, and running the result through a perl program to strip out the crud. Then there was some hand-editing (with a 20% error rate, alas) to patch it up and send it out.


Needless to say... yech.


I didn't want that for Wild Life, so after the CSS got nailed I wrote some PHP to generate the boilerplate HTML, which led to some PHP to handle the overall page generation, which led to some more restructuring, which left me with a nicely data-driven set of pages. You can't see it, but the main PHP code for the Wild Life pages is entirely generic -- the body is in a separate data file, and there's a file with the chapter numbers in it, so uploading a new chapter's a matter of changing that chapter file, sending up the actual new page data file, and cloning the main php file to a new one. (I could do it with a single PHP file with a ?chapter=whatever tail, but I think that's icky looking) All the existing pages get the new chapter numbers on their side tabs, and it's good.


It's all nicely automatic, and since the html that Scrivener generates is pretty clean, it doesn't even need much post-processing, and I can do all the post-processing with a little program. That's cool, fewer things for me to make whoopses with.


Getting Wild Life spiffed up like this, of course, meant cleaning up the short stories, which meant more PHP fiddling (No easy grouping by filename), as well as a bit of messing around with redirects in meta tags so the old URLs still worked if anyone had them bookmarked. Simple enough.


Since consistency is a nice thing, I did the same thing to Yankee, and after a few rounds of genericizing the code the actual PHP for Yankee and Wild Life chapters are identical. They share all the library files, all the main PHP pages are the same (just copies of one another with different filenames), with the only difference being the data -- stylesheets, chapter lists, and chapter contents. As it should be. The index page doesn't auto-generate yet, but I probably ought to tackle that, as soon as I figure out what its style should look like.


That's where I should've stopped, of course.


The trouble here is that to check things out I have to do a quick scan of the text to check for bad characters -- untranslated em dashes, smart quotes, elipses, and suchlike stuff. There was also some screwed-up parts of the text, words missing, bad punctuation, and mis-spellings. Scanning leads to reading, and reading leads to wincing, and, well...


I should've stopped. Really.


Yankee was my first novel, and while it isn't horrid, it has some issues. The style's inconsistent in spots, Justin's Asperger's isn't handled properly everywhere, the word choices are awkward some places, and the last two chapters are a bit phoned in. I'd leave it alone, but I'm supposed to write its sequel, so I feel the need to fiddle.


So... now I have the whole thing, all sixteen chapters, pulled into Scrivener, ready for rewrite. It should, hopefully, be fast enough to do. Couple of weeks end to end, and I think I'll pull the old chapters down (or off the index page, at least) while I re-release the updated version. That should segue into Carpe Diem's release, though that won't be done nearly so fast.


I am so going to owe Joe for web whacking above and beyond the call 'o duty when this is all done...


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Our Privacy Policy can be found here: Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..