Go back to previous page
Forum URL: http://www.eyrie-productions.com/Forum/dcboard.cgi
Forum Name: General
Topic ID: 1361
Message ID: 0
#0, All Eyrie .TXT converted to .HTML, .EPUB, and .MOBI
Posted by dustinian on Jun-21-15 at 10:06 PM
LAST EDITED ON Jun-29-15 AT 03:46 PM (EDT)
 

TL;DR


I've converted all Eyrie Productions, Unlimited .TXT files into .HTML, then the .HTML to .EPUB and .MOBI. It is not perfect. I created this output with a script that needs some work (and I will keep working on it). But they're available here, as .ZIP files:

Background


Hoo, boy, I am jittery as I type this. I have been working on this off-and-on since this thread back in January 2012. Please don't judge too harshly... my daughter was born in February 2012.
I haven't kept up with this site like I used to. I hope nobody's already got any major work done with a .TXT to .HTML conversion. I did notice Gryphon was starting to post in .HTML, so I hope this means he'd be open to seeing some work on a conversion of the old material.
If there's already ongoing work, or if Gryphon wants to preserve the .TXT stories as-is, no biggie. My ultimate goal is to get the .HTML cleaned up so I can use Calibre to convert to .MOBI/.EPUB for my personal Kindle and Android tablets. But if Gryphon can use the .HTML work, I'm delighted to share it. I would love to "give back" to this site somehow.
I started "Warrior's Legacy" back in the mid-90s, and "Symphony of the Sword" almost tanked my first semester of college back in '99. I've sent Gryphon a few fan letters over the years (like 2 or 3 tops). These stories are some of my favorite to re-read, easily as re-readable as Sandy Mitchell's "Cain" books or Aaron Allson's "Wraith Squadron."

Methodology


You might ask: Why on Earth did this take him so long?
Well, I didn't just write a script to convert the .TXT to .HTML. First I created my own scripting language...

TTL: Text Transformation Language


TTL allows the user to write a script to transform text files, and then run that script from the command-line. The best place to read about it is GitHub. I keep the README file on GitHub quite up-to-date.

It's taken me most of the last 3-point-something years to get TTL stood up and error-free. I've made a big push on TTL in recent weeks (as you can see from the commit history on GitHub), and my wife very generously gave me this Father's Day (i.e. watched our daughter all day) so I could focus on this project.
BTW... In case you ask: "Good god, man, why didn't you just learn Regular Expressions?" Well... I tried that. I found spending 3 years writing my own scripting language easier... I think I have a mental block when it comes to Perl. Especially when dealing with the sleep deprivation that comes with an infant/toddler/preschooler.

Eyrie Script


So TTL can do any sort of script you write to any sort of ASCII file. But let me share the specific script I wrote for Eyrie files:

Help!


So if the .HTML isn't yet perfected, why am I posting this? I don't like posting incomplete stuff. But I've waited 3 years to post what I have. And what I have is pretty darn near complete: A totally working scripting language, a mostly-developed script, and legitimate output that at least gets all the paragraph tags mostly right to show for it.

Feedback


But now I need some feedback. What issues do you see with the HTML output? How can I get the script closer to "done" to minimize the hand-coding that'll need to take place?
Example: I can't figure out how to handle the "credits" at the beginning and end of each story in the script. Any thoughts?
Don't try to go edit a lot by hand. Just point out things you see consistently, and I'll try to script them across all the files.

Run it Yourself


If you read all this and you want to give TTL a shot, and you think after reading the GitHub documentation you can edit the script, then by all means! Here is a .ZIP file that contains:

  • All of all the .TXT files

  • The .EXE file

  • The .TTL script file

  • And a .BAT file that:

    • Runs the .TTL script in every folder

    • Copies the .TXT to .HTML

    • Deletes the .TXT


To edit the script, just edit the .TTL file. To run the script, just run the .BAT file.

Thank You


Long post, I know! Thank you for reading! And thanks in advance for any help you offer! Now that .TTL is up and running, I'm super excited to work on the script in my spare time.

Updates