Actions

Sandbox: Difference between revisions

From Rabbi Blog

 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Stats Code=
=GoogleMap Test=
<pre>
use LWP::Simple;
 
$out="test.txt";
open OUT, ">$out" or die "Cannot open $out for write :$!";
 
#Page URL for one PID
$pageURL="http://bf2web.gamespy.com/ASP/getplayerinfo.aspx?pid=43733951&info=per*,cmb*,twsc,cpcp,cacp,dfcp,kila,heal,rviv,rsup,rpar,tgte,dkas,dsab,cdsc,rank,cmsc,kick,kill,deth,suic,ospm,klpm,klpr,dtpr,bksk,wdsk,bbrs,tcdr,ban,dtpm,lbtl,osaa,vrk,tsql,tsqm,tlwf,mvks,vmks,mvn*,vmr*,fkit,fmap,fveh,fwea,wtm-,wkl-,wdt-,wac-,wkd-,vtm-,vkl-,vdt-,vkd-,vkr-,atm-,awn-,alo-,abr-,ktm-,kkl-,kdt-,kkd-";
 
$simplePage=get($pageURL);                      # Get the PID info
 
$simplePage =~ tr/\n/ /;                      # Replace the line break and add " " spaces
my @test = split / / , $simplePage ;          # use " " spaces to break up the data
 
for ($count = 240; $count <= 481; $count++)
    {
    my $tmp = $count-237;                      # use an offset of 237 to align the names and values
    print OUT "@test[$tmp] ($tmp) = @test[$count]\n";
    }
</pre>
 
=Stats=
 
<pre>
D (3) = de-7
1183524807 (4) = de-8
H (5) = D
pid (6) = 43733951
nick (7) = RabbiBob
scor (8) = 14747
jond (9) = 1118657460
wins (10) = 321
loss (11) = 336
mode0 (12) = 661
mode1 (13) = 0
mode2 (14) = 0
time (15) = 672895
smoc (16) = 0
cmsc (17) = 8886
osaa (18) = 17
kill (19) = 4443
kila (20) = 659
deth (21) = 5329
suic (22) = 123
bksk (23) = 71
wdsk (24) = 18
tvcr (25) = 63285815
topr (26) = 48423247
klpm (27) = 0.40
dtpm (28) = 0.48
ospm (29) = 1.31
klpr (30) = 6.72
dtpr (31) = 8.06
twsc (32) = 5219
cpcp (33) = 1339
cacp (34) = 1008
dfcp (35) = 194
heal (36) = 224
rviv (37) = 518
rsup (38) = 228
rpar (39) = 64
tgte (40) = 0
dkas (41) = 0
dsab (42) = 329
cdsc (43) = 1574
rank (44) = 6
kick (45) = 6
bbrs (46) = 157
tcdr (47) = 56868
ban (48) = 0
lbtl (49) = 1183549560
vrk (50) = 0
tsql (51) = 214213
tsqm (52) = 371775
tlwf (53) = 29824
mvks (54) = 7
vmks (55) = 7
mvns (56) = CPTcaveman007
mvrs (57) = 6
vmns (58) = blinkofdeath
vmrs (59) = 21
fkit (60) = 3
fmap (61) = 303
fveh (62) = 0
fwea (63) = 0
tnv (64) = 0
tgm (65) = 0
wtm-0 (66) = 97347
wtm-1 (67) = 1803
wtm-2 (68) = 44908
wtm-3 (69) = 34217
wtm-4 (70) = 25001
wtm-5 (71) = 10320
wtm-6 (72) = 20689
wtm-7 (73) = 33686
wtm-8 (74) = 52174
wtm-9 (75) = 1657
wtm-10 (76) = 4211
wtm-11 (77) = 11845
wtm-12 (78) = 15144
wtm-13 (79) = 2762
wkl-0 (80) = 622
wkl-1 (81) = 15
wkl-2 (82) = 246
wkl-3 (83) = 227
wkl-4 (84) = 154
wkl-5 (85) = 135
wkl-6 (86) = 137
wkl-7 (87) = 135
wkl-8 (88) = 125
wkl-9 (89) = 94
wkl-10 (90) = 5
wkl-11 (91) = 161
wkl-12 (92) = 319
wkl-13 (93) = 0
wdt-0 (94) = 997
wdt-1 (95) = 22
wdt-2 (96) = 447
wdt-3 (97) = 369
wdt-4 (98) = 145
wdt-5 (99) = 211
wdt-6 (100) = 302
wdt-7 (101) = 323
wdt-8 (102) = 406
wdt-9 (103) = 43
wdt-10 (104) = 110
wdt-11 (105) = 153
wdt-12 (106) = 195
wdt-13 (107) = 9
wac-0 (108) = 15
wac-1 (109) = 27
wac-2 (110) = 19
wac-3 (111) = 11
wac-4 (112) = 40
wac-5 (113) = 20
wac-6 (114) = 42
wac-7 (115) = 15
wac-8 (116) = 10
wac-9 (117) = 29
wac-10 (118) = 61
wac-11 (119) = 33
wac-12 (120) = 24
wac-13 (121) = 0
wkd-0 (122) = 622:997
wkd-1 (123) = 15:22
wkd-2 (124) = 82:149
wkd-3 (125) = 227:369
wkd-4 (126) = 154:145
wkd-5 (127) = 135:211
wkd-6 (128) = 137:302
wkd-7 (129) = 135:323
wkd-8 (130) = 125:406
wkd-9 (131) = 94:43
wkd-10 (132) = 1:22
wkd-11 (133) = 161:153
wkd-12 (134) = 319:195
wkd-13 (135) = 0:9
vtm-0 (136) = 102035
vtm-1 (137) = 5247
vtm-2 (138) = 16570
vtm-3 (139) = 69640
vtm-4 (140) = 53562
vtm-5 (141) = 0
vtm-6 (142) = 4571
vkl-0 (143) = 1095
vkl-1 (144) = 11
vkl-2 (145) = 130
vkl-3 (146) = 309
vkl-4 (147) = 349
vkl-5 (148) = 0
vkl-6 (149) = 45
vdt-0 (150) = 482
vdt-1 (151) = 37
vdt-2 (152) = 92
vdt-3 (153) = 441
vdt-4 (154) = 469
vdt-5 (155) = 0
vdt-6 (156) = 29
vkd-0 (157) = 1095:482
vkd-1 (158) = 11:37
vkd-2 (159) = 65:46
vkd-3 (160) = 103:147
vkd-4 (161) = 349:469
vkd-5 (162) = 0
vkd-6 (163) = 45:29
vkr-0 (164) = 104
vkr-1 (165) = 2
vkr-2 (166) = 17
vkr-3 (167) = 35
vkr-4 (168) = 103
vkr-5 (169) = 0
vkr-6 (170) = 5
atm-0 (171) = 213551
atm-1 (172) = 116518
atm-2 (173) = 75052
atm-3 (174) = 12623
atm-4 (175) = 81673
atm-5 (176) = 60714
atm-6 (177) = 24156
atm-7 (178) = 25869
atm-8 (179) = 60828
atm-9 (180) = 1869
awn-0 (181) = 87
awn-1 (182) = 68
awn-2 (183) = 41
awn-3 (184) = 4
awn-4 (185) = 30
awn-5 (186) = 38
awn-6 (187) = 8
awn-7 (188) = 15
awn-8 (189) = 30
awn-9 (190) = 0
alo-0 (191) = 125
alo-1 (192) = 65
alo-2 (193) = 28
alo-3 (194) = 8
alo-4 (195) = 50
alo-5 (196) = 16
alo-6 (197) = 12
alo-7 (198) = 9
alo-8 (199) = 22
alo-9 (200) = 1
abr-0 (201) = 157
abr-1 (202) = 130
abr-2 (203) = 108
abr-3 (204) = 57
abr-4 (205) = 152
abr-5 (206) = 93
abr-6 (207) = 98
abr-7 (208) = 59
abr-8 (209) = 117
abr-9 (210) = 51
ktm-0 (211) = 125670
ktm-1 (212) = 65005
ktm-2 (213) = 100172
ktm-3 (214) = 127879
ktm-4 (215) = 100927
ktm-5 (216) = 74291
ktm-6 (217) = 38396
kkl-0 (218) = 852
kkl-1 (219) = 501
kkl-2 (220) = 609
kkl-3 (221) = 913
kkl-4 (222) = 634
kkl-5 (223) = 670
kkl-6 (224) = 264
kdt-0 (225) = 1107
kdt-1 (226) = 558
kdt-2 (227) = 652
kdt-3 (228) = 1212
kdt-4 (229) = 867
kdt-5 (230) = 688
kdt-6 (231) = 245
kkd-0 (232) = 284:369
kkd-1 (233) = 167:186
kkd-2 (234) = 609:652
kkd-3 (235) = 913:1212
kkd-4 (236) = 634:867
kkd-5 (237) = 335:344
kkd-6 (238) = 264:245
de-6 (239) = 473
de-7 (240) = 215
de-8 (241) = 368
D (242) = $
43733951 (243) = 1996
RabbiBob (244) = $
 
</pre>
=Awards Code=


<pre>
<googlemap version="0.9" lat="44.97501" lon="-69.873117" zoom="10" scale="yes">
use LWP::Simple;
http://www.rabbibob.com/downloads/Maine%20Maple%20Sunday%20Spots.kmz
</googlemap>


$out="test.txt";
=Flickr Test=
open OUT, ">$out" or die "Cannot open $out for write :$!";


#Page URL for one PID
<flickr>2253765774</flickr>
$pageURL="http://bf2web.gamespy.com/ASP/getawardsinfo.aspx?pid=43733951";


$simplePage=get($pageURL);                      # Get the PID info


$simplePage =~ tr/\n/ /;                      # Replace the line break and add " " spaces
----
my @test = split / / , $simplePage ;          # use " " spaces to break up the data
http://wiki.edsimpson.co.uk/index.php/Flickr_Extension
 
print OUT "@test\n";
 
#for ($count = 240; $count <= 481; $count++)
#  {
  #  my $tmp = $count-237;                      # use an offset of 237 to align the names and values
  #  print OUT "@test[$tmp] ($tmp) = @test[$count]\n";
  #  }
 
 
</pre>
 
=Awards=


<pre>
<pre>
O H pid asof D 43733951 1183550749 H award level when first D 1031105 1 1155260005 0 D 1031105 2 1171419829 0 D 1031109 1 1158527911 0 D 1031113 1 1159522832 0 D 1031115 1 1153218875 0 D 1031115 2 1168912549 0 D 1031119 1 1154378225 0 D 1031119 2 1172715703 0 D 1031120 1 1152838560 0 D 1031120 2 1166926517 0 D 1031121 1 1160766841 0 D 1031121 2 1180749542 0 D 1031406 1 1168790017 0 D 1031406 2 1172576920 0 D 1031619 1 1163763036 0 D 1031619 2 1165922855 0 D 1031923 1 1168912549 0 D 1032415 1 1158466395 0 D 1190304 1 1155260005 0 D 1190304 2 1171245708 0 D 1190507 1 1154257329 0 D 1190507 2 1177637812 0 D 1190601 1 1160306691 0 D 1191819 1 1160305408 0 D 1191819 2 1177928165 0 D 1220104 1 1168810781 0 D 1220104 2 1172544896 0 D 1220118 1 1152838560 0 D 1220122 1 1168909531 0 D 1220803 1 1153183569 0 D 1222016 1 1163903913 0 D 1260602 1 1172283111 0 D 1260602 2 1172797342 0 D 1260708 1 1167784998 0 D 1260708 2 1172283111 0 D 1261105 1 1166756950 0 D 1261105 2 1171850020 0 D 1261109 1 1170117345 0 D 1261113 1 1170624581 0 D 1261115 1 1167271127 0 D 1261115 2 1172807574 0 D 1261119 1 1168790017 0 D 1261119 2 1172802598 0 D 1261120 1 1166926517 0 D 1261120 2 1166926517 0 D 1261121 1 1173148144 0 D 1261121 2 1180749542 0 D 1262612 1 1169119807 0 D 1262612 2 1169416739 0 D 2051902 13 1180571623 1153183569 D 2051907 11 1181088547 1163903913 D 2051919 11 1180568527 1156896256 D 2191608 1 1157419752 1157419752 D 3040109 0 1172544896 0 D 3150914 0 1155416010 0 D 3151920 0 1168912549 0 D 3190118 0 1163903913 0 D 3190318 0 1180749542 0 D 3190409 0 1171419829 0 D 3190605 0 1156644461 0 D 3190803 0 1153183569 0 D 3191305 0 1156639350 0 D 3211305 0 1158282921 0 D 3212201 0 1168600782 0 D 3240102 0 1154479828 0 D 3240301 0 1156208605 0 D 3240703 0 1163380130 0 D 3260118 0 1171850020 0 D 3260318 0 1180749542 0 $ 1467 $
Basic Usage
</pre>


=Output=
Usage is basically as follows : <flickr>{photoid}|{type}|{location}|{size}|{caption}</flickr>
<pre>
Name: RabbiBob
PID: 43733951
Score: 14807
WINS & LOSSES: 321 - 338
WIN Percentage: 94.9704142011834
KILLS & DEATHS: 4463 - 5341
Kill Percentage: 83.5611308743681
</pre>


=Output Code=
Where :
<pre>
use LWP::Simple;


$out="player.html";
{photoid} is the Flickr photo ID. This is the only compulsory parameter. All others are optional and will be detected automatically. Anything which isn't detected as another parameter will be classified as part of the caption.
open OUT, ">$out" or die "Cannot open $out for write :$!";


$pageURL="http://bf2web.gamespy.com/ASP/getplayerinfo.aspx?pid=43733951&info=per*,cmb*,twsc,cpcp,cacp,dfcp,kila,heal,rviv,rsup,rpar,tgte,dkas,dsab,cdsc,rank,cmsc,kick,kill,deth,suic,ospm,klpm,klpr,dtpr,bksk,wdsk,bbrs,tcdr,ban,dtpm,lbtl,osaa,vrk,tsql,tsqm,tlwf,mvks,vmks,mvn*,vmr*,fkit,fmap,fveh,fwea,wtm-,wkl-,wdt-,wac-,wkd-,vtm-,vkl-,vdt-,vkd-,vkr-,atm-,awn-,alo-,abr-,ktm-,kkl-,kdt-,kkd-";
{type} is the image type as per this page (so 'thumb' / 'thumbnail' or 'frame' or nothing). Defaults to nothing.


$simplePage=get($pageURL);                      # Get the PID info
{location} is the location as per this page (so 'right', 'left', 'center' or 'none'). Defaults to 'right'.


$simplePage =~ tr/\n/ /;                      # Replace the line break and add " " spaces
{size} is the size as per this page. Defaults to medium.
my @test = split / / , $simplePage ;          # use " " spaces to break up the data


print OUT "<head></head>";
and {caption} is an image title. If left blank or not set then defaults to title of image from Flickr.
print OUT "Name: $test[244]<br>\n";
print OUT "PID: $test[243]<br>\n";
print OUT "Score: $test[245]<br>\n";
print OUT "WINS & LOSSES: $test[247] - $test[248]<br>\n";
my $tempmath= ($test[247]/$test[248])*100;
print OUT "WIN Percentage: $tempmath<br>\n";
print OUT "KILLS & DEATHS: $test[19+237] - $test[21+237]<br>\n";
my $tempmath= ($test[19+237]/$test[21+237])*100;
print OUT "Kill Percentage: $tempmath<br>\n";
</pre>
</pre>

Latest revision as of 19:52, 16 March 2008

GoogleMap Test

<googlemap version="0.9" lat="44.97501" lon="-69.873117" zoom="10" scale="yes"> http://www.rabbibob.com/downloads/Maine%20Maple%20Sunday%20Spots.kmz </googlemap>

Flickr Test

<flickr>2253765774</flickr>



http://wiki.edsimpson.co.uk/index.php/Flickr_Extension

 Basic Usage

Usage is basically as follows : <flickr>{photoid}|{type}|{location}|{size}|{caption}</flickr>

Where :

{photoid} is the Flickr photo ID. This is the only compulsory parameter. All others are optional and will be detected automatically. Anything which isn't detected as another parameter will be classified as part of the caption.

{type} is the image type as per this page (so 'thumb' / 'thumbnail' or 'frame' or nothing). Defaults to nothing.

{location} is the location as per this page (so 'right', 'left', 'center' or 'none'). Defaults to 'right'.

{size} is the size as per this page. Defaults to medium.

and {caption} is an image title. If left blank or not set then defaults to title of image from Flickr.