peterbe/premailer — pull request #47 by mariocesar (2013-11-18 05:31:13+00:00)
Title: Add command line interface and corresponding test FIXED

This add the support to use premailer in the console by calling the main python module.

Also add all configurations as command line options.
```
$ python -m premailer -h
Usage: python -m premailer [options]

Options:
-h, --help show this help message and exit
-f FILE, --file=FILE Specifies the input file. The default is stdin.
-o FILE, --output=FILE
Specifies the output file. The default is stdout.
--base-url=BASE_URL
--remove-internal-links
--exclude-pseudoclasses
--remove-style-tags
--remove-star-selectors
--remove-classes
--strip-important
```

With support for stdin and stdout.

```
$ echo '

Title

' | python -m premailer --base-url=http://google.com/

Title

```