On Sep 20, 12:39 am, Stefano Crocco <stefano.cro... / alice.it> wrote:
> Alle mercoled19 settembre 2007, Dan George ha scritto:
>
> > CATEG being another line inside the text files... and the problem
> > might be because the Name-line isn't always above the Link-line. I
> > could have n lines between or below, what I'm trying to say is that I
> > don't know where the Name-line is inside the texts files.
>
> This changes everything. I assumed (according to the example lines you posted)
> that each Link-line had the corresponding Name-line above it. But, if there
> isn't a relation between the position of the two kind of lines, how can you
> know what to put in the link line? I mean, what is the relation which
> connects a Link-line and the corresponding Name-line? Since (from what you
> say now) the position of the two kind of lines are random (as far as this
> problem is concerned, at any rate) are you able, given a single Link-line, to
> understand which is the corresponding Name-line? If yes, how? Whithout
> knowing this, I can't help you.
>
> Stefano

All I can say is that in each text file there will only be one Name-
line and one Link-line. The only connection between this 2 lines is
that the Link uses the shorter version of what is written in the Name-
line (i.e. if the Name-line: New York the Link line will use NY)

Isn't it possible to read the Name-line, take the correspond value
from the YAML file, store it in a variable (string?) inside the code
and then use it in the Link-line, when going to the next text file
read again the Name-line and take the value from YAML and so on...