Created
September 17, 2013 19:16
-
-
Save swinton/6599307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Slugify input from STDIN to STDOUT. | |
| Usage: | |
| $ slugify.py | |
| one two three four five | |
| ctrl+D | |
| one-two-three-four-five | |
| """ | |
| import sys | |
| from django.template.defaultfilters import slugify | |
| print slugify(sys.stdin.readline()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment