elfs: (Default)
[personal profile] elfs
There are two programs that run most of my story website. They're uncreatively named storyengine and narrator. Storyengine takes source code from a collection of series (right now these are: The Journal Entries, Aimee, Bloody Beth, and Other Tales) and ball them up into an archive ready to be deployed to the web. My stories start as plain text in my Documents folder (unlike Windows weenies, we Linux men and women rarely prefix our directories with that narcissistic and infantile "we"), in the "plain text" flavor of the day: I started out in a Usenet-flavored syntax, morphed into AFT (Almost Free Text), and now use Emacs-Muse for most of my writing. Muse is well-supported and easy to understand, and it has the four basic faces I need: blockquote, italics, boldface, and texttype. When I'm ready to add a story to the database, I run it through a small python program called etxttoxml which converts my scribblings into an XML document and gives it a header that looks like this:

<story> 
<meta> 
<title>Nymphs In November</title> 
<commentid></commentid> 
<pubdate>13911</pubdate> 
<wordcount>7541</wordcount> 
<cookie>XX</cookie> 
<arc>The Mystical Treefort</arc> 
<summary>Jack and Annie go to Sicily to meet Sappho</summary> 
<wikipage>n/a</wikipage> 
<storycodes>n/a</storycodes> 
</meta> 
<body>


The rest of the document is elided. It's HTML. Some of these fields aren't used, like commentid, which was meant at the time to link to a forum database entry for that story in specific. I doubt I'll ever get the kind of readership that XKCD gets so I've never implemented the forum. Pubdate is the number of days (not seconds) since January 1st, 1970.

So, right now the bulk of the database is "stories," with "arcs" and "series" as the heavy metadata. Series have stories, and some stories belong to arcs.

I'm starting to think I need a rails program just to keep track of what the heck is going on in my stories database. I should be able to whip one up in a couple of hours, ne?

[A couple of hours later...] I am defeated. Rails 2.0 is way different from 1.2. So way different I can't even begin to figure out where the heck to go. You don't build controllers anymore; instead, you kind of summon them with a complete model and the migration in place, and no real power to adjust anything at first. It kinda sucks. I understand that it's a better model, David, but could we please have some documentation with it?

Anyway, at least it's coming along...

Date: 2008-06-16 04:31 am (UTC)
From: [identity profile] mg4h.livejournal.com
Umm, that broke my lj. I think you need a CR in there somewhere :(

Ouch?

Date: 2008-06-16 04:37 am (UTC)
From: [identity profile] moiety-tx.livejournal.com
What they said. Wraparound does not work on lines like that!

Date: 2008-06-16 05:28 am (UTC)
From: [identity profile] norikos-author.livejournal.com
May I suggest Merb instead of Rails? It may or may not be better documented (I've had very... hit and miss results with RoR documentation), but when you have to go digging into the source to figure out what's going on... well, that's it, actually. You _can_ figure out what's going on by looking at the source, without getting a migraine. The Merb stuff I've looked at made sense.

Plus, the merb folks are much friendlier in my experience (one of my first experiences with Rails involves the people on #ruby-on-rails telling me to 'go back to perl' when I was asking questions, and my _last_ experience with them involves them accusing me of "being all gimme-gimme-gimme" when I complained about the fact that the various configuration options are _completely undocumented_).

Rails

Date: 2008-06-16 11:29 pm (UTC)
From: [identity profile] cadetstar.livejournal.com
Mind you, I've primarily used Rails with MySQL -- I develop on a windows machine for deployment to either a Windows server (for internal projects) or a *nix server for general use projects (pretty sure it's Unix, but it's offsite so not sure).

I haven't had any problems with the coding side of Rails, once I got used to the 2.0 method. Basically, instead of generating a database file and then scaffolding off the database, you do it all at once.

However, I have gone back and modified the migrations files afterward to add additional columns and what-not. Just have to manually add them to the views and controllers to handle them. The only thing I'm arguing with at the moment is something to do with our server and not necessarily Rails itself.

I like it, but I'm a wimpy programmer.

-Michael

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 21st, 2026 07:21 pm
Powered by Dreamwidth Studios