.

 

Code Features

Nice things about Ftrain that you may never have noticed before.

The Ftrain code, mostly by accident, has these exciting features:

  1. Allows for the creation of highly structured, linked narratives in fairly simple XML. Writing text for Web publication is easy for those who know HTML and the basic rules of XML.
  2. Organizes these narratives chronologically, automatically producing “most recent” views, as well as organizing things into larger, structured, multi-level narratives.
  3. Creates a pretty calendar.
  4. Has an, uh, integrated linking system that works nicely with your browser. If you see something you like, you click a button and a Javascript bookmarklet puts the right variables into a form; you then add a category and a description and it logs the link to an XML file. XSLT then sorts links by category and chronology, etc.
  5. Entirely written in vanilla XSLT sans extensions - the link CGI, and one command-line function that generates random numbers both require a little perl, but other than that it's clean as a whistle. It runs fine with SAXON and LibXSLT. XSLT is a fairly simple language and I've programmed everything by the book, using a functional rather than imperative style whenever possible (although I could do better). Nothing would stop it from running on Windows (it was developed on Linux).
  6. Produces totally vanilla HTML - nothing need be done on the server, although if you wanted to spit out PHP code from the XSLT for comment systems, or link things back to style sheets and the like, nothing is stopping you. If you run the XSL processor locally and then use rsync to copy the files, even with few hundred files you can usually upload all your changes in about a minute.
  7. On a 400 Mhz processor it takes 44 seconds to completely process 2.5 megs of nested XML, producing 725 or so linked files. Without the links, calendar, and random functions this is about 10-14 seconds. Thus you could churn the thing every ten minutes or hour with no harm done.


[Top]

Ftrain.com

PEEK

Ftrain.com is the website of Paul Ford and his pseudonyms. It is showing its age. I'm rewriting the code but it's taking some time.

FACEBOOK

There is a Facebook group.

TWITTER

You will regret following me on Twitter here.

EMAIL

Enter your email address:

A TinyLetter Email Newsletter

About the author: I've been running this website from 1997. For a living I write stories and essays, program computers, edit things, and help people launch online publications. (LinkedIn). I wrote a novel. I was an editor at Harper's Magazine for five years; then I was a Contributing Editor; now I am a free agent. I was also on NPR's All Things Considered for a while. I still write for The Morning News, and some other places.

If you have any questions for me, I am very accessible by email. You can email me at ford@ftrain.com and ask me things and I will try to answer. Especially if you want to clarify something or write something critical. I am glad to clarify things so that you can disagree more effectively.

POKE


Syndicate: RSS1.0, RSS2.0
Links: RSS1.0, RSS2.0

Contact

© 1974-2011 Paul Ford

Recent

Recent Offsite Work: Code and Prose. As a hobby I write. (January 14)

Rotary Dial. (August 21)

10 Timeframes. (June 20)

Facebook and Instagram: When Your Favorite App Sells Out. (April 10)

Why I Am Leaving the People of the Red Valley. (April 7)

Welcome to the Company. (September 21)

“Facebook and the Epiphanator: An End to Endings?”. Forgot to tell you about this. (July 20)

“The Age of Mechanical Reproduction”. An essay for TheMorningNews.org. (July 11)

Woods+. People call me a lot and say: What is this new thing? You're a nerd. Explain it immediately. (July 10)

Reading Tonight. Reading! (May 25)

Recorded Entertainment #2, by Paul Ford. (May 18)

Recorded Entertainment #1, by Paul Ford. (May 17)

Nanolaw with Daughter. Why privacy mattered. (May 16)

0h30m w/Photoshop, by Paul Ford. It's immediately clear to me now that I'm writing again that I need to come up with some new forms in order to have fun here—so that I can get a rhythm and know what I'm doing. One thing that works for me are time limits; pencils up, pencils down. So: Fridays, write for 30 minutes; edit for 20 minutes max; and go whip up some images if necessary, like the big crappy hand below that's all meaningful and evocative because it's retro and zoomed-in. Post it, and leave it alone. Can I do that every Friday? Yes! Will I? Maybe! But I crave that simple continuity. For today, for absolutely no reason other than that it came unbidden into my brain, the subject will be Photoshop. (Do we have a process? We have a process. It is 11:39 and...) (May 13)

That Shaggy Feeling. Soon, orphans. (May 12)

Antilunchism, by Paul Ford. Snack trams. (May 11)

Tickler File Forever, by Paul Ford. I'll have no one to blame but future me. (May 10)

Time's Inverted Index, by Paul Ford. (1) When robots write history we can get in trouble with our past selves. (2) Search-generated, "false" chrestomathies and the historical fallacy. (May 9)

Bantha Tracks. (May 5)

The Moral Superiority of the Streetcar. (1) Long-form journalism fixes everything. (2) The moral superiority of the streetcar. (3) I like big bus and I cannot lie. (May 4)

More...
Tables of Contents