vmail 2.0.2 → 2.0.3

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.
@@ -420,35 +420,8 @@ any line in this mini-editor and press ENTER to perform the query on that line.
420
420
 
421
421
  ## Command-line mode and batch processing
422
422
 
423
- You can invoke Vmail in non-interactive command-line mode. This is very
424
- useful for batch processing and for using Vmail in Unix pipelines and
425
- automated scripts.
423
+ Note: These features have been deprecated and will be migrated to a separate tool.
426
424
 
427
- If you redirect Vmail's output from STDOUT to a file or a program, Vmail will
428
- output the message list resulting from a search query to a file.
429
-
430
- vmail inbox from monit > message-list.txt
431
-
432
- You can open this file in any text editor to make sure that the search
433
- query produced the expected result. Then you can perform the following
434
- batch operations on the message list:
435
-
436
- # deletes all the messages in the message list
437
- vmail rm < message-list.txt
438
-
439
- # marks all the messages in the message list as spam
440
- vmail spam < message-list.txt
441
-
442
- # moves all the messages in the message list to the 'monit' mailbox
443
- vmail mv monit < message-list.txt
444
-
445
- # copies all the messages in the message list to the 'monit' mailbox
446
- vmail cp monit < message-list.txt
447
-
448
- # appends the text content of all the messages in the message list to messages.txt
449
- vmail print messages.txt < message-list.txt
450
-
451
- Non-interactive mode assumes that `.vmailrc` contains your Gmail password.
452
425
 
453
426
  ## Getting help
454
427
 
@@ -541,10 +514,7 @@ Vmail users, please add them to the [vmail wiki][wiki].
541
514
 
542
515
  My name is Daniel Choi. I am based in Cambridge, Massachusetts, USA, and you
543
516
  can email me at dhchoi@gmail.com. You can [follow me on Twitter][twitter] too.
544
- A big shout out goes to my funny, smart, and supportive fellow hacker alums of
545
- [Betahouse][betahouse].
546
517
 
547
- [betahouse]:http://betahouse.org/
548
518
 
549
519
  [twitter]:http://twitter.com/#!/danchoi
550
520
 
@@ -3,6 +3,7 @@ require 'vmail/options'
3
3
  require 'vmail/imap_client'
4
4
  require 'vmail/query'
5
5
  require 'vmail/message_formatter'
6
+ require 'iconv'
6
7
 
7
8
  module Vmail
8
9
  extend self
@@ -828,6 +828,7 @@ func! s:message_list_window_mappings()
828
828
  noremap <silent> <buffer> <c-j> :call <SID>show_next_message_in_list()<cr>
829
829
  noremap <silent> <buffer> <c-k> :call <SID>show_previous_message_in_list()<cr>
830
830
  nnoremap <silent> <buffer> <Space> :call <SID>toggle_maximize_window()<cr>
831
+ autocmd CursorMoved <buffer> :redraw
831
832
  endfunc
832
833
 
833
834
  func! s:compose_window_mappings()
@@ -43,6 +43,7 @@ module Vmail
43
43
  @smtp_server = config['smtp_server'] || 'smtp.gmail.com'
44
44
  @smtp_port = config['smtp_port'] || 587
45
45
  @smtp_domain = config['smtp_domain'] || 'gmail.com'
46
+ @width = 100
46
47
  current_message = nil
47
48
  end
48
49
 
@@ -1,3 +1,5 @@
1
+ # encoding: UTF-8
2
+
1
3
  module Vmail
2
4
  module ShowingMessage
3
5
 
@@ -52,12 +54,17 @@ module Vmail
52
54
  formatter = Vmail::MessageFormatter.new rfc822
53
55
 
54
56
  message = Message[message_id]
57
+ parts_list = format_parts_info(formatter.list_parts)
58
+ headers = format_headers(formatter.extract_headers)
59
+ body = formatter.plaintext_part
60
+ body.force_encoding("UTF-8")
61
+ body = Iconv.conv('UTF-8//IGNORE', 'UTF-8', body)
55
62
  message_text = <<-EOF
56
- #{message_id} #{number_to_human_size message.size} #{message.flags} #{format_parts_info(formatter.list_parts)}
63
+ #{message_id} #{number_to_human_size message.size} #{message.flags} #{parts_list}
57
64
  #{divider '-'}
58
- #{format_headers(formatter.extract_headers)}
65
+ #{headers}
59
66
 
60
- #{formatter.plaintext_part}
67
+ #{body}
61
68
  EOF
62
69
  # 2 calls so we can see more fine grained exceptions
63
70
  message.update(:rfc822 => rfc822)
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: vmail
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.2
5
+ version: 2.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-28 00:00:00 -04:00
13
+ date: 2011-06-29 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency