No edit summary |
JubalHarshaw (talk | contribs) question on community portal / open tasks and bot update |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
:This is great! --[[User:Gougef|FrankieG]] 12:40, 5 August 2006 (CDT) | :This is great! --[[User:Gougef|FrankieG]] 12:40, 5 August 2006 (CDT) | ||
::CA, I'll post the code... up on the bot's page as a subpage as it stands right now so you can see it. I don't think there is a way to hide the empty ones though. If so, I would have done that a while ago. :) --[[User:Shane|Shane]] <sup>([[User_Talk:Shane|T]] - [[Special:Contributions/Shane|C]] - [[Special:Editcount/Shane|E]])</sup> 13:06, 5 August 2006 (CDT) | ::CA, I'll post the code... up on the bot's page as a subpage as it stands right now so you can see it. I don't think there is a way to hide the empty ones though. If so, I would have done that a while ago. :) --[[User:Shane|Shane]] <sup>([[User_Talk:Shane|T]] - [[Special:Contributions/Shane|C]] - [[Special:Editcount/Shane|E]])</sup> 13:06, 5 August 2006 (CDT) | ||
::code here [[User:Task Bot/Code]]. | |||
I think this is the line you are looking for: | |||
<pre><nowiki> | |||
foreach $article (sort {$rank{$a} <=> $rank {$b}} (keys(%rank))) | |||
{ | |||
if (length($article)+1 < $characterLimit - length($featuredString)) | |||
{ | |||
if ($categoryID == "IMAGE") { | |||
$featuredString .= "[[:${article}]], "; | |||
} else { | |||
$featuredString .= "[[${article}]], "; | |||
} | |||
$article =~ s/ /_/g; | |||
# Record how many times each article is featured. | |||
$::history{"${article}-${categoryID}"}++; | |||
} | |||
} | |||
</nowiki></pre> | |||
==Bot still working?== | |||
Question: is a bot still handling the updating of these? They don't appear to have changed in quite some time. [[User:JubalHarshaw|JubalHarshaw]] 11:35, 15 April 2007 (CDT) |
Latest revision as of 16:35, 15 April 2007
Nifty
This is pretty cool. To nitpick (since that's what I do), you can get commas only between items and not after each one with something like:
if( size of A ) print A[0]; for( i=1; i < size of A; ++i ) print ", " A[i];
It's been rather a while since I used Perl, and I don't know what structure you're using to hold items, but you get the idea. Having it omit empty categories would be nice, too. Anyway, having every category of open task gathered in one place is great. --CalculatinAvatar(C-T) 12:32, 5 August 2006 (CDT)
- This is great! --FrankieG 12:40, 5 August 2006 (CDT)
- CA, I'll post the code... up on the bot's page as a subpage as it stands right now so you can see it. I don't think there is a way to hide the empty ones though. If so, I would have done that a while ago. :) --Shane (T - C - E) 13:06, 5 August 2006 (CDT)
- code here User:Task Bot/Code.
I think this is the line you are looking for:
foreach $article (sort {$rank{$a} <=> $rank {$b}} (keys(%rank))) { if (length($article)+1 < $characterLimit - length($featuredString)) { if ($categoryID == "IMAGE") { $featuredString .= "[[:${article}]], "; } else { $featuredString .= "[[${article}]], "; } $article =~ s/ /_/g; # Record how many times each article is featured. $::history{"${article}-${categoryID}"}++; } }
Bot still working?
Question: is a bot still handling the updating of these? They don't appear to have changed in quite some time. JubalHarshaw 11:35, 15 April 2007 (CDT)