Revision 11524
Added by Jean-Philippe Lang over 12 years ago
trunk/extra/mail_handler/rdm-mailhandler.rb | ||
---|---|---|
49 | 49 |
optparse = OptionParser.new do |opts| |
50 | 50 |
opts.banner = "Usage: rdm-mailhandler.rb [options] --url=<Redmine URL> --key=<API key>" |
51 | 51 |
opts.separator("") |
52 |
opts.separator("Reads an email from standard input and forward it to a Redmine server through a HTTP request.") |
|
52 |
opts.separator("Reads an email from standard input and forwards it to a Redmine server through a HTTP request.")
|
|
53 | 53 |
opts.separator("") |
54 | 54 |
opts.separator("Required arguments:") |
55 | 55 |
opts.on("-u", "--url URL", "URL of the Redmine server") {|v| self.url = v} |
... | ... | |
58 | 58 |
opts.separator("General options:") |
59 | 59 |
opts.on("--no-permission-check", "disable permission checking when receiving", |
60 | 60 |
"the email") {self.no_permission_check = '1'} |
61 |
opts.on("--key-file FILE", "path to a file that contains the Redmine",
|
|
62 |
"API key (use this option instead of --key", |
|
63 |
"if you don't the key to appear in the",
|
|
64 |
"command line)") {|v| read_key_from_file(v)}
|
|
61 |
opts.on("--key-file FILE", "full path to a file that contains your Redmine",
|
|
62 |
"API key (use this option instead of --key if",
|
|
63 |
"you don't want the key to appear in the command",
|
|
64 |
"line)") {|v| read_key_from_file(v)} |
|
65 | 65 |
opts.on("--no-check-certificate", "do not check server certificate") {self.no_check_certificate = true} |
66 | 66 |
opts.on("-h", "--help", "show this help") {puts opts; exit 1} |
67 | 67 |
opts.on("-v", "--verbose", "show extra information") {self.verbose = true} |
... | ... | |
87 | 87 |
"ATTRS is a comma separated list of attributes") {|v| self.allow_override = v} |
88 | 88 |
opts.separator("") |
89 | 89 |
opts.separator("Examples:") |
90 |
opts.separator("No project specified. Emails MUST contain the 'Project' keyword:")
|
|
90 |
opts.separator("No project specified, emails MUST contain the 'Project' keyword:")
|
|
91 | 91 |
opts.separator(" rdm-mailhandler.rb --url http://redmine.domain.foo --key secret") |
92 | 92 |
opts.separator("") |
93 | 93 |
opts.separator("Fixed project and default tracker specified, but emails can override") |
Also available in: Unified diff
Typo and text formatting in rdm-mailhandler usage.