mikedamage-premailer-plus 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/bin/premailer_plus +12 -13
- metadata +1 -1
data/VERSION.yml
CHANGED
data/bin/premailer_plus
CHANGED
@@ -11,7 +11,16 @@ require "pathname"
|
|
11
11
|
require File.join(File.dirname(__FILE__), "../lib/premailer")
|
12
12
|
|
13
13
|
class PremailerApp
|
14
|
-
|
14
|
+
BANNER = <<-END
|
15
|
+
Premailer Plus
|
16
|
+
-----------------
|
17
|
+
|
18
|
+
Usage:
|
19
|
+
FILE [options] inputfile outputfile
|
20
|
+
"inputfile" can be either a local file or a URL
|
21
|
+
|
22
|
+
Options:
|
23
|
+
END
|
15
24
|
|
16
25
|
def initialize(args)
|
17
26
|
@args = args
|
@@ -47,7 +56,7 @@ class PremailerApp
|
|
47
56
|
private
|
48
57
|
def parse_options
|
49
58
|
opts = OptionParser.new
|
50
|
-
opts.banner =
|
59
|
+
opts.banner = BANNER.gsub!(/FILE/, File.basename(__FILE__))
|
51
60
|
opts.on("-p", "--plaintext", "Output a plain-text version of the email in addition to HTML") { @config.plaintext = true }
|
52
61
|
opts.on("-s", "--shorten-urls", "Shorten URLs with Bit.ly in the plain-text version") { @config.shorten_urls = true }
|
53
62
|
opts.on("-b", "--baseurl URL", "Prepend this URL to links if your input is a local file.") {|url| @config.base_url = url }
|
@@ -95,14 +104,4 @@ class PremailerApp
|
|
95
104
|
end
|
96
105
|
|
97
106
|
app = PremailerApp.new(ARGV)
|
98
|
-
app.run
|
99
|
-
|
100
|
-
__END__
|
101
|
-
Premailer Plus
|
102
|
-
-----------------
|
103
|
-
|
104
|
-
Usage:
|
105
|
-
FILE [options] inputfile outputfile
|
106
|
-
"inputfile" can be either a local file or a URL
|
107
|
-
|
108
|
-
Options:
|
107
|
+
app.run
|