Rosetta Code:Village Pump/Unimplemented tasks: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
No edit summary
Line 9: Line 9:
::I think there's a wiki variable you can add to [[Template:unimpl_header]] for that. --[[User:Short Circuit|Short Circuit]] 17:38, 16 February 2009 (UTC)
::I think there's a wiki variable you can add to [[Template:unimpl_header]] for that. --[[User:Short Circuit|Short Circuit]] 17:38, 16 February 2009 (UTC)


'''I think that using bots isn't good, it's better try to use a PHP Script. Take a look at my code: ''' --[[User:Guga360|Guga360]] 21:56, 16 February 2009 (UTC)
'''I think that using bots isn't good, it's better try to use a PHP Script to display unimplemented tasks.'''


--[[User:Guga360|Guga360]] 21:58, 16 February 2009 (UTC)
<lang>
<?
if (!isset($_GET['lang'])) die("Language not specified.");
$lang = $_GET['lang'];

function categorytitles($category) {
$titlesarr = array();
$titles = unserialize(file_get_contents("http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:$category&cmlimit=500&format=php"));
$titles = $titles['query']['categorymembers'];
foreach ($titles as $i) {
array_push($titlesarr, $i['title']);
}
return $titlesarr;
}

$alltasks = categorytitles("Programming_Tasks");
$langtasks = categorytitles($lang);
$notimplemented = array_diff($alltasks, $langtasks);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<title>Not implemented tasks in <? echo $lang; ?> </title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>

<body>

<div class="title">
Not implemented tasks in <? echo $lang; ?>:
<br>
</div>

<div class="list">
<ul>
<?
foreach ($notimplemented as $i) {
?>
<li><span class="item"><? echo $i; ?></span></li>
<?
}
?>
</ul>
</div>
</body>
</html>
</lang>

Revision as of 21:58, 16 February 2009

I'm really, really sorry at how insanely busy the Recent Changes log will be by the time this is done. In other news, I have written a bot that will keep a page of tasks for which each language has not had implementations written for it. The process of creating these pages is very CPU intensive, and spams the heck out of the Recent Changes log, so I don't think I'm going to have the bot run very frequently. Probably once per week. And, yes, it will be getting its own bot account, same as GugaTagFixer. On the bright side, we finally have these lists! --Short Circuit 08:07, 16 February 2009 (UTC)

Interesting! How is one expected to find these pages? Are they automatically linked from the language template? How about a Category:Unimplemented tasks to index them all? (I was expecting this kind of feature to be an extension to WikiMedia itself, accessed dynamically as a special page.) --IanOsgood 15:43, 16 February 2009 (UTC)
Bug: you should include the Category:RC* tasks with a leading ':' to avoid putting these pages into the category.
There's another bug there, too. The RC* tasks show up in every list, regardless of whether or not they've actually been solved there. That last problem can be fixed by putting the task category in the language category, but I'll work on the unintentional inclusion into the RC* categories once we settle on what day of the week to actually do the updates; The process of retrieving the data adds a pretty significant load to the server. --Short Circuit 17:38, 16 February 2009 (UTC)
Personally, I wouldn't put these pages into each language category. Instead link explicitly from the {language} template. --IanOsgood 15:49, 16 February 2009 (UTC)
Agreed. A straight link would be better because putting them in the categories disrupts the count of tasks in the categories. --Mwn3d 16:40, 16 February 2009 (UTC)
Add the appropriate link to Template:Language, and remove it from Template:unimpl_header. --Short Circuit 17:38, 16 February 2009 (UTC)
Useful! But maybe putting a "last update" date could help understanding how recent the list is. --ShinTakezou 17:06, 16 February 2009 (UTC)
I think there's a wiki variable you can add to Template:unimpl_header for that. --Short Circuit 17:38, 16 February 2009 (UTC)

I think that using bots isn't good, it's better try to use a PHP Script to display unimplemented tasks.

--Guga360 21:58, 16 February 2009 (UTC)