Good practice is to have the measures before the meters. The file is read from top to bottom, so to have the data before you write out the graphics is nice.
On to the parsing.
Lets say we have a .txt file that looks like this:
Code: Select all
<Title>Title - Notes</Title>
<Notes>*Notes
*and
*stuff
</Notes>
Code: Select all
[PNotes]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=10
Url=file://path\to\notes.txt
RegExp="(?siU)<Title>(.*)</Title>.*<Notes>(.*)</Notes>"
[MTitle]
Measure=Plugin
Plugin=WebParser.dll
URL=[PNotes]
StringIndex=1
[MNotes]
Measure=Plugin
Plugin=WebParser.dll
URL=[PNotes]
StringIndex=2
Substitute="*":"·"
After PNotes you will see that we got 2 other measures. While PNotes gets us EVERYTHING we want, the other two divides our 'catches' to workable items.
In our regexp (.*) is telling us to get evertyhing it can. The first (.*) becomes StringIndex=1, the second is StringIndex=2 and so on. These we can link meter to and have the meter display it's data.
You might also notice that we got a substitute on MNotes. That substitutein is purely for aesthetics. I don't like the look of * in my notes, so I usually substitute it with · . I could write it out directly in the notes, but it's easier to write * instead of · several times.
That should help you on your way. :)