Patterns needed

0 views
Skip to first unread message

leonba...@gmail.com

unread,
Apr 16, 2006, 1:37:56 AM4/16/06
to World's Simplest Code Generator
Patterns, both simple and complex, are needed for the World's Simplest
Code Generator.

The code generator can be found at http://secretGeek.net/wscg.asp

Patterns are needed in every language...

Do you program in:
Java, C#, ruby, Visual Basic .net, Javascript, HTML, php, sql,
oracle...?

Whatever language you use, re-usable code templates, or patterns, can
be produced and linked from the WSCG so that others can benefit from
your work.

Simon Harriyott

unread,
Apr 28, 2006, 1:09:01 PM4/28/06
to World's Simplest Code Generator
The technorati tags links for the bottom of blog posts would be handy.

leonba...@gmail.com

unread,
May 1, 2006, 11:38:36 PM5/1/06
to World's Simplest Code Generator
would it look something like this:

<div class="tags">tag technoratic: <a
href="http://technorati.com/tag/$1" rel="tag">$1</a></div>

(copied from the graphic here:
http://www.apple.com/downloads/dashboard/blogs_forums/technoratitaggenerator.html)

(i haven't used technorati tags myself -- so please educate me!)

Simon Harriyott

unread,
May 2, 2006, 7:17:47 AM5/2/06
to World's Simplest Code Generator
Yeah, that's about it. With multiple tags it would be:

<div class="tags">tag technoratic: <a

href="http://technorati.com/tag/$1" rel="tag">$1</a> <a
href="http://technorati.com/tag/$2" rel="tag">$2</a> <a
href="http://technorati.com/tag/$3" rel="tag">$3</a></div>

so there would be a header and footer to the template. Is that
possible yet?

Scott

unread,
May 2, 2006, 9:37:13 AM5/2/06
to World's Simplest Code Generator
With the new version I'd suggest ensuring your first entry was "header"
and the last entry was "footer" and then using the following:

$if $1="header" then


<div class="tags">tag technoratic:

$elseif $1="footer" then
</div>
$else


<a href="http://technorati.com/tag/$1" rel="tag">$1</a>

$end if

Obviously you are able to choose your own header and footer tags should
the words used above actually be required in the tags list.

leonba...@gmail.com

unread,
May 2, 2006, 6:38:19 PM5/2/06
to World's Simplest Code Generator
Better yet -- click the "loops mode" checkbox -- and use this pattern:

<div class="tags">tag technorati:
$ForEach Row


<a href="http://technorati.com/tag/$1" rel="tag">$1</a>

$Next
</div>


Then for your input, put one tag on each row, for as many rows as you
like.

Simon Harriyott

unread,
May 9, 2006, 4:06:33 AM5/9/06
to World's Simplest Code Generator
Ah, good idea. I can see you've used this before.

Reply all
Reply to author
Forward
0 new messages