String findTokens:?

Jimmie Houchin jhouchin at texoma.net
Tue Apr 22 20:08:08 UTC 2003


Hello,

I recently ripped a 62cd set into 1189 MP3s nicely done into only 997MBs. :)
*They are voice only, not music, so 32k mono was sufficient.

With WinAmp I created a playlist of all 1189 MP3s.
WinAmp encodes Time and Track Name on a comment line.
It is that data I wish to put into a collection.

A couple of questions.

First here's my code from a workspace.

| file fc ft t1 t2 oc |
t1 _ '#EXTINF:'.
t2 _ ',Alexander Scourby - '.
oc _ OrderedCollection Collection new.
file _ FileList2 modalFileSelector.
fc _ file contentsOfEntireFile.
file close.

ft _ fc findTokens: t1.
ft inspect.


Yes, I know, t2 and oc currently are unused.

1. I am creating a variable for the file contents and then discarding 
(closing) the file. Is that good form? Or would it be just as 
appropriate to assign the file contents into the file variable?

2. The statement ft _ fc findTokens: t1.  isn't doing what I want.
It is however, doing what it claims. :)
I only want the exact string '#EXTINF:' as a token. I do not want it 
broken down into characters as tokens.

    Is there a way to do such?
    I have tried a variety of things including 'asSymbol' unsuccessfully.

    If 'findTokens:' cannot be used as such, then I can find other ways 
to accomplish my task. I just wanted to find out since it seems like a 
nice way of doing it.


Not associated with the problem, but, can Squeak read/edit MP3 ID3 tags?
Is there an editor? If not I wouldn't mind writing one as I learn. But I 
don't know how to read the tags from the file yet.

Any help greatly appreciated.

Thanks.

Jimmie Houchin



More information about the Squeak-dev mailing list