Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

0.0.2: Allow module execution with `python -m toronado`.

  • Loading branch information...
commit 71001b12fe5e24c9ddafe36aa8c8d14de7a9f6fd 1 parent 5625d69
@tkaemming tkaemming authored
Showing with 18 additions and 1 deletion.
  1. +1 −1  setup.py
  2. +17 −0 toronado/__main__.py
View
2  setup.py
@@ -28,7 +28,7 @@
setup(
name='toronado',
- version='0.0.1',
+ version='0.0.2',
author='ted kaemming, disqus',
author_email='ted@disqus.com',
packages=find_packages(exclude=('tests',)),
View
17 toronado/__main__.py
@@ -0,0 +1,17 @@
+from optparse import OptionParser
+
+import lxml.html
+
+import toronado
+
+
+parser = OptionParser(usage='usage: %prog infile')
+try:
+ (options, (infile,)) = parser.parse_args()
+except ValueError:
+ parser.print_usage()
+ raise SystemExit(1)
+
+tree = lxml.html.parse(open(infile, 'r'))
+toronado.inline(tree)
+print lxml.html.tostring(tree, pretty_print=True)
Please sign in to comment.
Something went wrong with that request. Please try again.