vmail 0.0.7 → 0.0.8
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.
- data/.gitignore +3 -0
- data/NOTES +7 -2
- data/README.markdown +310 -72
- data/lib/vmail.rb +8 -0
- data/lib/vmail.vim +53 -21
- data/lib/vmail/imap_client.rb +19 -4
- data/lib/vmail/message_formatter.rb +32 -11
- data/lib/vmail/options.rb +14 -13
- data/lib/vmail/version.rb +1 -1
- data/test/fixtures/rfc_part.eml +306 -0
- data/test/message_formatter_test.rb +12 -1
- data/vmail.gemspec +3 -3
- data/website/.gitignore +1 -0
- data/website/bottom.markdown +20 -0
- data/website/gen.rb +22 -0
- data/website/images-vmail/1-small.png +0 -0
- data/website/images-vmail/1.png +0 -0
- data/website/images-vmail/attach-small.png +0 -0
- data/website/images-vmail/attach.png +0 -0
- data/website/images-vmail/autocomplete-small.png +0 -0
- data/website/images-vmail/autocomplete.png +0 -0
- data/website/lightbox2/css/lightbox.css +27 -0
- data/website/lightbox2/images/bullet.gif +0 -0
- data/website/lightbox2/images/close.gif +0 -0
- data/website/lightbox2/images/closelabel.gif +0 -0
- data/website/lightbox2/images/donate-button.gif +0 -0
- data/website/lightbox2/images/download-icon.gif +0 -0
- data/website/lightbox2/images/image-1.jpg +0 -0
- data/website/lightbox2/images/loading.gif +0 -0
- data/website/lightbox2/images/nextlabel.gif +0 -0
- data/website/lightbox2/images/prevlabel.gif +0 -0
- data/website/lightbox2/images/thumb-1.jpg +0 -0
- data/website/lightbox2/index.html +63 -0
- data/website/lightbox2/js/builder.js +136 -0
- data/website/lightbox2/js/effects.js +1122 -0
- data/website/lightbox2/js/lightbox.js +498 -0
- data/website/lightbox2/js/prototype.js +4221 -0
- data/website/lightbox2/js/scriptaculous.js +58 -0
- data/website/stylesheets-vmail/960.css +1 -0
- data/website/stylesheets-vmail/reset.css +1 -0
- data/website/stylesheets-vmail/site.css +59 -0
- data/website/stylesheets-vmail/syntax-colors.css +33 -0
- data/website/stylesheets-vmail/text.css +1 -0
- data/website/top.markdown +9 -0
- data/website/vmail-template.html +50 -0
- data/website/vmail.html +438 -0
- metadata +48 -10
- data/gmail.vim +0 -180
- data/wrapper.rb +0 -8
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 8
|
9
|
+
version: 0.0.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Daniel Choi
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-12-
|
17
|
+
date: 2010-12-14 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,8 +26,10 @@ dependencies:
|
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
segments:
|
29
|
-
-
|
30
|
-
|
29
|
+
- 2
|
30
|
+
- 2
|
31
|
+
- 12
|
32
|
+
version: 2.2.12
|
31
33
|
type: :runtime
|
32
34
|
version_requirements: *id001
|
33
35
|
- !ruby/object:Gem::Dependency
|
@@ -39,8 +41,10 @@ dependencies:
|
|
39
41
|
- - ">="
|
40
42
|
- !ruby/object:Gem::Version
|
41
43
|
segments:
|
42
|
-
-
|
43
|
-
|
44
|
+
- 1
|
45
|
+
- 6
|
46
|
+
- 1
|
47
|
+
version: 1.6.1
|
44
48
|
type: :runtime
|
45
49
|
version_requirements: *id002
|
46
50
|
description: Manage your email with Vim
|
@@ -60,7 +64,6 @@ files:
|
|
60
64
|
- Rakefile
|
61
65
|
- bin/vmail
|
62
66
|
- bin/vmail_client
|
63
|
-
- gmail.vim
|
64
67
|
- lib/vmail.rb
|
65
68
|
- lib/vmail.vim
|
66
69
|
- lib/vmail/contacts_extractor.rb
|
@@ -75,15 +78,49 @@ files:
|
|
75
78
|
- test/fixtures/google-affiliate.eml
|
76
79
|
- test/fixtures/htmlbody.eml
|
77
80
|
- test/fixtures/moleskine-html.eml
|
81
|
+
- test/fixtures/rfc_part.eml
|
78
82
|
- test/fixtures/textbody-nocontenttype.eml
|
79
83
|
- test/fixtures/with-attachments.eml
|
80
84
|
- test/message_formatter_test.rb
|
81
85
|
- test/test_helper.rb
|
82
86
|
- test/time_format_test.rb
|
83
87
|
- vmail.gemspec
|
84
|
-
-
|
88
|
+
- website/.gitignore
|
89
|
+
- website/bottom.markdown
|
90
|
+
- website/gen.rb
|
91
|
+
- website/images-vmail/1-small.png
|
92
|
+
- website/images-vmail/1.png
|
93
|
+
- website/images-vmail/attach-small.png
|
94
|
+
- website/images-vmail/attach.png
|
95
|
+
- website/images-vmail/autocomplete-small.png
|
96
|
+
- website/images-vmail/autocomplete.png
|
97
|
+
- website/lightbox2/css/lightbox.css
|
98
|
+
- website/lightbox2/images/bullet.gif
|
99
|
+
- website/lightbox2/images/close.gif
|
100
|
+
- website/lightbox2/images/closelabel.gif
|
101
|
+
- website/lightbox2/images/donate-button.gif
|
102
|
+
- website/lightbox2/images/download-icon.gif
|
103
|
+
- website/lightbox2/images/image-1.jpg
|
104
|
+
- website/lightbox2/images/loading.gif
|
105
|
+
- website/lightbox2/images/nextlabel.gif
|
106
|
+
- website/lightbox2/images/prevlabel.gif
|
107
|
+
- website/lightbox2/images/thumb-1.jpg
|
108
|
+
- website/lightbox2/index.html
|
109
|
+
- website/lightbox2/js/builder.js
|
110
|
+
- website/lightbox2/js/effects.js
|
111
|
+
- website/lightbox2/js/lightbox.js
|
112
|
+
- website/lightbox2/js/prototype.js
|
113
|
+
- website/lightbox2/js/scriptaculous.js
|
114
|
+
- website/stylesheets-vmail/960.css
|
115
|
+
- website/stylesheets-vmail/reset.css
|
116
|
+
- website/stylesheets-vmail/site.css
|
117
|
+
- website/stylesheets-vmail/syntax-colors.css
|
118
|
+
- website/stylesheets-vmail/text.css
|
119
|
+
- website/top.markdown
|
120
|
+
- website/vmail-template.html
|
121
|
+
- website/vmail.html
|
85
122
|
has_rdoc: true
|
86
|
-
homepage: http://
|
123
|
+
homepage: http://danielchoi.com/software/vmail.html
|
87
124
|
licenses: []
|
88
125
|
|
89
126
|
post_install_message:
|
@@ -121,6 +158,7 @@ test_files:
|
|
121
158
|
- test/fixtures/google-affiliate.eml
|
122
159
|
- test/fixtures/htmlbody.eml
|
123
160
|
- test/fixtures/moleskine-html.eml
|
161
|
+
- test/fixtures/rfc_part.eml
|
124
162
|
- test/fixtures/textbody-nocontenttype.eml
|
125
163
|
- test/fixtures/with-attachments.eml
|
126
164
|
- test/message_formatter_test.rb
|
data/gmail.vim
DELETED
@@ -1,180 +0,0 @@
|
|
1
|
-
" read the mailboxes list
|
2
|
-
|
3
|
-
let s:messagebufnr = -1
|
4
|
-
|
5
|
-
function! s:CreateWindowA()
|
6
|
-
let l:res = system("ruby bin/mailboxes.rb")
|
7
|
-
put =res
|
8
|
-
1delete
|
9
|
-
setlocal bufhidden=delete
|
10
|
-
setlocal buftype=nofile
|
11
|
-
setlocal nomodifiable
|
12
|
-
setlocal noswapfile
|
13
|
-
setlocal nowrap
|
14
|
-
setlocal nonumber
|
15
|
-
setlocal foldcolumn=0
|
16
|
-
setlocal nospell
|
17
|
-
setlocal nobuflisted
|
18
|
-
setlocal textwidth=0
|
19
|
-
setlocal noreadonly
|
20
|
-
setlocal cursorline
|
21
|
-
let s:mailboxesbufnr = bufnr('%')
|
22
|
-
let s:dataDir = expand('%:h')
|
23
|
-
endfunction
|
24
|
-
|
25
|
-
call s:CreateWindowA()
|
26
|
-
let s:currentBox = getline('.')
|
27
|
-
|
28
|
-
function! s:CreateWindowB()
|
29
|
-
split List
|
30
|
-
setlocal bufhidden=delete
|
31
|
-
setlocal buftype=nofile
|
32
|
-
" setlocal nomodifiable
|
33
|
-
setlocal noswapfile
|
34
|
-
setlocal nomodifiable
|
35
|
-
setlocal nowrap
|
36
|
-
setlocal nonumber
|
37
|
-
setlocal foldcolumn=0
|
38
|
-
setlocal nospell
|
39
|
-
setlocal nobuflisted
|
40
|
-
setlocal textwidth=0
|
41
|
-
setlocal noreadonly
|
42
|
-
" hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white guibg=darkred guifg=white
|
43
|
-
setlocal cursorline
|
44
|
-
let s:listbufnr = bufnr('%')
|
45
|
-
endfunction
|
46
|
-
|
47
|
-
" the message display buffer window
|
48
|
-
function! s:CreateWindowC()
|
49
|
-
bot vne Message
|
50
|
-
setlocal buftype=nofile
|
51
|
-
setlocal noswapfile
|
52
|
-
let s:messagebufnr = bufnr('%')
|
53
|
-
endfunction
|
54
|
-
|
55
|
-
call s:CreateWindowC()
|
56
|
-
call s:CreateWindowB()
|
57
|
-
|
58
|
-
" switch to WindowA
|
59
|
-
1 wincmd w
|
60
|
-
vertical resize 20
|
61
|
-
2 wincmd w
|
62
|
-
|
63
|
-
function! s:ListMessages()
|
64
|
-
" load mailbox TOC
|
65
|
-
1 wincmd w
|
66
|
-
let s:selected_mailbox = getline(".")
|
67
|
-
2 wincmd w " window 2 is the List
|
68
|
-
" fetch data
|
69
|
-
call s:refresh_message_list()
|
70
|
-
1 wincmd w
|
71
|
-
endfunction
|
72
|
-
|
73
|
-
|
74
|
-
function! s:ShowMessage()
|
75
|
-
" assume we're in window 2
|
76
|
-
let line = getline(line("."))
|
77
|
-
let l:uid = matchstr(line, '^\d\+')
|
78
|
-
|
79
|
-
let s:uid = l:uid
|
80
|
-
|
81
|
-
3 wincmd w
|
82
|
-
1,$delete
|
83
|
-
" fetch data
|
84
|
-
let l:res = system("ruby bin/message.rb " . shellescape(s:selected_mailbox) . " " . shellescape(s:uid))
|
85
|
-
put =res
|
86
|
-
|
87
|
-
1delete
|
88
|
-
normal 1
|
89
|
-
normal jk
|
90
|
-
wincmd p
|
91
|
-
endfunction
|
92
|
-
|
93
|
-
1 wincmd w
|
94
|
-
|
95
|
-
|
96
|
-
function! s:UpdateMailbox()
|
97
|
-
echo "Updating ". s:selected_mailbox
|
98
|
-
let res = system("ruby bin/update.rb " . shellescape(s:selected_mailbox) . " >> update.log 2>&1 &")
|
99
|
-
endfunction
|
100
|
-
|
101
|
-
function! s:reprint_message_list()
|
102
|
-
setlocal modifiable
|
103
|
-
1,$delete
|
104
|
-
put =s:res
|
105
|
-
1delete
|
106
|
-
setlocal nomodifiable
|
107
|
-
normal G
|
108
|
-
endfunction
|
109
|
-
|
110
|
-
function! s:refresh_message_list()
|
111
|
-
" assume we're in the message list window
|
112
|
-
2 wincmd w
|
113
|
-
let s:res = system("ruby bin/messages.rb " . shellescape(s:selected_mailbox))
|
114
|
-
call s:reprint_message_list()
|
115
|
-
endfunction
|
116
|
-
|
117
|
-
function! s:show_next_message()
|
118
|
-
2 wincmd w
|
119
|
-
normal j
|
120
|
-
endfunction
|
121
|
-
|
122
|
-
function! s:page_message_down()
|
123
|
-
3wincmd w
|
124
|
-
" check if we're already showing the bottom
|
125
|
-
if line('w$') == line('$')
|
126
|
-
" show next message
|
127
|
-
call s:show_next_message()
|
128
|
-
else
|
129
|
-
exe "normal \<c-f>"
|
130
|
-
endif
|
131
|
-
endfunction
|
132
|
-
|
133
|
-
function! s:search_mailbox()
|
134
|
-
let query = input("search:")
|
135
|
-
let s:res = system("ruby bin/search.rb " . shellescape(s:selected_mailbox) . " " . shellescape(query))
|
136
|
-
" fetch data
|
137
|
-
call s:reprint_message_list()
|
138
|
-
endfunction
|
139
|
-
|
140
|
-
" can map number keys to focus windows and also to alter layout
|
141
|
-
|
142
|
-
noremap <Leader>1 :execute "1wincmd w"<CR>
|
143
|
-
noremap <Leader>2 :execute "2wincmd w"<CR>
|
144
|
-
noremap <Leader>3 :execute "3wincmd w"<CR>
|
145
|
-
|
146
|
-
3 wincmd w
|
147
|
-
noremap <silent> <buffer> <space> :call <SID>page_message_down()<CR>
|
148
|
-
|
149
|
-
2 wincmd w
|
150
|
-
autocmd CursorMoved <buffer> call <SID>ShowMessage()
|
151
|
-
noremap <silent> <buffer> u :call <SID>UpdateMailbox()<CR>
|
152
|
-
noremap <silent> <buffer> r :call <SID>refresh_message_list()<CR>
|
153
|
-
noremap <silent> <buffer> <space> :call <SID>page_message_down()<CR>
|
154
|
-
noremap <silent> <buffer> s :call <SID>search_mailbox()<CR>
|
155
|
-
|
156
|
-
1 wincmd w
|
157
|
-
autocmd CursorMoved <buffer> call <SID>ListMessages()
|
158
|
-
noremap <silent> <buffer> u :call <SID>UpdateMailbox()<CR>
|
159
|
-
noremap <silent> <buffer> r :call <SID>refresh_message_list()<CR>
|
160
|
-
|
161
|
-
finish
|
162
|
-
|
163
|
-
|
164
|
-
function! s:GotoMessageWindow()
|
165
|
-
let currentbufnr = bufnr('%')
|
166
|
-
if bufwinnr(s:messagebufnr) != -1
|
167
|
-
wincmd w
|
168
|
-
while bufnr('%') != s:messagebufnr && bufnr('%') != currentbufnr
|
169
|
-
wincmd w
|
170
|
-
endwhile
|
171
|
-
endif
|
172
|
-
if bufnr('%') != s:messagebufnr
|
173
|
-
call s:CreateWindowC()
|
174
|
-
end
|
175
|
-
endfunction
|
176
|
-
noremap <silent> <buffer> <CR> :call <SID>GmailVimShowMessage()<CR>
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|