Taught this system in about 15 minutes to my cousin Melanie (high school freshman working on her first Big Paper for history; it's something about People with Swords in Ancient China, so I'm totally reading it when she's done) this afternoon and realized I'd never written it down, so here goes: this is how I've taken reading notes and written papers since I was in high school. I'm also writing this in part to prove that the terminal is useful for things other than writing code, because I did not know how to code when I started doing this.

My system is largely predicated on the assumption that I am a Lazy Bum, and basically involves 4 tools: cat, grep, | (pipes), and flat text files. These are standard Unix tools, and I've never seen a Linux distro without them; Melanie and I already run Fedora, so we were all set.

I grab the text of books when possible (mm, Project Gutenberg) and take advantage of the fact that my computer can read faster than I can. For instance, for history my Junior year of high school, I had to write some paper about the Judeo-Christian belief system. I forget the exact topic now, but let's imagine wanted to grab out some nice quotes about the symbolic use of... say, swords. I like swords. So I download bible.txt, and...

cat king-james-bible.txt| grep -C 1 sword | less

In English, this means "send (concatenate) the text of the bible through a filter (global regular expression print) that looks for the word 'sword' and shows the -Context of 1 line before and after it, then let me scroll through the results (less)." The results look something like this.

01:003:024 So he drove out the man; and he placed at the east of the
garden of Eden Cherubims, and a flaming sword which turned
every way, to keep the way of the tree of life.
--

01:027:040 And by thy sword shalt thou live, and shalt serve thy brother;
and it shall come to pass when thou shalt have the dominion,
--
stolen away unawares to me, and carried away my daughters, as
captives taken with the sword?

--
that two of the sons of Jacob, Simeon and Levi, Dinah's
brethren, took each man his sword, and came upon the city
boldly, and slew all the males.

And so on. Instant sworditude, much faster than actually reading the whole darn book (or Book, in this case).

For those looking for a more powerful alternative to grep, try ack. (The website URL is pretty accurate.) I was introduced to ack at TOPP and have never looked back; the main advantage is how easy it is to deploy ack on huge trees of folders swarming with text (or code) files, meaning that you could, instead of just looking in the King James Bible, deploy the above search for swords in every note you've ever taken on every book you've ever read. Assuming those notes are textfiles dumped somewhere underneath the folder you're searching in, I mean. It's made fascinating connections between long-ago reads I never would have thought of on my own, and my papers in college were much improved by it.

I also take my reading notes in flat text files as I go through books. Those textfiles look something like this:

Arnold, Bennett. How to Live on 24 Hours a Day. New York: Shambling Gate, 2000. Print.

P: (5) Lay out things for tea at night so you can make tea in the morning as a nice wake-up call.
Q: (5) [breakfast] The proper, wise balancing of one's whole life may depend upon the feasibility of a cup of tea at an unusual hour.
N: Hilarious writing style. Read this book whenever the need for British wit strikes.
?: (7) Was this before or after Taylorism?
N: (7-8) This program would only work in a highly literate population. Which I suppose the reader belongs to, as they're reading the book. But still.

Note a couple things.

  1. Full bibliography at the top so I never have to figure out the formatting for it again.
  2. Each note gets a new line, and begins with a letter code for the type of note it is: P for paraphrasing (summary), Q for quote, ? for a question I have, N for a note (my own thoughts), and some not shown here, like R for "reference to some other material I should look up later" (such as when one book cites another that I figure I should read).
  3. Optionally, page numbers appear in (parentheses) immediately after the note type.
  4. Super-optionally, tags appear in [brackets] after the page numbers, mostly when I want to be able to associate a quote with a word that's not in the quote, for ease of searching later.

Then I can make queries like "what were all the questions I had about this book?"

cat how-to-live-on-24-hours-a-day.txt | grep ?:

Or "what interesting stuff was on page 7?"

cat how-to-live-on-24-hours-a-day.txt | grep (7

And so forth.

Confession: I've fallen off the wagon and haven't taken notes like this since I left school. I'm trying to climb back on it again, as this sort of database is gloriously helpful to build. Particularly if one plans on doing lots of reading and writing of papers. Like, say, if one were to consider grad school.

I'm sure this system could be improved; I once had dreams of writing a GUI for it, but found this worksforme enough that I just never made one. There are probably better tools out there for it, there's probably a lot of regexp-fu I could pick up to do more powerful queries (in fact, this is one of the reasons why I know regular expressions at all), there's... well, you know what I'm about to say.

Patches welcome!