Wordfilter in Lua

I've been getting bored lately so I've decided to create a wordfilter in Lua, it's really basic actually, but useful. The concept goes something like this. You take a list of naughty words, and filter them out of the text. :D

This filter goes out a bit more advanced then that however. It's punctuation aware and have a few wildcard filter rules. For example, say we want to filter the word boo out of the text, we have several distinct filter rules that we can use.

Here's the texts to be filtered.
"boo... text"
"oboo... text"
"booo... text"
"obooo... text"

Rule 1:
Filter:"boo" => Will only return true if the word boo is found in the text.
Result:

  1. "boo... text" - True
  2. "oboo... text" - False
  3. "booo... text" - False
  4. "obooo... text" - False

Rule 2:
Filter:"*boo" => Will only return true if the substring boo is found at the end of a word in the text.
Result:

  1. "boo... text" - True
  2. "oboo... text" - True
  3. "booo... text" - False
  4. "obooo... text" - False

Rule 3:
Filter:"boo*" => Will only return true if the substring boo is found at the begining of a word in the text.
Result:

  1. "boo... text" - True
  2. "oboo... text" - False
  3. "booo... text" - True
  4. "obooo... text" - False

Rule 4:
Filter:"*boo*" => Will only return true if the substring boo is found anywhere in the text.
Result:

  1. "boo... text" - True
  2. "oboo... text" - True
  3. "booo... text" - True
  4. "obooo... text" - True

Usage:

  1. Add the filter rules in the badwords.txt file, remember to close each rule with a comma
  2. Put dofile("filter.lua") in your file, remember to put filter.lua, string.lua, table.lua, and badwords.txt in the same directory.
  3. Use filter(Text) as the filter function, it will return either true or false. If it returns true, then the filter will have detected naughty words in the text

Download: http://6.dot.ch/filter.zip

Read the rest of this entry »

Release: Flowers XHTML+CSS Template

This is in response to a previous post found at: http://6.dot.ch/?p=242


The preview is located at:

http://6.dot.ch/lab/flowers/

Image Preview:

Preview

Wow, it would seem as if I've been working my butts off for the last 2 days on this project. I've actually pretty happy with the out-comes :D

This will be very easily integrated into Wordpress, unfortunately I'm leaving for China in a few days so you are on your own there. Anyways, Enjoy the Template.

DOWNLOAD: http://6.dot.ch/lab/flowers/flowers.zip

Design Concept: Flowers

I've been trying to do a semi-realistic "landscape" theme and for some weird reason I got a flowery design. I'll try to take it off of PSD and get it onto HTML later this week, but for now, this is what I have.

Concept Design: Flowers

Wish me luck

Note: Once I'm done with this design, I'll post it as a free theme for static web-pages, Wordpress, and some Forums. I'll just have to figure out how to accommodate it for each of those.

BONUS:

I've also made my own Stripes for this design. I think it came out pretty well so I'm not embarrassed to share it on here.

Stripes Usage

Stripes

Download: http://6.dot.ch/wp-content/stripes.jpg
Right Click + Save as...

Flowers

Custom Photo Manipulation, more of a color-HDR Shadow/Lightings exercise.
This could end up as a possible website header. Who knows

Click to Enlarge