storylen
----------

author: Dino Morelli <dino@ui3.info>


*about*

storylen is a command-line utility that behaves very much like `wc
-w`. That is to say, it counts words in a file. This program takes that
count and reports what type of literary work it corresponds to. As in:
short story, novella, novel, and so on.

I read a lot of fiction and I've been actively trying to read as much of
it as possible on PDAs or similar portable devices for almost ten years
now. Over time, I've come to reject book formats that are encrypted or
otherwise consumer-unfriendly. This has gotten to the stage where I'm
most comfortable with books as plain text files.

At this point I have an impressive library of literary works and I
needed a way to quickly assess the size of a book when deciding what
to grab. It got to be tedious trying to guess from the size in bytes
reported by the filesystem.

storylen is written in Haskell and uses the Data.ByteString library. It's
known to work with GHC 6.6

Example of program output, showing how similar it is to wc:

    174372 novel         ArnasonEleanor-AWomanOfTheIronPeople_1991.txt
     76626 novel         BearGreg-Psychlone_1979.txt
      6073 short story   EllisonHarlan-IHaveNoMouth_1967.txt
     60596 novel         FantasyScienceFiction2007-02.txt
     72324 novel         HorneMarc-TokyoZero_2003.txt
      9156 novellette    KellyJamesPatrick-StandingInLineWithMisterJimmy_1991.txt
      1062 flash fiction PoeEdgarAllen-Raven.txt
     11616 novellette    RickertM-JourneyIntoTheKingdom_2006.txt
     14334 novellette    RuschKristineKathryn-Echea_1998.txt
     28990 novella       StrossCharles-TheConcreteJungle_2004.txt

From my brief research into the issue, I gathered there are arguments
over how exactly to word-count literature. The typing criteria from
the Wikipedia article: <http://en.wikipedia.org/wiki/Word_count> seemed
sufficient for my needs in this regard. And, as mentioned above, this
program is doing a literal word count of each file a-la `wc -w`


*install*

Build and install in the typical way for Cabalized software:

   $ runhaskell Setup.lhs configure
   $ runhaskell Setup.lhs build
   $ runhaskell Setup.lhs test
   $ runhaskell Setup.lhs install

A Debian .deb package is available for this project at its home page: http://ui3.info/d/proj/storylen.html

A Debian .deb package is available for this project at its home page: http://ui3.info/d/proj/storylen.html
