Rosetta Code:Village Pump/Pre to Lang Tag Fixer: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
(Applied Template:vptopic)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Vptopic
|topic=Pre to Lang Tag Fixer
|summary=Planning GugaTagFixer
}}
I'm thinking, if we did Code Tag Fixer, why not make a Pre Tag Fixer?
I'm thinking, if we did Code Tag Fixer, why not make a Pre Tag Fixer?
I already did a bot, but i need a hash/dict, like this:
I already did a bot, but i need a hash/dict, like this:


Python = python
[[Python]]= python


C Sharp = csharp
[[C Sharp]] = csharp


Java = java5
[[Java]] = java5

[[Common Lisp]] = lisp


Common Lisp = lisp


I need this, because just lowercasing and removing spaces isn't very secure.
I need this, because just lowercasing and removing spaces isn't very secure.
Line 47: Line 52:


lululu
lululu



=={{header|Python}}==
=={{header|Python}}==
Line 53: Line 57:
aiaiai
aiaiai
</lang>
</lang>



=={{header|C sharp}}==
=={{header|C sharp}}==
Line 59: Line 62:
aiai
aiai
uiui
uiui
</lang>
</pre>
</pre>


--[[User:Guga360|Guga360]] 23:27, 20 February 2009 (UTC)
--[[User:Guga360|Guga360]] 23:27, 20 February 2009 (UTC)
: I thought about it, but not all instances of <nowiki><pre></nowiki> are code snippets. Several are just output. There's also a bunch of examples out there that use leading whitespace for the same effect. I think these will need to be done by hand. --[[User:Short Circuit|Short Circuit]] 23:44, 20 February 2009 (UTC)
::I agree. This task is just a bit too human. --[[User:Mwn3d|Mwn3d]] 03:28, 21 February 2009 (UTC)
: This particular discussion is long dead, I know, but for completeness, I figure I ought to put here a link to [[Rosetta Code:Village Pump/Lang-tag bot|my bot that does this (among other things)]]. —[[User:Underscore|Underscore]] ([[User talk:Underscore|Talk]]) 23:05, 17 November 2009 (UTC)

Latest revision as of 02:07, 10 November 2010

Pre to Lang Tag Fixer
This is a particular discussion thread among many which consider Rosetta Code.

Summary

Planning GugaTagFixer

Discussion

I'm thinking, if we did Code Tag Fixer, why not make a Pre Tag Fixer? I already did a bot, but i need a hash/dict, like this:

Python= python

C Sharp = csharp

Java = java5

Common Lisp = lisp


I need this, because just lowercasing and removing spaces isn't very secure.


Input: <lang>

Ada

testeblabla

lalal

lululu

Python

aiaiai

C#

aiai
uiui

</lang>

Output:

=={{header|Ada}}==
testeblabla

<lang ada>
lalal
</lang>

lululu

=={{header|Python}}==
<lang python>
aiaiai
</lang>

=={{header|C sharp}}==
<lang csharp>
aiai
uiui
</lang>

--Guga360 23:27, 20 February 2009 (UTC)

I thought about it, but not all instances of <pre> are code snippets. Several are just output. There's also a bunch of examples out there that use leading whitespace for the same effect. I think these will need to be done by hand. --Short Circuit 23:44, 20 February 2009 (UTC)
I agree. This task is just a bit too human. --Mwn3d 03:28, 21 February 2009 (UTC)
This particular discussion is long dead, I know, but for completeness, I figure I ought to put here a link to my bot that does this (among other things). —Underscore (Talk) 23:05, 17 November 2009 (UTC)