Rohit
Since you have been so helpful, here is some material I'm writing up to document the structure of the data and the metadata, so I'll always understand the software
(* This is an attempt to write Mathematica software to manipulate the \
data (and metadata) found in file Cards 4550 to 4555 which is \
found in the following file
"/Users/lewisrobinson/Desktop/Hypercard Xref/ Cards 4550 to \
4555"
So I can write it back to a notebook in \
"/Users/lewisrobinson/Desktop/Hypercard Xref"
in a useable form *)
(* The most important thing is to understand how the data and \
metadata are structured in the file "Cards xxxx to yyyy".
That was done by a HyperCard program in the Xref Stack called \
AllCardInfo which I think is correct.
It basically separated text lines by carriage returns.
data =
Import [
"/Users/lewisrobinson/Desktop/Hypercard Xref/ \
Cards 4550 to 4555",
"lines" ] (* this gives the information in the text file as a list \
of strings in my variable called data. Note: "lines" is crucial *)
(* So here is the structure of Cards XXXX to YYYY
Line 1 is always "Total Number of Cards = 6", or someother positive \
integer (call it n)
The data for each card is stereotyped and will be described by
lcln# -- local card line number
lcln1 "Begin card "X2383901" ; always these 3 words
lcln2 "Card ID 2580879" ; always these 3 words
lcln3 always a single string Xref Title "Differential effect of \
a transcription factor"" in the case of the first card here Always a \
single string even if the card didn't have a title
lcln4 contains a string representing an integer -- the number of \
buttons always 1 or greater even if there are no buttons
lcln5 a pointer to the list of buttons
then multiply #buttons x 2 and add
to get to the number of topics
lcln? a string containing the number of topics
lcln?? a string containing the number of text lines
The last line in the dard is END card X2383901
*)