On Wednesday, March 25, 2015 at 10:08:34 PM UTC-7, AlexHough wrote:
>
> Richard
>
> nevertheless..... great effort.... and I think the important thing here is 
> the technique used to get the information into a TW.
>
> Eric, did you use a similar method?
>

It's been quite a while since I built that TW document, but as I recall, I 
started from
   http://shakespeare.mit.edu/
(as noted in the title of the document).  Then, I picked a play.. say 
"Hamlet":
   http://shakespeare.mit.edu/hamlet/
and then downloaded the "full play" (from the link on that page):
   http://shakespeare.mit.edu/hamlet/full.html

The HTML on that page is in a very consistent format, like this:
<H3>ACT I</h3>
<h3>SCENE I. Elsinore. A platform before the castle.</h3>
<p><blockquote><i>FRANCISCO at his post. Enter to him BERNARDO
</i></blockquote>

<A NAME=speech1><b>BERNARDO</b></a>
<blockquote>
<A NAME=1.1.1>Who's there?</A><br>
</blockquote>

<A NAME=speech2><b>FRANCISCO</b></a>
<blockquote>
<A NAME=1.1.2>Nay, answer me: stand, and unfold yourself.</A><br>
</blockquote>

I then used some simple regex matches to split the HTML source into 
separate Act/Scene tiddlers, e.g.,
   [[Hamlet 1.1]]
each tagged with "scene" and the play name (i.e., "hamlet").  Then, I 
applied another few regex matches to convert the dialog within each scene 
from HTML to TW wiki syntax, where:
   <H3>...</H3> becomes "!!!..."
   <i>...</i> becomes {{dir{...}}}
   <A NAME="speech..."> becomes {{who{...}}}
and 
   <A NAME="1.2.3"> becomes {{ASL 1_2_3{...}}}

!!!Elsinore. A platform before the castle
{{dir{FRANCISCO at his post. Enter to him BERNARDO}}}
{{who{BERNARDO}}}
{{ASL 1_1_1{Who's there?}}}
{{who{FRANCISCO}}}
{{ASL 1_1_2{Nay, answer me: stand, and unfold yourself.}}}
(note "ASL" stands for "Act/Scene/Line"... not "Age/Sex/Location" or 
"American Sign Language"!!!)

I then added some StyleSheet CSS classes for .dir, .who, and .ASL to 
display the dialog and stage directions in a "readable script" format

To show the whole play, I wrote a small "transclusion script", that finds 
all tiddler tagged with the play name and "scene", and then generates a 
<<slider>> for each, so that each Act/Scene tiddler is shown as a "Scene N: 
..." heading, with the scene content revealed when the slider is clicked.

I also used my CommentPlugin/DiscussionPlugin addons to provide two tabs 
for each play: "Page" and "Discussion", so that the reader of the document 
could add their own "study notes".

The Sonnets are done a little differently.  Each Sonnet is stored in a 
separate tiddler, tagged with "sonnet".  I then used my FAQViewerPlugin to 
provide an interactive interface for viewing the sonnets, with next/prev 
navigation as well as an integrated text search function (e.g., search for 
"rose") that filters the list of sonnets, so you can easily flip through 
the matching sonnets to compare the use of the search term in each.

The rest of the document is just my usual TiddlyTools-enhanced TWClassic 
document with things like GotoPlugin and a StoryMenu with popup lists of 
the plays and sonnets.


enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

"Inside TiddlyWiki: The Missing Manual"
https://www.indiegogo.com/projects/inside-tiddlywiki-the-missing-manual/x/8816263
Note: the IndieGogo funding campaign has ended,
but direct fundraising continues below...

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to