Help:Rosetta Code Needs: Difference between revisions

→‎Tidying up: I believe the template name is "Language".
(redundant repetition of ending paragraphs)
(→‎Tidying up: I believe the template name is "Language".)
 
(One intermediate revision by one other user not shown)
Line 6:
 
A bot is a piece of software that interacts with the MediaWiki engine through HTTP GET queries, much the same way as a user using a browser. MediaWiki's index.php supports a [http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Raw raw-access API], specifically to aid in that.
 
==Village Pump==
 
When RC first went live, someone suggested that there be a Wikipedia-style Village Pump. The "Feedback" link on the left is a poor substitute for that.
 
Wikipedia's Village Pump serves as a central, categorized discussion point for policy and discussion; It's a single small group of pages where people can go to find out the latest buzz, and make suggestions. Currently, the only way to do that is to watch the Recent Changes link on the left, and keep an eye on the Talk: namespace.
 
Wikipedia's Pump cycles discussion every week. At Rosetta Code's current level of activity, once-per-month would be fine.
 
==Tidying up==
Line 20 ⟶ 12:
 
===Example/task categorization===
Rosetta Code's navigation organization depends heavily on proper categorization of programming tasks. Programming examples need to include code to categorize their parent task, based on the name of the section title. This Ais Javadone programmingby task, identified byusing the code <tt><nowiki>==Java=={{header}}</nowiki></tt> should include the code <tt><nowiki>[[Category:Java]]</nowiki></tt>template.
 
In addition, when new languages are added, two things need to take place. A page and category need to be created for that language.
Line 26 ⟶ 18:
For example, let's say that someone adds an example for a language not previously covered on Rosetta Code. We'll use [[Pseudocode]] here, because that's a language which, for some odd reason, hasn't shown up yet.
 
When a programming example is created, itset oftenup looksthe somethingheader like thisso:
<pre><nowiki>
==[[Pseudocode]]==
(some code)
</nowiki></pre>
 
In such cases, there is no link to a category, and the contributing author usually does not create content at the [[Pseudocode]] link. A bot is needed which sees such examples and performs a few simple operations.
 
First, the code example needs to be categorized:
 
<pre><nowiki>
==[[{{header|Pseudocode]]}}==
[[Category:Pseudocode]]
(some code)
</nowiki></pre>
 
NowThe we'vetemplate gotadds a link to a nonexistent page, and, at the bottom of the task page, a link to a nonexistent category. The language page needs to be created and filled with a simple redirect to the category page:
 
<pre><nowiki>
Line 50 ⟶ 32:
Note that the colon preceding the word "Category" is important; it prevents the redirect page from being included in the language category.
 
Finally, we need to open the Category page, and fill in the <tt><nowiki>{{Programming Language}}</nowiki></tt> template:
 
<pre><nowiki>{{Programming Language}}</nowiki></pre>
 
MediaWiki handles the rest.
1,606

edits