Total Posts:7|Showing Posts:1-7
Jump to topic:

Test Script Output

drafterman
Posts: 18,870
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 12:52:45 PM
Posted: 4 years ago
Ok, so, sometimes it's hard to keep track of the vote count, either as a mod or player. So I wrote a little script to parse through a thread and pulls out all the non-quoted, bolded statements made by a player. From this, it'd probably be much easier to get a vote count.

Now, technically, it should be easy to automatically generate a vote count from this, but that would require everyone vote in the same format. One big hitch is the fact that: "VTL Spinko", "VOTE Social", "Vote to friggen lynch SocialPinko" are all votes for the same person, but no script is going to understand that. Nevertheless, simply having all bolded comments is a boon. Right now it is tab delimited and a perl script, but it wouldn't take much to make it a self-contained executable anyone could use and make it comma delimited such that it could be openned in Excel and sorted by player. Test sample from the mosntro Ganster's DP2 thread in the next post.
drafterman
Posts: 18,870
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 12:53:17 PM
Posted: 4 years ago
drafterman: VTL LDF
BlackVoid: VTL LDF
F-16_Fighting_Falcon: VTL BlackVoid
drafterman: Unvote. VTL BV
TUF: UNVOTE
BlackVoid: unvote VTL D-Ninja
Xerge: VTL DetectableNinja
Hardcore.Pwnography: VTL BlackVoid
Viper-King: VTL BV
Andromeda_Z: VTL BV
DetectableNinja: VTL BlackVoid
Xerge: VTL Blackvoid
TUF: DNinja - 14/10 - BV, Xerge, CAPS, royalpaladin,kyro90, medic0506, Daniel
le, Vi_veri, mongoose, M.torres, UnStupendousMan, Lovelife, Askbob, socialpinko
Thaddeus: VTL BV
TUF: Unvote.
F-16_Fighting_Falcon: Unvote
F-16_Fighting_Falcon: VTL Thaddeus
TUF: VTL BV
Xerge: Unvote
Hardcore.Pwnography: unvote
TUF: Unvote
Hardcore.Pwnography: VTL Thaddeus
PartamRuhem: VTLThaddeus
Xerge: VTL drafterman
Xerge: Unvote
Lickdafoot: Vtl Thaddeus
drafterman: Unvote. VTNL
TUF: VTL koopin
drafterman: Unvote. VTL Koopin
medic0506: **Lovelife has replaced UnstupendouMan**
F-16_Fighting_Falcon: Unvote VTL Koopin
medic0506: **Greyparrot has entered the game**
BlackVoid: Unvote VTNL.
BlackVoid: Unvote VTL Koopin
Koopin: VTNL
Lickdafoot: Vtl Koopin
Lickdafoot: Unvote VTL Koopin
vmpire321: Unvote
BlackVoid: start
BlackVoid: Unvote VTNL
BlackVoid: VTL Koopin.
Hardcore.Pwnography: VTL Koopin
TUF: UNVOTE
TUF: VTL KOOPIN
Hardcore.Pwnography: Unvote
Greyparrot: VTNL
Hardcore.Pwnography: VTL Koopin
TUF: VTL thaddeus
lovelife: Vote thad
PartamRuhem: unvote VTL Koopin
F-16_Fighting_Falcon: Unvote VTL Thaddeus
Greyparrot: UNVOTE and VTL THADDEUS
PartamRuhem: unvote
F-16_Fighting_Falcon: Unvote VTL Koopin
PartamRuhem: VTL Thad
Hardcore.Pwnography: unvote
medic0506: **Logic_On_Rails has replaced Detectableninja**
Logic_on_rails: can I have a summary?
TUF: UNVOTE
Koopin: CAN WE PLEASE KILL THAd!
Xerge: VTL Thaddeus
Logic_on_rails: VTL Thaddeus
drafterman: believe Thadd is inno
TUF: VTL koopin
Koopin: Unvote, VTL Koopin
Thaddeus: UNVOTE VTL HCP
BlackVoid: Unvote VTL Koopin
drafterman: Unvote. VTL Thaddeus
Koopin: I accept this.
TUF: VTL Andro
drafterman: <----- WTF??
F-16_Fighting_Falcon: Unvote
TUF: UNVOTE. VTLwhoever the f the mafia is..
BlackVoid: Unvote
TUF: VTL BV
F-16_Fighting_Falcon: VTL Thaddeus
TUF: VTL Thaddeus.
TUF: Vote to have Medic give us some help
TUF: VTL BV
Koopin: UN FREAK'N VOTE! VTL BV!
Koopin: Note to person who gave me that power last night. PLEASE DO IT AGAIN.
Koopin: VTL THAD.
BlackVoid: VTL Thaddeus
Hardcore.Pwnography: Thaddeus - 11/11 - LL, vmpire321, Grey, ParthamRuhem, HC
P, Xerge, drafterman, Logic, F16, Koopin, Blackhawk
royalpaladin
Posts: 22,357
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 12:58:49 PM
Posted: 4 years ago
This sounds pretty cool and useful. My guess is that you check the HTML tags to determine which words and phrases to use, correct? That is completely awesome :)

Also, I am assuming that it pushes forward through each page, correct? If I had posted a vote count on page 3, can I go back to page 3 and begin tracking votes from where I left off simply by entering the link for page 3?
drafterman
Posts: 18,870
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 1:06:26 PM
Posted: 4 years ago
At 2/12/2012 12:58:49 PM, royalpaladin wrote:
This sounds pretty cool and useful. My guess is that you check the HTML tags to determine which words and phrases to use, correct? That is completely awesome :)

Also, I am assuming that it pushes forward through each page, correct? If I had posted a vote count on page 3, can I go back to page 3 and begin tracking votes from where I left off simply by entering the link for page 3?

Starting at page 1 for a thread, it stores the entire page as a single variable, when I then split into an array based on newlines.

Then it goes through each line in the array and searches for a string which I have identified as unique to each post. This string includes the username, which it captures, as well as the start and end lines for that post. It does this for each post.

So, each page has ten posts, so at the end of each page, I have another 10 element array that has each user who posted, and the start and end lines in the array that contains their post.

I think go through each post and capture the actual text (all conveniently contained in its own DIV class). I strip out any quoted material (all conveniently contained in blockquote tags); any sigs (it's own DIV class); any links (just to clean it up). I then futher break up the post based on br tags. Then I search for any bolded statements (any text between strong tags).

Lastly, I print out the user's name and the bolded text. After reviewing the script, realize that it might not capture any bolded text that is on multiple lines as it expects the open and close bold tags to be on the same line.
royalpaladin
Posts: 22,357
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 1:26:44 PM
Posted: 4 years ago
At 2/12/2012 1:06:26 PM, drafterman wrote:
At 2/12/2012 12:58:49 PM, royalpaladin wrote:
This sounds pretty cool and useful. My guess is that you check the HTML tags to determine which words and phrases to use, correct? That is completely awesome :)

Also, I am assuming that it pushes forward through each page, correct? If I had posted a vote count on page 3, can I go back to page 3 and begin tracking votes from where I left off simply by entering the link for page 3?

Starting at page 1 for a thread, it stores the entire page as a single variable, when I then split into an array based on newlines.


Then it goes through each line in the array and searches for a string which I have identified as unique to each post. This string includes the username, which it captures, as well as the start and end lines for that post. It does this for each post.


So, each page has ten posts, so at the end of each page, I have another 10 element array that has each user who posted, and the start and end lines in the array that contains their post.

I think go through each post and capture the actual text (all conveniently contained in its own DIV class). I strip out any quoted material (all conveniently contained in blockquote tags); any sigs (it's own DIV class); any links (just to clean it up). I then futher break up the post based on br tags. Then I search for any bolded statements (any text between strong tags).

Lastly, I print out the user's name and the bolded text. After reviewing the script, realize that it might not capture any bolded text that is on multiple lines as it expects the open and close bold tags to be on the same line.

I think I get the basic idea behind it. Do you have to start at Page 1, or can you start at any page in the thread?
drafterman
Posts: 18,870
Add as Friend
Challenge to a Debate
Send a Message
2/12/2012 1:31:14 PM
Posted: 4 years ago
At 2/12/2012 1:26:44 PM, royalpaladin wrote:
At 2/12/2012 1:06:26 PM, drafterman wrote:
At 2/12/2012 12:58:49 PM, royalpaladin wrote:
This sounds pretty cool and useful. My guess is that you check the HTML tags to determine which words and phrases to use, correct? That is completely awesome :)

Also, I am assuming that it pushes forward through each page, correct? If I had posted a vote count on page 3, can I go back to page 3 and begin tracking votes from where I left off simply by entering the link for page 3?

Starting at page 1 for a thread, it stores the entire page as a single variable, when I then split into an array based on newlines.


Then it goes through each line in the array and searches for a string which I have identified as unique to each post. This string includes the username, which it captures, as well as the start and end lines for that post. It does this for each post.


So, each page has ten posts, so at the end of each page, I have another 10 element array that has each user who posted, and the start and end lines in the array that contains their post.

I think go through each post and capture the actual text (all conveniently contained in its own DIV class). I strip out any quoted material (all conveniently contained in blockquote tags); any sigs (it's own DIV class); any links (just to clean it up). I then futher break up the post based on br tags. Then I search for any bolded statements (any text between strong tags).

Lastly, I print out the user's name and the bolded text. After reviewing the script, realize that it might not capture any bolded text that is on multiple lines as it expects the open and close bold tags to be on the same line.

I think I get the basic idea behind it. Do you have to start at Page 1, or can you start at any page in the thread?

Right now it's specifically coded for the Gangster's DP2 thread, starting from page 1 to 89. My intention is to simply have the user supply the thread # and it'll automatically go from page 1 to the last page. Based on your comments, I've added page information:

(2) drafterman: VTL LDF
(3) BlackVoid: VTL LDF
(3) F-16_Fighting_Falcon: VTL BlackVoid
(4) drafterman: Unvote. VTL BV
(6) TUF: UNVOTE
(8) BlackVoid: unvote VTL D-Ninja
(9) Xerge: VTL DetectableNinja
(10) Hardcore.Pwnography: VTL BlackVoid
(11) Viper-King: VTL BV
(12) Andromeda_Z: VTL BV
(12) DetectableNinja: VTL BlackVoid
(13) Xerge: VTL Blackvoid
(13) TUF: DNinja - 14/10 - BV, Xerge, CAPS, royalpaladin,kyro90, medic0506
, Danielle, Vi_veri, mongoose, M.torres, UnStupendousMan, Lovelife, Askbob, soci
alpinko
(15) Thaddeus: VTL BV
(16) TUF: Unvote.
(16) F-16_Fighting_Falcon: Unvote
(19) F-16_Fighting_Falcon: VTL Thaddeus
(19) TUF: VTL BV
(20) Xerge: Unvote
(21) Hardcore.Pwnography: unvote
(21) TUF: Unvote
(22) Hardcore.Pwnography: VTL Thaddeus
(22) PartamRuhem: VTLThaddeus
(22) Xerge: VTL drafterman
(23) Xerge: Unvote
(23) Lickdafoot: Vtl Thaddeus
(23) drafterman: Unvote. VTNL
(25) TUF: VTL koopin
(25) drafterman: Unvote. VTL Koopin
(25) medic0506: **Lovelife has replaced UnstupendouMan**
(26) F-16_Fighting_Falcon: Unvote VTL Koopin
(27) medic0506: **Greyparrot has entered the game**
(27) BlackVoid: Unvote VTNL.
(27) BlackVoid: Unvote VTL Koopin
(27) Koopin: VTNL
(28) Lickdafoot: Vtl Koopin
(28) Lickdafoot: Unvote VTL Koopin
(28) vmpire321: Unvote
(29) BlackVoid: start
(30) BlackVoid: Unvote VTNL
(32) BlackVoid: VTL Koopin.
(33) Hardcore.Pwnography: VTL Koopin
(36) TUF: UNVOTE
(38) TUF: VTL KOOPIN
(42) Hardcore.Pwnography: Unvote
(43) Greyparrot: VTNL
(43) Hardcore.Pwnography: VTL Koopin
(45) TUF: VTL thaddeus
(47) lovelife: Vote thad
(48) PartamRuhem: unvote VTL Koopin
(49) F-16_Fighting_Falcon: Unvote VTL Thaddeus
(49) Greyparrot: UNVOTE and VTL THADDEUS
(49) PartamRuhem: unvote
(51) F-16_Fighting_Falcon: Unvote VTL Koopin
(53) PartamRuhem: VTL Thad
(55) Hardcore.Pwnography: unvote
(57) medic0506: **Logic_On_Rails has replaced Detectableninja**
(57) Logic_on_rails: can I have a summary?
(58) TUF: UNVOTE
(58) Koopin: CAN WE PLEASE KILL THAd!
(60) Xerge: VTL Thaddeus
(60) Logic_on_rails: VTL Thaddeus
(62) drafterman: believe Thadd is inno
(65) TUF: VTL koopin
(66) Koopin: Unvote, VTL Koopin
(67) Thaddeus: UNVOTE VTL HCP
(67) BlackVoid: Unvote VTL Koopin
(68) drafterman: Unvote. VTL Thaddeus
(70) Koopin: I accept this.
(74) TUF: VTL Andro
(74) drafterman: <----- WTF??
(75) F-16_Fighting_Falcon: Unvote
(75) TUF: UNVOTE. VTLwhoever the f the mafia is..
(75) BlackVoid: Unvote
(76) TUF: VTL BV
(76) F-16_Fighting_Falcon: VTL Thaddeus
(77) TUF: VTL Thaddeus.
(78) TUF: Vote to have Medic give us some help
(79) TUF: VTL BV
(82) Koopin: UN FREAK'N VOTE! VTL BV!
(84) Koopin: Note to person who gave me that power last night. PLEASE DO IT A
GAIN.
(85) Koopin: VTL THAD.
(85) BlackVoid: VTL Thaddeus
(85) Hardcore.Pwnography: Thaddeus - 11/11 - LL, vmpire321, Grey, ParthamR
uhem, HCP, Xerge, drafterman, Logic, F16, Koopin, Blackhawk