Skip to content
Browse files

Cleanup.

  • Loading branch information...
1 parent 826e3af commit 6422d7cb02db79cd2dc977ba0338daaabeceeb26 @mythmon committed
Showing with 4 additions and 3 deletions.
  1. +0 −2 scripts/wok
  2. +4 −1 wok/util.py
View
2 scripts/wok
@@ -1,6 +1,4 @@
#!/usr/bin/python2
-from optparse import OptionParser
-
from wok.engine import Engine
Engine()
View
5 wok/util.py
@@ -27,7 +27,10 @@ def debug(self, kind, message):
# From http://flask.pocoo.org/snippets/5/
_punct_re = re.compile(r'[\t !"#$%&\'()*\-/<=>?@\[\\\]^_`{|},.]+')
def slugify(text, delim=u'-'):
- """Generates a ASCII-only slug."""
+ """
+ Generates a slug that will only use ASCII, be all lowercase, have no
+ spaces, and otherwise be nice for filenames, identifiers, and urls.
+ """
result = []
for word in _punct_re.split(text.lower()):
word = normalize('NFKD', unicode(word)).encode('ascii', 'ignore')

0 comments on commit 6422d7c

Please sign in to comment.
Something went wrong with that request. Please try again.