sup 1.3 → 1.5
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.
- checksums.yaml +4 -4
- data/.github/workflows/checks.yml +10 -9
- data/.rubocop.yml +1 -1
- data/CONTRIBUTORS +2 -2
- data/History.txt +38 -0
- data/Manifest.txt +19 -1
- data/README.md +5 -3
- data/Rakefile +1 -1
- data/bin/sup +5 -3
- data/bin/sup-sync +1 -2
- data/contrib/nix/.gitignore +1 -0
- data/contrib/nix/Gemfile.lock +41 -34
- data/contrib/nix/gem-install-shell.nix +1 -1
- data/contrib/nix/gemset.nix +80 -58
- data/contrib/nix/ruby2.4-Gemfile.lock +1 -1
- data/contrib/nix/ruby2.4-gemset.nix +2 -2
- data/contrib/nix/ruby2.5-Gemfile.lock +1 -1
- data/contrib/nix/ruby2.5-gemset.nix +2 -2
- data/contrib/nix/ruby2.6-Gemfile.lock +1 -1
- data/contrib/nix/ruby2.6-gemset.nix +2 -2
- data/contrib/nix/ruby2.7-Gemfile.lock +1 -1
- data/contrib/nix/ruby2.7-gemset.nix +2 -2
- data/contrib/nix/ruby3.0-Gemfile.lock +1 -1
- data/contrib/nix/ruby3.0-gemset.nix +2 -2
- data/contrib/nix/ruby3.1-Gemfile.lock +101 -0
- data/contrib/nix/ruby3.1-gemset.nix +391 -0
- data/contrib/nix/ruby3.1-shell.nix +2 -13
- data/contrib/nix/ruby3.2-Gemfile.lock +101 -0
- data/contrib/nix/ruby3.2-gemset.nix +391 -0
- data/contrib/nix/ruby3.2-shell.nix +2 -13
- data/contrib/nix/ruby3.3-shell.nix +1 -12
- data/contrib/nix/ruby3.4-shell.nix +1 -10
- data/contrib/nix/ruby4.0-shell.nix +41 -0
- data/contrib/nix/test-all-rubies.sh +2 -1
- data/contrib/screenshot-generator/.gitignore +1 -0
- data/contrib/screenshot-generator/default.nix +253 -0
- data/contrib/screenshot-generator/scenes.yaml +51 -0
- data/contrib/screenshot-generator/shoot.rb +127 -0
- data/contrib/screenshot-generator/sup-is-plain-text-applied.msg +83 -0
- data/contrib/screenshot-generator/sup-is-plain-text.msg +78 -0
- data/lib/sup/account.rb +2 -0
- data/lib/sup/buffer.rb +14 -3
- data/lib/sup/contact.rb +3 -4
- data/lib/sup/draft.rb +15 -15
- data/lib/sup/index.rb +15 -5
- data/lib/sup/maildir.rb +21 -16
- data/lib/sup/mbox.rb +0 -10
- data/lib/sup/message.rb +5 -19
- data/lib/sup/message_chunks.rb +1 -25
- data/lib/sup/mode.rb +1 -0
- data/lib/sup/modes/contact_list_mode.rb +0 -1
- data/lib/sup/modes/edit_message_mode.rb +53 -5
- data/lib/sup/modes/label_search_results_mode.rb +1 -2
- data/lib/sup/modes/line_cursor_mode.rb +22 -20
- data/lib/sup/modes/search_results_mode.rb +0 -1
- data/lib/sup/modes/thread_index_mode.rb +28 -27
- data/lib/sup/modes/thread_view_mode.rb +1 -2
- data/lib/sup/person.rb +0 -6
- data/lib/sup/poll.rb +1 -4
- data/lib/sup/rfc2047.rb +5 -2
- data/lib/sup/sent.rb +5 -4
- data/lib/sup/source.rb +2 -47
- data/lib/sup/util.rb +2 -2
- data/lib/sup/version.rb +1 -1
- data/lib/sup.rb +1 -1
- data/man/sup-add.1 +6 -6
- data/man/sup-config.1 +6 -6
- data/man/sup-dump.1 +5 -5
- data/man/sup-import-dump.1 +7 -7
- data/man/sup-recover-sources.1 +5 -5
- data/man/sup-sync-back-maildir.1 +9 -9
- data/man/sup-sync.1 +11 -11
- data/man/sup-tweak-labels.1 +10 -10
- data/man/sup.1 +11 -11
- data/sup.gemspec +1 -1
- data/test/dummy_buffer.rb +34 -0
- data/test/dummy_source.rb +0 -4
- data/test/fixtures/contacts.txt +2 -1
- data/test/fixtures/folded-from-header.eml +8 -0
- data/test/fixtures/rfc2047-header-encoding.eml +2 -1
- data/test/fixtures/text-attachments-with-charset.eml +7 -0
- data/test/integration/test_draft.rb +128 -0
- data/test/integration/test_index.rb +62 -0
- data/test/integration/test_maildir.rb +2 -0
- data/test/integration/test_mbox.rb +2 -0
- data/test/integration/test_sup-add.rb +4 -0
- data/test/test_crypto.rb +7 -2
- data/test/test_header_parsing.rb +9 -9
- data/test/test_message.rb +22 -3
- data/test/unit/test_contact.rb +15 -3
- data/test/unit/test_edit_message_mode.rb +6 -1
- data/test/unit/test_index.rb +89 -0
- data/test/unit/test_line_cursor_mode.rb +214 -0
- data/test/unit/test_maildir.rb +21 -0
- metadata +30 -9
- data/man/sup-psych-ify-config-files.1 +0 -76
- data/shell.nix +0 -1
data/lib/sup/source.rb
CHANGED
|
@@ -33,7 +33,6 @@ class Source
|
|
|
33
33
|
## To write a new source, subclass this class, and implement:
|
|
34
34
|
##
|
|
35
35
|
## - initialize
|
|
36
|
-
## - load_header offset
|
|
37
36
|
## - load_message offset
|
|
38
37
|
## - raw_header offset
|
|
39
38
|
## - raw_message offset
|
|
@@ -90,6 +89,8 @@ class Source
|
|
|
90
89
|
## the location filename
|
|
91
90
|
def labels? info; [] end
|
|
92
91
|
|
|
92
|
+
def fallback_date_for_message info; end
|
|
93
|
+
|
|
93
94
|
## Yields values of the form [Symbol, Hash]
|
|
94
95
|
## add: info, labels, progress
|
|
95
96
|
## delete: info, progress
|
|
@@ -120,52 +121,6 @@ class Source
|
|
|
120
121
|
debug "lock released for: #{self}"
|
|
121
122
|
end
|
|
122
123
|
|
|
123
|
-
## utility method to read a raw email header from an IO stream and turn it
|
|
124
|
-
## into a hash of key-value pairs. minor special semantics for certain headers.
|
|
125
|
-
##
|
|
126
|
-
## THIS IS A SPEED-CRITICAL SECTION. Everything you do here will have a
|
|
127
|
-
## significant effect on Sup's processing speed of email from ALL sources.
|
|
128
|
-
## Little things like string interpolation, regexp interpolation, += vs <<,
|
|
129
|
-
## all have DRAMATIC effects. BE CAREFUL WHAT YOU DO!
|
|
130
|
-
def self.parse_raw_email_header f
|
|
131
|
-
header = {}
|
|
132
|
-
last = nil
|
|
133
|
-
|
|
134
|
-
while(line = f.gets)
|
|
135
|
-
case line
|
|
136
|
-
## these three can occur multiple times, and we want the first one
|
|
137
|
-
when /^(Delivered-To|X-Original-To|Envelope-To):\s*(.*?)\s*$/i; header[last = $1.downcase] ||= $2
|
|
138
|
-
## regular header: overwrite (not that we should see more than one)
|
|
139
|
-
## TODO: figure out whether just using the first occurrence changes
|
|
140
|
-
## anything (which would simplify the logic slightly)
|
|
141
|
-
when /^([^:\s]+):\s*(.*?)\s*$/i; header[last = $1.downcase] = $2
|
|
142
|
-
when /^\r*$/; break # blank line signifies end of header
|
|
143
|
-
else
|
|
144
|
-
if last
|
|
145
|
-
header[last] << " " unless header[last].empty?
|
|
146
|
-
header[last] << line.strip
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
%w(subject from to cc bcc).each do |k|
|
|
152
|
-
v = header[k] or next
|
|
153
|
-
next unless Rfc2047.is_encoded? v
|
|
154
|
-
header[k] = begin
|
|
155
|
-
Rfc2047.decode_to $encoding, v
|
|
156
|
-
rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence
|
|
157
|
-
#debug "warning: error decoding RFC 2047 header (#{e.class.name}): #{e.message}"
|
|
158
|
-
v
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
header
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
protected
|
|
165
|
-
|
|
166
|
-
## convenience function
|
|
167
|
-
def parse_raw_email_header f; self.class.parse_raw_email_header f end
|
|
168
|
-
|
|
169
124
|
def Source.expand_filesystem_uri uri
|
|
170
125
|
uri.gsub "~", File.expand_path("~")
|
|
171
126
|
end
|
data/lib/sup/util.rb
CHANGED
|
@@ -364,10 +364,10 @@ class String
|
|
|
364
364
|
## Net::IMAP::decode_utf7 which only handles the IMAP "modified UTF-7"
|
|
365
365
|
## encoding. This implementation is inspired by that one but handles
|
|
366
366
|
## standard UTF-7 shift characters and not the IMAP-specific variation.
|
|
367
|
-
def decode_utf7
|
|
367
|
+
def decode_utf7 **opts
|
|
368
368
|
gsub(/\+([^-]+)?-/) {
|
|
369
369
|
if $1
|
|
370
|
-
($1 + "===").unpack("m")[0].encode(Encoding::UTF_8, Encoding::UTF_16BE)
|
|
370
|
+
($1 + "===").unpack("m")[0].encode(Encoding::UTF_8, Encoding::UTF_16BE, **opts)
|
|
371
371
|
else
|
|
372
372
|
"+"
|
|
373
373
|
end
|
data/lib/sup/version.rb
CHANGED
data/lib/sup.rb
CHANGED
|
@@ -142,7 +142,7 @@ module Redwood
|
|
|
142
142
|
File::open(fn) { |f| f.read }
|
|
143
143
|
end
|
|
144
144
|
## fix up malformed tag URIs created by earlier versions of sup
|
|
145
|
-
raw_contents.gsub!(/!supmua.org,2006-10-01\/(\S
|
|
145
|
+
raw_contents.gsub!(/!supmua.org,2006-10-01\/(\S+)/) { |m| "!<tag:supmua.org,2006-10-01/#{$1}>" }
|
|
146
146
|
if YAML.respond_to?(:unsafe_load) # Ruby 3.1+
|
|
147
147
|
YAML::unsafe_load raw_contents
|
|
148
148
|
else
|
data/man/sup-add.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-ADD" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-ADD" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-add \- add a source to the Sup source list
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -39,7 +39,7 @@ source
|
|
|
39
39
|
Create a new account for this source, even if one already exists
|
|
40
40
|
.TP
|
|
41
41
|
\-o \f[I]STRING\f[R], \-\-force\-account \f[I]STRING\f[R]
|
|
42
|
-
Reuse previously defined account user\
|
|
42
|
+
Reuse previously defined account user\(athostname
|
|
43
43
|
.TP
|
|
44
44
|
\-v, \-\-version
|
|
45
45
|
Print version and exit
|
|
@@ -77,10 +77,10 @@ Sup Wiki:
|
|
|
77
77
|
.UE \c
|
|
78
78
|
.TP
|
|
79
79
|
Mailing list:
|
|
80
|
-
supmua\
|
|
80
|
+
supmua\(atgooglegroups.com
|
|
81
81
|
.RS
|
|
82
82
|
.PP
|
|
83
|
-
supmua+subscribe\
|
|
83
|
+
supmua+subscribe\(atgooglegroups.com
|
|
84
84
|
.PP
|
|
85
85
|
Archives: \c
|
|
86
86
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -91,7 +91,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
91
91
|
.MT mworgan-sup@masanjin.net
|
|
92
92
|
.ME \c
|
|
93
93
|
.PP
|
|
94
|
-
Copyright \
|
|
94
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
95
95
|
.PP
|
|
96
96
|
Permission is granted to copy and distribute this manual under the terms
|
|
97
97
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-config.1
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-CONFIG" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-CONFIG" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-config \- interactive configuration tool for Sup
|
|
6
6
|
.SH SYNOPSIS
|
|
7
7
|
sup\-config [\f[I]options\f[R]]
|
|
8
8
|
.SH DESCRIPTION
|
|
9
9
|
Interactive configuration tool for Sup.
|
|
10
|
-
Won\
|
|
10
|
+
Won\(cqt destroy existing configuration.
|
|
11
11
|
.SH OPTIONS
|
|
12
12
|
.TP
|
|
13
13
|
\-v, \-\-version
|
|
@@ -49,10 +49,10 @@ Sup Wiki:
|
|
|
49
49
|
.UE \c
|
|
50
50
|
.TP
|
|
51
51
|
Mailing list:
|
|
52
|
-
supmua\
|
|
52
|
+
supmua\(atgooglegroups.com
|
|
53
53
|
.RS
|
|
54
54
|
.PP
|
|
55
|
-
supmua+subscribe\
|
|
55
|
+
supmua+subscribe\(atgooglegroups.com
|
|
56
56
|
.PP
|
|
57
57
|
Archives: \c
|
|
58
58
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -63,7 +63,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
63
63
|
.MT mworgan-sup@masanjin.net
|
|
64
64
|
.ME \c
|
|
65
65
|
.PP
|
|
66
|
-
Copyright \
|
|
66
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
67
67
|
.PP
|
|
68
68
|
Permission is granted to copy and distribute this manual under the terms
|
|
69
69
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-dump.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-DUMP" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-DUMP" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-dump \- dumps message state from Sup index
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -58,10 +58,10 @@ Sup Wiki:
|
|
|
58
58
|
.UE \c
|
|
59
59
|
.TP
|
|
60
60
|
Mailing list:
|
|
61
|
-
supmua\
|
|
61
|
+
supmua\(atgooglegroups.com
|
|
62
62
|
.RS
|
|
63
63
|
.PP
|
|
64
|
-
supmua+subscribe\
|
|
64
|
+
supmua+subscribe\(atgooglegroups.com
|
|
65
65
|
.PP
|
|
66
66
|
Archives: \c
|
|
67
67
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -72,7 +72,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
72
72
|
.MT mworgan-sup@masanjin.net
|
|
73
73
|
.ME \c
|
|
74
74
|
.PP
|
|
75
|
-
Copyright \
|
|
75
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
76
76
|
.PP
|
|
77
77
|
Permission is granted to copy and distribute this manual under the terms
|
|
78
78
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-import-dump.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-IMPORT\-DUMP" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-IMPORT\-DUMP" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-import\-dump \- import message state dump to Sup index
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -15,7 +15,7 @@ Messages not mentioned in the dump file will not be modified.
|
|
|
15
15
|
.SH OPTIONS
|
|
16
16
|
.TP
|
|
17
17
|
\-v, \-\-verbose
|
|
18
|
-
Print message ids as they\
|
|
18
|
+
Print message ids as they\(cqre processed
|
|
19
19
|
.TP
|
|
20
20
|
\-i, \-\-ignore\-missing
|
|
21
21
|
Silently skip over messages that are not in the index
|
|
@@ -30,7 +30,7 @@ Abort on encountering messages that are not in the index (default)
|
|
|
30
30
|
Use transaction to apply all changes atomically
|
|
31
31
|
.TP
|
|
32
32
|
\-n, \-\-dry\-run
|
|
33
|
-
Don\
|
|
33
|
+
Don\(cqt actually modify the index.
|
|
34
34
|
Probably only useful with \-\-verbose
|
|
35
35
|
.TP
|
|
36
36
|
\-\-version
|
|
@@ -65,10 +65,10 @@ Sup Wiki:
|
|
|
65
65
|
.UE \c
|
|
66
66
|
.TP
|
|
67
67
|
Mailing list:
|
|
68
|
-
supmua\
|
|
68
|
+
supmua\(atgooglegroups.com
|
|
69
69
|
.RS
|
|
70
70
|
.PP
|
|
71
|
-
supmua+subscribe\
|
|
71
|
+
supmua+subscribe\(atgooglegroups.com
|
|
72
72
|
.PP
|
|
73
73
|
Archives: \c
|
|
74
74
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -79,7 +79,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
79
79
|
.MT mworgan-sup@masanjin.net
|
|
80
80
|
.ME \c
|
|
81
81
|
.PP
|
|
82
|
-
Copyright \
|
|
82
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
83
83
|
.PP
|
|
84
84
|
Permission is granted to copy and distribute this manual under the terms
|
|
85
85
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-recover-sources.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-RECOVER\-SOURCES" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-RECOVER\-SOURCES" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-recover\-sources \- rebuild a lost Sup source configuration file
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -69,10 +69,10 @@ Sup Wiki:
|
|
|
69
69
|
.UE \c
|
|
70
70
|
.TP
|
|
71
71
|
Mailing list:
|
|
72
|
-
supmua\
|
|
72
|
+
supmua\(atgooglegroups.com
|
|
73
73
|
.RS
|
|
74
74
|
.PP
|
|
75
|
-
supmua+subscribe\
|
|
75
|
+
supmua+subscribe\(atgooglegroups.com
|
|
76
76
|
.PP
|
|
77
77
|
Archives: \c
|
|
78
78
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -83,7 +83,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
83
83
|
.MT mworgan-sup@masanjin.net
|
|
84
84
|
.ME \c
|
|
85
85
|
.PP
|
|
86
|
-
Copyright \
|
|
86
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
87
87
|
.PP
|
|
88
88
|
Permission is granted to copy and distribute this manual under the terms
|
|
89
89
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-sync-back-maildir.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-SYNC\-BACK\-MAILDIR" "1" "August 25, 2014" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-SYNC\-BACK\-MAILDIR" "1" "August 25, 2014" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-sync\-back\-maildir \- Export Xapian entries to Maildir sources on
|
|
6
6
|
disk
|
|
@@ -23,8 +23,8 @@ If you choose not to merge (\-m) you will lose information (`replied'),
|
|
|
23
23
|
and in the previous example the file will be renamed to foo_bar:2,FS.
|
|
24
24
|
.PP
|
|
25
25
|
Running this script is \f[I]strongly\f[R] recommended when setting the
|
|
26
|
-
\
|
|
27
|
-
|
|
26
|
+
\(lqsync_back_to_maildir\(rq option from false to true in config.yaml or
|
|
27
|
+
changing the \(lqsync_back\(rq flag to true for a source in
|
|
28
28
|
sources.yaml.
|
|
29
29
|
.PP
|
|
30
30
|
If no source is given, the default behavior is to sync back all Maildir
|
|
@@ -33,10 +33,10 @@ configuration parameter sync_back = false in sources.yaml.
|
|
|
33
33
|
.SH OPTIONS
|
|
34
34
|
.TP
|
|
35
35
|
\-n, \-\-no\-confirm
|
|
36
|
-
Don\
|
|
36
|
+
Don\(cqt ask for confirmation before synchronizing
|
|
37
37
|
.TP
|
|
38
38
|
\-m, \-\-no\-merge
|
|
39
|
-
Don\
|
|
39
|
+
Don\(cqt merge new supported Maildir flags (R and P)
|
|
40
40
|
.TP
|
|
41
41
|
\-l, \-\-list\-sources
|
|
42
42
|
List your Maildir sources and exit
|
|
@@ -81,10 +81,10 @@ Sup Wiki:
|
|
|
81
81
|
.UE \c
|
|
82
82
|
.TP
|
|
83
83
|
Mailing list:
|
|
84
|
-
supmua\
|
|
84
|
+
supmua\(atgooglegroups.com
|
|
85
85
|
.RS
|
|
86
86
|
.PP
|
|
87
|
-
supmua+subscribe\
|
|
87
|
+
supmua+subscribe\(atgooglegroups.com
|
|
88
88
|
.PP
|
|
89
89
|
Archives: \c
|
|
90
90
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -95,7 +95,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
95
95
|
.MT mworgan-sup@masanjin.net
|
|
96
96
|
.ME \c
|
|
97
97
|
.PP
|
|
98
|
-
Copyright \
|
|
98
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
99
99
|
.PP
|
|
100
100
|
Permission is granted to copy and distribute this manual under the terms
|
|
101
101
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-sync.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-SYNC" "1" "April 9, 2012" "Sup User Manual"
|
|
3
|
+
.TH "SUP\-SYNC" "1" "April 9, 2012" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-sync \- sychronize the Sup index with message sources
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -10,10 +10,10 @@ Synchronizes the Sup index with one or more message sources by adding
|
|
|
10
10
|
messages, deleting messages, or changing message state in the index as
|
|
11
11
|
appropriate.
|
|
12
12
|
.PP
|
|
13
|
-
\
|
|
13
|
+
\(lqMessage state\(rq means read/unread, archived/inbox,
|
|
14
14
|
starred/unstarred, and all user\-defined labels on each message.
|
|
15
15
|
.PP
|
|
16
|
-
\
|
|
16
|
+
\(lqDefault source state\(rq refers to any state that a source itself
|
|
17
17
|
has keeps about a message.
|
|
18
18
|
Sup\-sync uses this information when adding a new message to the index.
|
|
19
19
|
The source state is typically limited to read/unread, archived/inbox
|
|
@@ -22,8 +22,8 @@ Messages using the default source state are placed in the inbox
|
|
|
22
22
|
(i.e.\ not archived) and unstarred.
|
|
23
23
|
.PP
|
|
24
24
|
If no sources are given, sync from all usual sources.
|
|
25
|
-
Supported source URI schemes can be seen by running \
|
|
26
|
-
\-\-help\
|
|
25
|
+
Supported source URI schemes can be seen by running \(lqsup\-add
|
|
26
|
+
\-\-help\(rq.
|
|
27
27
|
.SH MESSAGE STATE OPTIONS
|
|
28
28
|
.TP
|
|
29
29
|
\-\-asis
|
|
@@ -50,7 +50,7 @@ labels (a comma\-separated list) (default)
|
|
|
50
50
|
.SH OTHER OPTIONS
|
|
51
51
|
.TP
|
|
52
52
|
\-v, \-\-verbose
|
|
53
|
-
Print message ids as they\
|
|
53
|
+
Print message ids as they\(cqre processed.
|
|
54
54
|
.TP
|
|
55
55
|
\-o, \-\-optimize
|
|
56
56
|
As the final operation, optimize the index.
|
|
@@ -59,7 +59,7 @@ As the final operation, optimize the index.
|
|
|
59
59
|
Scan over all sources.
|
|
60
60
|
.TP
|
|
61
61
|
\-n, \-\-dry\-run
|
|
62
|
-
Don\
|
|
62
|
+
Don\(cqt actually modify the index.
|
|
63
63
|
Probably only useful with \-\-verbose.
|
|
64
64
|
.TP
|
|
65
65
|
\-\-version
|
|
@@ -99,10 +99,10 @@ Sup Wiki:
|
|
|
99
99
|
.UE \c
|
|
100
100
|
.TP
|
|
101
101
|
Mailing list:
|
|
102
|
-
supmua\
|
|
102
|
+
supmua\(atgooglegroups.com
|
|
103
103
|
.RS
|
|
104
104
|
.PP
|
|
105
|
-
supmua+subscribe\
|
|
105
|
+
supmua+subscribe\(atgooglegroups.com
|
|
106
106
|
.PP
|
|
107
107
|
Archives: \c
|
|
108
108
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -113,7 +113,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
113
113
|
.MT mworgan-sup@masanjin.net
|
|
114
114
|
.ME \c
|
|
115
115
|
.PP
|
|
116
|
-
Copyright \
|
|
116
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
117
117
|
.PP
|
|
118
118
|
Permission is granted to copy and distribute this manual under the terms
|
|
119
119
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup-tweak-labels.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP\-TWEAK\-LABELS" "1" "April 9, 2012" "Sup User Manuel"
|
|
3
|
+
.TH "SUP\-TWEAK\-LABELS" "1" "April 9, 2012" "Sup User Manuel"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup\-tweak\-labels \- batch modification of message state already in
|
|
6
6
|
index
|
|
@@ -9,8 +9,8 @@ sup\-tweak\-labels [\f[I]options\f[R]] source \&...
|
|
|
9
9
|
.SH DESCRIPTION
|
|
10
10
|
Batch modification of message state for messages already in the index.
|
|
11
11
|
.PP
|
|
12
|
-
Supported source URI schemes can be seen by running \
|
|
13
|
-
\-\-help\
|
|
12
|
+
Supported source URI schemes can be seen by running \(lqsup\-add
|
|
13
|
+
\-\-help\(rq.
|
|
14
14
|
.SH OPTIONS
|
|
15
15
|
.TP
|
|
16
16
|
\-a \f[I]STRING\f[R], \-\-add \f[I]STRING\f[R]
|
|
@@ -26,16 +26,16 @@ A Sup search query
|
|
|
26
26
|
.SH OTHER OPTIONS
|
|
27
27
|
.TP
|
|
28
28
|
\-v, \-\-verbose
|
|
29
|
-
Print message ids as they\
|
|
29
|
+
Print message ids as they\(cqre processed
|
|
30
30
|
.TP
|
|
31
31
|
\-e, \-\-very\-verbose
|
|
32
|
-
Print message names and subjects as they\
|
|
32
|
+
Print message names and subjects as they\(cqre processed
|
|
33
33
|
.TP
|
|
34
34
|
\-\-all\-sources
|
|
35
35
|
Scan over all sources
|
|
36
36
|
.TP
|
|
37
37
|
\-n, \-\-dry\-run
|
|
38
|
-
Don\
|
|
38
|
+
Don\(cqt actually modify the index.
|
|
39
39
|
Probably only useful with \-\-verbose
|
|
40
40
|
.TP
|
|
41
41
|
\-\-version
|
|
@@ -70,10 +70,10 @@ Sup Wiki:
|
|
|
70
70
|
.UE \c
|
|
71
71
|
.TP
|
|
72
72
|
Mailing list:
|
|
73
|
-
supmua\
|
|
73
|
+
supmua\(atgooglegroups.com
|
|
74
74
|
.RS
|
|
75
75
|
.PP
|
|
76
|
-
supmua+subscribe\
|
|
76
|
+
supmua+subscribe\(atgooglegroups.com
|
|
77
77
|
.PP
|
|
78
78
|
Archives: \c
|
|
79
79
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -84,7 +84,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
84
84
|
.MT mworgan-sup@masanjin.net
|
|
85
85
|
.ME \c
|
|
86
86
|
.PP
|
|
87
|
-
Copyright \
|
|
87
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
88
88
|
.PP
|
|
89
89
|
Permission is granted to copy and distribute this manual under the terms
|
|
90
90
|
of the GNU General Public License; either version 2 or (at your option)
|
data/man/sup.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
.TH "SUP" "1" "April 8, 2014" "Sup User Manual"
|
|
3
|
+
.TH "SUP" "1" "April 8, 2014" "Sup User Manual"
|
|
4
4
|
.SH NAME
|
|
5
5
|
sup \- a curses\-based email client
|
|
6
6
|
.SH SYNOPSIS
|
|
@@ -13,17 +13,17 @@ hierarchical collections email messages.
|
|
|
13
13
|
Threads can have multiple tags applied to them.
|
|
14
14
|
It supports a very fast full\-text search, automatic contact\-list
|
|
15
15
|
management, custom code insertion via a Ruby hook system, and more.
|
|
16
|
-
If you\
|
|
17
|
-
|
|
16
|
+
If you\(cqre the type of person who treats email as an extension of your
|
|
17
|
+
long\-term memory, Sup is for you.
|
|
18
18
|
.SH OPTIONS
|
|
19
19
|
.TP
|
|
20
20
|
\-l, \-\-list\-hooks
|
|
21
21
|
List all hooks and descriptions, and quit.
|
|
22
|
-
Use \
|
|
22
|
+
Use \(enhooks\-matching to filter
|
|
23
23
|
.TP
|
|
24
24
|
\-m, \-\-hooks\-matching=<s>
|
|
25
25
|
If given, list all hooks and descriptions matching the given pattern.
|
|
26
|
-
Needs the \
|
|
26
|
+
Needs the \(enlist\-hooks option (default: )
|
|
27
27
|
.TP
|
|
28
28
|
\-n, \-\-no\-threads
|
|
29
29
|
Turn off threading.
|
|
@@ -31,7 +31,7 @@ Helps with debugging.
|
|
|
31
31
|
(Necessarily disables background polling for new messages.)
|
|
32
32
|
.TP
|
|
33
33
|
\-o, \-\-no\-initial\-poll
|
|
34
|
-
Don\
|
|
34
|
+
Don\(cqt poll for new messages when starting.
|
|
35
35
|
.TP
|
|
36
36
|
\-s \f[I]QUERY\f[R], \-\-search \f[I]QUERY\f[R]
|
|
37
37
|
Search for this query upon startup
|
|
@@ -54,7 +54,7 @@ Set log level verbosity.
|
|
|
54
54
|
Valid values ordered by decresing verbosity: debug info warn error.
|
|
55
55
|
Default log level is info.
|
|
56
56
|
.TP
|
|
57
|
-
SUP_BASE\
|
|
57
|
+
SUP_BASE\(rs
|
|
58
58
|
Specify home directory for configuration files and xapian index,
|
|
59
59
|
defaults to: $HOME/.sup.
|
|
60
60
|
.SH FILES
|
|
@@ -96,10 +96,10 @@ Sup Wiki:
|
|
|
96
96
|
.UE \c
|
|
97
97
|
.TP
|
|
98
98
|
Mailing list:
|
|
99
|
-
supmua\
|
|
99
|
+
supmua\(atgooglegroups.com
|
|
100
100
|
.RS
|
|
101
101
|
.PP
|
|
102
|
-
supmua+subscribe\
|
|
102
|
+
supmua+subscribe\(atgooglegroups.com
|
|
103
103
|
.PP
|
|
104
104
|
Archives: \c
|
|
105
105
|
.UR https://groups.google.com/d/forum/supmua/
|
|
@@ -110,7 +110,7 @@ Copyright © 2006\-2009 William Morgan \c
|
|
|
110
110
|
.MT mworgan-sup@masanjin.net
|
|
111
111
|
.ME \c
|
|
112
112
|
.PP
|
|
113
|
-
Copyright \
|
|
113
|
+
Copyright \(at 2013\-2014 Sup developers
|
|
114
114
|
.PP
|
|
115
115
|
Permission is granted to copy and distribute this manual under the terms
|
|
116
116
|
of the GNU General Public License; either version 2 or (at your option)
|
data/sup.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.authors = ["William Morgan", "Gaute Hope", "Hamish Downer", "Matthieu Rakotojaona"]
|
|
10
10
|
s.email = "supmua@googlegroups.com"
|
|
11
11
|
s.summary = "A console-based email client with the best features of GMail, mutt and Emacs"
|
|
12
|
-
s.homepage = "https://
|
|
12
|
+
s.homepage = "https://supmua.dev/"
|
|
13
13
|
s.license = 'GPL-2.0'
|
|
14
14
|
s.description = <<-DESC
|
|
15
15
|
Sup is a console-based email client for people with a lot of email.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require "sup"
|
|
2
|
+
|
|
3
|
+
module Redwood
|
|
4
|
+
|
|
5
|
+
class DummyBuffer
|
|
6
|
+
attr_reader :width, :height, :dirty_count, :commit_count
|
|
7
|
+
|
|
8
|
+
def initialize width=80, height=25
|
|
9
|
+
@width = width
|
|
10
|
+
@height = height
|
|
11
|
+
@dirty = false
|
|
12
|
+
@dirty_count = 0
|
|
13
|
+
@commit_count = 0
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def content_height; @height - 1; end
|
|
17
|
+
def content_width; @width; end
|
|
18
|
+
|
|
19
|
+
def mark_dirty
|
|
20
|
+
@dirty = true
|
|
21
|
+
@dirty_count += 1
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def dirty?; @dirty; end
|
|
25
|
+
|
|
26
|
+
def commit
|
|
27
|
+
@dirty = false
|
|
28
|
+
@commit_count += 1
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def write(*args); end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
data/test/dummy_source.rb
CHANGED
data/test/fixtures/contacts.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
RC: Random Contact <random_dude@gmail.com>
|
|
1
|
+
RC: Random Contact <random_dude@gmail.com>
|
|
2
|
+
: Unaliased Contact <unaliased@example.invalid>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
From: "Kevin Frazier, Juliana Schroeder, Brian Frye, Nathanael Fast,
|
|
2
|
+
and Rob Greer" <user@rss2email.invalid>
|
|
3
|
+
To: someone@example.invalid
|
|
4
|
+
Subject: folded From header
|
|
5
|
+
Date: Fri, 16 Oct 2026 10:00:00 +0000
|
|
6
|
+
Message-Id: <folded-from-header@example.invalid>
|
|
7
|
+
|
|
8
|
+
body
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
From:
|
|
1
|
+
From: =?utf-8?q?YouTube-tj=E4nst?= <service@youtube.com>
|
|
2
2
|
To: test@example.invalid
|
|
3
3
|
Date: Sun, 19 Jul 2020 17:03:56 +1000
|
|
4
4
|
Subject:
|
|
@@ -8,6 +8,7 @@ Subject:
|
|
|
8
8
|
=?UTF-7?b?LCBGcmlkYSBFbmcrQVBnLQ?=
|
|
9
9
|
bad: =?UTF16?q?badcharsetname?= =?US-ASCII?b?/w?=
|
|
10
10
|
=?UTF-7?Q?=41=6D=65=72=69=63=61=E2=80=99=73?=
|
|
11
|
+
=?UTF-7?b?K0FHRUEt?=
|
|
11
12
|
|
|
12
13
|
The subject header contains various RFC2047 encoded words.
|
|
13
14
|
For completeness we test both base64 and quoted-printable, and some
|
|
@@ -57,4 +57,11 @@ Content-Disposition: attachment; filename="ascii.txt"
|
|
|
57
57
|
|
|
58
58
|
This is +Jyg-UTF-7+Jyg-
|
|
59
59
|
--===============2385509127900810307==
|
|
60
|
+
Content-Type: text/plain; charset="utf-7"
|
|
61
|
+
Content-Transfer-Encoding: 7bit
|
|
62
|
+
MIME-Version: 1.0
|
|
63
|
+
Content-Disposition: attachment; filename="bad-utf7.txt"
|
|
64
|
+
|
|
65
|
+
Bad +AGEA- UTF-7
|
|
66
|
+
--===============2385509127900810307==
|
|
60
67
|
|