vmail 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,9 @@
2
2
 
3
3
  vmail is a Vim interface to Gmail.
4
4
 
5
- Why vmail? Because some people love using Vim 1000 times more than using
6
- a web browser or a GUI mail program.
5
+ Why vmail? Because some people are 1000 times more efficient and happy in Vim
6
+ than in any web browser or GUI program.
7
7
 
8
-
9
8
  ## Prerequisites
10
9
 
11
10
  * a Gmail account
@@ -165,7 +164,7 @@ To save you keystrokes, vmail provides alternative key mappings for
165
164
  * trash/delete: `,#` → `,3`
166
165
  * mark spam: `,!` → `,1`
167
166
 
168
- These save you from having to press the SHIFT key in each key sequence.
167
+ These save you from having to press the SHIFT key in each case.
169
168
 
170
169
  ## Checking for new messages
171
170
 
@@ -7,8 +7,6 @@ method = ARGV.shift
7
7
  if method == 'deliver' || method == 'save_draft'
8
8
  text = STDIN.read
9
9
  puts server.send(method, text)
10
- elsif method == 'show_help'
11
- puts File.expand_path("../../README.markdown", __FILE__)
12
10
  else
13
11
  puts server.send(method, *ARGV)
14
12
  end
@@ -92,13 +92,15 @@ module Vmail
92
92
  end
93
93
  end
94
94
 
95
- # depend on lynx
95
+ # depend on lynx or whatever is set by the VMAIL_HTML_PART_READER
96
+ # variable
96
97
  def format_html_body(part)
98
+ html_tool = ENV['VMAIL_HTML_PART_READER'] || 'lynx -stdin -dump'
97
99
  html = part.body.decoded.gsub("\r", '')
98
- stdin, stdout, stderr = Open3.popen3("lynx -stdin -dump")
100
+ stdin, stdout, stderr = Open3.popen3(html_tool)
99
101
  stdin.puts html
100
102
  stdin.close
101
- output = stdout.read
103
+ output = "[vmail: html part translated into plaintext by '#{html_tool}']\n\n" + stdout.read
102
104
  charset = part.content_type_parameters && part.content_type_parameters['charset']
103
105
  if charset && charset != 'UTF-8'
104
106
  Iconv.conv('UTF-8//TRANSLIT//IGNORE', charset, output)
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 1
9
- version: 0.7.1
8
+ - 2
9
+ version: 0.7.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi