Page 1 of 1

(a usable) column from a note

PostPosted: Sun Jul 08, 2012 10:53 pm
by pasita
I can get the raw data from table notes to a column but how can I extract the stuff inside the <text> </text> section(s) , i.e 'test' in this case? If not extract then detect would do for now.
BTW don't you think you could have optimized the database usage a bit on this one?

"<?xml version="1.0" encoding="UTF-8"?>
<richtext version="1.0.0.0" xmlns="http://www.wxwidgets.org">
<paragraphlayout textcolor="#000000" fontsize="9" fontfamily="70" fontstyle="90" fontweight="90" fontunderlined="0" fontface="Segoe UI" alignment="1" parspacingafter="10" parspacingbefore="0" linespacing="10" margin-left="5,4098" margin-right="5,4098" margin-top="5,4098" margin-bottom="5,4098">
<paragraph>
<text> test</text>
</paragraph>
</paragraphlayout>
</richtext>
"

Re: (a usable) column from a note

PostPosted: Mon Jul 09, 2012 9:32 am
by kraada
That is standard RTF (rich text format). I'm not certain exactly what you are trying to do - could you elaborate some for me?

Re: (a usable) column from a note

PostPosted: Mon Jul 09, 2012 11:51 am
by pasita
I'm not quite sure yet where this is leading... at the first step I'm thinking of setting a column , say flg_did_a_weird_play_on_turn based on the existence of a keyword in the notes (or autonotes). I'm thinking of possibly coloring some stats based on this flag (or a stat made of it), or making a "read based stat" based on this; i.e. highlighting some info (maybe "bagde"-style) in the HUD for a villain based on a "tag" (note) I've given him.

Re: (a usable) column from a note

PostPosted: Mon Jul 09, 2012 1:17 pm
by kraada
Given what I know about some of our post-release plans you might be better off waiting a little while - we have some features coming that might do a good percentage of what you want done here. At which point, why put in the work? ;)

Re: (a usable) column from a note

PostPosted: Tue Jul 10, 2012 8:11 am
by pasita
kraada wrote: At which point, why put in the work? ;)

Mmm... cause I kind of enjoy learning about SQL and stuff this way? :) You guys didn't make it too easy, by the way, to generate a report showing the notes on people:)

I suppose you can't shed any light on the features or timetables you talked about? Would you think they're likely to appear within a) 1 b) 3 c) 6 d) other amount of months?

Re: (a usable) column from a note

PostPosted: Tue Jul 10, 2012 8:47 am
by kraada
I can't promise for certain - you know how notoriously fickle development can be by now, I hope - but I'd think in the bish range given what I know is a reasonable starting point.

Re: (a usable) column from a note

PostPosted: Fri Jul 13, 2012 6:41 pm
by roundar
pasita wrote:I can get the raw data from table notes to a column


How is this done?

Re: (a usable) column from a note

PostPosted: Sat Jul 14, 2012 7:59 am
by pasita
Not at my PT pc right now, but basically
-create a column str_note
-make it's value "notes.note" (without the quotes)
-iirc you need to add some more sql to the query to get the notes matched to correct player (else you get every players' notes for every player)

Unfortunately PT4 will have all sorts of problems displaying this anywhere.

You can use some sql functions (but not all of them... don't ask me why) to format the data to a readable/displayable form.

Sooo... unless you're into learning sql, I wouldn't recommend this. Then again, as a side effect, I've now got the notes text in red in the hud, making it stand out better from all the clutter in the notes box :)

Re: (a usable) column from a note

PostPosted: Sat Jul 14, 2012 8:29 am
by roundar
I'm somewhat familiar w/ SQL's functions, and know what I'm looking for in the sql manual for what I don't know. Sounds like you've already carried out my plan, but I'll probably play with it anyway. (I also dk why some functions work and others don't...)

Coincidentally, your including the fact that notes.note contains every note from every player just solved my other thread asking why my custom stats weren't loading on the hud popups, it was trying to load a massive set of text. Thanks.

highfalutin