sup 1.0 → 1.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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/checks.yml +58 -0
  3. data/.rubocop.yml +5 -0
  4. data/CONTRIBUTORS +5 -2
  5. data/Gemfile +5 -1
  6. data/History.txt +33 -0
  7. data/Manifest.txt +171 -0
  8. data/README.md +9 -4
  9. data/Rakefile +40 -1
  10. data/bin/sup-add +4 -8
  11. data/bin/sup-sync-back-maildir +1 -1
  12. data/contrib/nix/Gemfile +22 -0
  13. data/contrib/nix/Gemfile.lock +80 -0
  14. data/contrib/nix/README +7 -0
  15. data/contrib/nix/gem-install-shell.nix +12 -0
  16. data/contrib/nix/gemset.nix +339 -0
  17. data/contrib/nix/ruby2.4-Gemfile.lock +81 -0
  18. data/contrib/nix/ruby2.4-gemset.nix +309 -0
  19. data/contrib/nix/ruby2.4-shell.nix +30 -0
  20. data/contrib/nix/ruby2.5-Gemfile.lock +81 -0
  21. data/contrib/nix/ruby2.5-gemset.nix +309 -0
  22. data/contrib/nix/ruby2.5-shell.nix +30 -0
  23. data/contrib/nix/ruby2.6-Gemfile.lock +83 -0
  24. data/contrib/nix/ruby2.6-gemset.nix +319 -0
  25. data/contrib/nix/ruby2.6-shell.nix +30 -0
  26. data/contrib/nix/ruby2.7-shell.nix +23 -0
  27. data/contrib/nix/ruby3.0-shell.nix +23 -0
  28. data/contrib/nix/ruby3.1-shell.nix +23 -0
  29. data/contrib/nix/ruby3.2-shell.nix +23 -0
  30. data/contrib/nix/ruby3.3-shell.nix +23 -0
  31. data/contrib/nix/test-all-rubies.sh +6 -0
  32. data/doc/Hooks.txt +1 -1
  33. data/ext/mkrf_conf_xapian.rb +12 -6
  34. data/lib/sup/colormap.rb +1 -1
  35. data/lib/sup/crypto.rb +1 -1
  36. data/lib/sup/hook.rb +1 -1
  37. data/lib/sup/index.rb +4 -4
  38. data/lib/sup/keymap.rb +1 -1
  39. data/lib/sup/maildir.rb +5 -5
  40. data/lib/sup/mbox.rb +5 -5
  41. data/lib/sup/message.rb +8 -7
  42. data/lib/sup/message_chunks.rb +27 -19
  43. data/lib/sup/modes/completion_mode.rb +0 -1
  44. data/lib/sup/modes/console_mode.rb +1 -1
  45. data/lib/sup/modes/file_browser_mode.rb +2 -2
  46. data/lib/sup/modes/label_list_mode.rb +1 -1
  47. data/lib/sup/modes/search_list_mode.rb +2 -2
  48. data/lib/sup/modes/thread_view_mode.rb +1 -2
  49. data/lib/sup/rfc2047.rb +21 -6
  50. data/lib/sup/source.rb +8 -2
  51. data/lib/sup/textfield.rb +0 -1
  52. data/lib/sup/thread.rb +20 -21
  53. data/lib/sup/util.rb +31 -53
  54. data/lib/sup/version.rb +1 -1
  55. data/lib/sup.rb +12 -8
  56. data/man/sup-add.1 +39 -39
  57. data/man/sup-config.1 +31 -27
  58. data/man/sup-dump.1 +34 -35
  59. data/man/sup-import-dump.1 +36 -32
  60. data/man/sup-psych-ify-config-files.1 +29 -25
  61. data/man/sup-recover-sources.1 +32 -28
  62. data/man/sup-sync-back-maildir.1 +34 -30
  63. data/man/sup-sync.1 +40 -36
  64. data/man/sup-tweak-labels.1 +36 -32
  65. data/man/sup.1 +41 -37
  66. data/shell.nix +1 -0
  67. data/sup.gemspec +6 -4
  68. data/test/dummy_source.rb +21 -15
  69. data/test/fixtures/embedded-message.eml +34 -0
  70. data/test/fixtures/non-ascii-header-in-nested-message.eml +36 -0
  71. data/test/fixtures/non-ascii-header.eml +8 -0
  72. data/test/fixtures/rfc2047-header-encoding.eml +15 -0
  73. data/test/fixtures/text-attachments-with-charset.eml +15 -1
  74. data/test/fixtures/utf8-header.eml +17 -0
  75. data/test/integration/test_maildir.rb +3 -0
  76. data/test/integration/test_mbox.rb +4 -1
  77. data/test/integration/test_sup-add.rb +83 -0
  78. data/test/integration/test_sup-sync-back-maildir.rb +40 -0
  79. data/test/test_crypto.rb +44 -0
  80. data/test/test_header_parsing.rb +11 -3
  81. data/test/test_helper.rb +7 -4
  82. data/test/test_message.rb +124 -32
  83. data/test/test_messages_dir.rb +13 -15
  84. data/test/unit/test_horizontal_selector.rb +4 -4
  85. data/test/unit/test_locale_fiddler.rb +1 -1
  86. data/test/unit/util/test_query.rb +1 -1
  87. data/test/unit/util/test_string.rb +3 -3
  88. data/test/unit/util/test_uri.rb +2 -2
  89. metadata +69 -18
  90. data/.travis.yml +0 -18
  91. data/bin/sup-psych-ify-config-files +0 -21
  92. data/test/integration/test_label_service.rb +0 -18
  93. data/test/test_yaml_migration.rb +0 -85
@@ -1,15 +1,11 @@
1
- .\" Automatically generated by Pandoc 2.7.3
1
+ .\" Automatically generated by Pandoc 3.1.9
2
2
  .\"
3
3
  .TH "SUP-SYNC-BACK-MAILDIR" "1" "August 25, 2014" "Sup User Manual" ""
4
- .hy
5
4
  .SH NAME
6
- .PP
7
5
  sup-sync-back-maildir - Export Xapian entries to Maildir sources on disk
8
6
  .SH SYNOPSIS
9
- .PP
10
7
  sup-sync-back-maildir [\f[I]options\f[R]] [\f[I]source uri\&...\f[R]]
11
8
  .SH DESCRIPTION
12
- .PP
13
9
  This script parses the Xapian entries for a given Maildir source and
14
10
  renames (changes maildir flags) e-mail files on disk according to the
15
11
  labels stored in the index.
@@ -35,62 +31,68 @@ sources marked as usual and that have not disabled sync back using the
35
31
  configuration parameter sync_back = false in sources.yaml.
36
32
  .SH OPTIONS
37
33
  .TP
38
- .B -n, --no-confirm
34
+ -n, --no-confirm
39
35
  Don\[cq]t ask for confirmation before synchronizing
40
36
  .TP
41
- .B -m, --no-merge
37
+ -m, --no-merge
42
38
  Don\[cq]t merge new supported Maildir flags (R and P)
43
39
  .TP
44
- .B -l, --list-sources
40
+ -l, --list-sources
45
41
  List your Maildir sources and exit
46
42
  .TP
47
- .B -u, --unusual-sources-too
43
+ -u, --unusual-sources-too
48
44
  Sync unusual sources too if no specific source information is given
49
45
  .TP
50
- .B --version
46
+ --version
51
47
  Print version and exit
52
48
  .TP
53
- .B -h, --help
49
+ -h, --help
54
50
  Show brief help message
55
51
  .SH FILES
56
52
  .TP
57
- .B $HOME/.sup/sources.yaml
53
+ $HOME/.sup/sources.yaml
58
54
  Configuration file for Sup mail sources
59
55
  .SH SEE ALSO
60
- .PP
61
56
  sup(1), sup-add(1), sup-config(1), sup-dump(1), sup-sync(1),
62
57
  sup-tweak-labels(1)
63
58
  .SH REPORTING BUGS
64
- .PP
65
59
  You are welcome to submit bug reports to the Sup issue tracker, located
66
60
  at
67
61
  .PP
68
- <https://github.com/sup-heliotrope/sup/issues>
62
+ \c
63
+ .UR https://github.com/sup-heliotrope/sup/issues
64
+ .UE \c
69
65
  .SH CONTACT INFORMATION
70
66
  .TP
71
- .B The Sup web page:
72
- <http://supmua.org/>
73
- .TP
74
- .B Code repository:
75
- <https://github.com/sup-heliotrope/sup/>
67
+ The Sup web page:
68
+ \c
69
+ .UR https://sup-heliotrope.github.io/
70
+ .UE \c
76
71
  .TP
77
- .B Sup Wiki:
78
- <https://github.com/sup-heliotrope/sup/wiki/>
72
+ Code repository:
73
+ \c
74
+ .UR https://github.com/sup-heliotrope/sup/
75
+ .UE \c
79
76
  .TP
80
- .B Sup IRC channel:
81
- #sup \[at] freenode.net
77
+ Sup Wiki:
78
+ \c
79
+ .UR https://github.com/sup-heliotrope/sup/wiki/
80
+ .UE \c
82
81
  .TP
83
- .B Mailing list:
82
+ Mailing list:
84
83
  supmua\[at]googlegroups.com
85
84
  .RS
86
85
  .PP
87
86
  supmua+subscribe\[at]googlegroups.com
88
87
  .PP
89
- Archives: <https://groups.google.com/d/forum/supmua/>
88
+ Archives: \c
89
+ .UR https://groups.google.com/d/forum/supmua/
90
+ .UE \c
90
91
  .RE
91
92
  .SH COPYRIGHT
92
- .PP
93
- Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
93
+ Copyright © 2006-2009 William Morgan \c
94
+ .MT mworgan-sup@masanjin.net
95
+ .ME \c
94
96
  .PP
95
97
  Copyright \[at] 2013-2014 Sup developers
96
98
  .PP
@@ -98,5 +100,7 @@ Permission is granted to copy and distribute this manual under the terms
98
100
  of the GNU General Public License; either version 2 or (at your option)
99
101
  any later version.
100
102
  .SH AUTHORS
101
- Sup was originally written by William Morgan <wmorgan-sup@masanjin.net>
102
- and is now developed and maintained by the Sup developers.
103
+ Sup was originally written by William Morgan \c
104
+ .MT wmorgan-sup@masanjin.net
105
+ .ME \c
106
+ \ and is now developed and maintained by the Sup developers.
data/man/sup-sync.1 CHANGED
@@ -1,15 +1,11 @@
1
- .\" Automatically generated by Pandoc 2.7.3
1
+ .\" Automatically generated by Pandoc 3.1.9
2
2
  .\"
3
3
  .TH "SUP-SYNC" "1" "April 9, 2012" "Sup User Manual" ""
4
- .hy
5
4
  .SH NAME
6
- .PP
7
5
  sup-sync - sychronize the Sup index with message sources
8
6
  .SH SYNOPSIS
9
- .PP
10
7
  sup-sync [\f[I]options\f[R]] source \&...
11
8
  .SH DESCRIPTION
12
- .PP
13
9
  Synchronizes the Sup index with one or more message sources by adding
14
10
  messages, deleting messages, or changing message state in the index as
15
11
  appropriate.
@@ -30,86 +26,92 @@ Supported source URI schemes can be seen by running \[lq]sup-add
30
26
  --help\[rq].
31
27
  .SH MESSAGE STATE OPTIONS
32
28
  .TP
33
- .B --asis
29
+ --asis
34
30
  If the message is already in the index, preserve its state.
35
31
  Otherwise, use default source state (default)
36
32
  .TP
37
- .B --restore dumpfile
33
+ --restore dumpfile
38
34
  Restore message state from a dump file created with sup-dump.
39
35
  If a message is not in this dumpfile, act as --asis
40
36
  .TP
41
- .B --discard
37
+ --discard
42
38
  Discard any message state in the index and use the default source state.
43
39
  \f[B]Dangerous!\f[R]
44
40
  .TP
45
- .B -x, -
41
+ -x, -
46
42
  When using the default source state, mark messages as archived.
47
43
  .TP
48
- .B -r, --read
44
+ -r, --read
49
45
  When using the default source state, mark messages as read.
50
46
  .TP
51
- .B --extra-labels \f[I]STRING\f[R]
47
+ --extra-labels \f[I]STRING\f[R]
52
48
  When using the default source state, also apply these user-defined
53
49
  labels (a comma-separated list) (default)
54
50
  .SH OTHER OPTIONS
55
51
  .TP
56
- .B -v, --verbose
52
+ -v, --verbose
57
53
  Print message ids as they\[cq]re processed.
58
54
  .TP
59
- .B -o, --optimize
55
+ -o, --optimize
60
56
  As the final operation, optimize the index.
61
57
  .TP
62
- .B --all-sources
58
+ --all-sources
63
59
  Scan over all sources.
64
60
  .TP
65
- .B -n, --dry-run
61
+ -n, --dry-run
66
62
  Don\[cq]t actually modify the index.
67
63
  Probably only useful with --verbose.
68
64
  .TP
69
- .B --version
65
+ --version
70
66
  Show version information
71
67
  .TP
72
- .B -h, --help
68
+ -h, --help
73
69
  Show help message
74
70
  .SH FILES
75
71
  .TP
76
- .B $HOME/.sup/sources.yaml
72
+ $HOME/.sup/sources.yaml
77
73
  Configuration file for Sup mail sources
78
74
  .SH SEE ALSO
79
- .PP
80
75
  sup(1), sup-add(1), sup-config(1), sup-dump(1),
81
76
  sup-sync-back-maildir(1), sup-tweak-labels(1)
82
77
  .SH REPORTING BUGS
83
- .PP
84
78
  You are welcome to submit bug reports to the Sup issue tracker, located
85
79
  at
86
80
  .PP
87
- <https://github.com/sup-heliotrope/sup/issues>
81
+ \c
82
+ .UR https://github.com/sup-heliotrope/sup/issues
83
+ .UE \c
88
84
  .SH CONTACT INFORMATION
89
85
  .TP
90
- .B The Sup web page:
91
- <http://supmua.org/>
92
- .TP
93
- .B Code repository:
94
- <https://github.com/sup-heliotrope/sup/>
86
+ The Sup web page:
87
+ \c
88
+ .UR https://sup-heliotrope.github.io/
89
+ .UE \c
95
90
  .TP
96
- .B Sup Wiki:
97
- <https://github.com/sup-heliotrope/sup/wiki/>
91
+ Code repository:
92
+ \c
93
+ .UR https://github.com/sup-heliotrope/sup/
94
+ .UE \c
98
95
  .TP
99
- .B Sup IRC channel:
100
- #sup \[at] freenode.net
96
+ Sup Wiki:
97
+ \c
98
+ .UR https://github.com/sup-heliotrope/sup/wiki/
99
+ .UE \c
101
100
  .TP
102
- .B Mailing list:
101
+ Mailing list:
103
102
  supmua\[at]googlegroups.com
104
103
  .RS
105
104
  .PP
106
105
  supmua+subscribe\[at]googlegroups.com
107
106
  .PP
108
- Archives: <https://groups.google.com/d/forum/supmua/>
107
+ Archives: \c
108
+ .UR https://groups.google.com/d/forum/supmua/
109
+ .UE \c
109
110
  .RE
110
111
  .SH COPYRIGHT
111
- .PP
112
- Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
112
+ Copyright © 2006-2009 William Morgan \c
113
+ .MT mworgan-sup@masanjin.net
114
+ .ME \c
113
115
  .PP
114
116
  Copyright \[at] 2013-2014 Sup developers
115
117
  .PP
@@ -117,5 +119,7 @@ Permission is granted to copy and distribute this manual under the terms
117
119
  of the GNU General Public License; either version 2 or (at your option)
118
120
  any later version.
119
121
  .SH AUTHORS
120
- Sup was originally written by William Morgan <wmorgan-sup@masanjin.net>
121
- and is now developed and maintained by the Sup developers.
122
+ Sup was originally written by William Morgan \c
123
+ .MT wmorgan-sup@masanjin.net
124
+ .ME \c
125
+ \ and is now developed and maintained by the Sup developers.
@@ -1,85 +1,87 @@
1
- .\" Automatically generated by Pandoc 2.7.3
1
+ .\" Automatically generated by Pandoc 3.1.9
2
2
  .\"
3
3
  .TH "SUP-TWEAK-LABELS" "1" "April 9, 2012" "Sup User Manuel" ""
4
- .hy
5
4
  .SH NAME
6
- .PP
7
5
  sup-tweak-labels - batch modification of message state already in index
8
6
  .SH SYNOPSIS
9
- .PP
10
7
  sup-tweak-labels [\f[I]options\f[R]] source \&...
11
8
  .SH DESCRIPTION
12
- .PP
13
9
  Batch modification of message state for messages already in the index.
14
10
  .PP
15
11
  Supported source URI schemes can be seen by running \[lq]sup-add
16
12
  --help\[rq].
17
13
  .SH OPTIONS
18
14
  .TP
19
- .B -a \f[I]STRING\f[R], --add \f[I]STRING\f[R]
15
+ -a \f[I]STRING\f[R], --add \f[I]STRING\f[R]
20
16
  One or more labels (comma-separated) to add to every message from the
21
17
  specified sources (default: )
22
18
  .TP
23
- .B -r \f[I]STRING\f[R], --remove \f[I]STRING\f[R]
19
+ -r \f[I]STRING\f[R], --remove \f[I]STRING\f[R]
24
20
  One or more labels (comma-separated) to remove from every message from
25
21
  the specified sources, if those labels are present (default: )
26
22
  .TP
27
- .B -q \f[I]QUERY\f[R], --query \f[I]QUERY\f[R]
23
+ -q \f[I]QUERY\f[R], --query \f[I]QUERY\f[R]
28
24
  A Sup search query
29
25
  .SH OTHER OPTIONS
30
26
  .TP
31
- .B -v, --verbose
27
+ -v, --verbose
32
28
  Print message ids as they\[cq]re processed
33
29
  .TP
34
- .B -e, --very-verbose
30
+ -e, --very-verbose
35
31
  Print message names and subjects as they\[cq]re processed
36
32
  .TP
37
- .B --all-sources
33
+ --all-sources
38
34
  Scan over all sources
39
35
  .TP
40
- .B -n, --dry-run
36
+ -n, --dry-run
41
37
  Don\[cq]t actually modify the index.
42
38
  Probably only useful with --verbose
43
39
  .TP
44
- .B --version
40
+ --version
45
41
  Show version information
46
42
  .TP
47
- .B -h, --help
43
+ -h, --help
48
44
  Show help message
49
45
  .SH SEE ALSO
50
- .PP
51
46
  sup(1), sup-add(1)
52
47
  .SH REPORTING BUGS
53
- .PP
54
48
  You are welcome to submit bug reports to the Sup issue tracker, located
55
49
  at
56
50
  .PP
57
- <https://github.com/sup-heliotrope/sup/issues>
51
+ \c
52
+ .UR https://github.com/sup-heliotrope/sup/issues
53
+ .UE \c
58
54
  .SH CONTACT INFORMATION
59
55
  .TP
60
- .B The Sup web page:
61
- <http://supmua.org/>
62
- .TP
63
- .B Code repository:
64
- <https://github.com/sup-heliotrope/sup/>
56
+ The Sup web page:
57
+ \c
58
+ .UR https://sup-heliotrope.github.io/
59
+ .UE \c
65
60
  .TP
66
- .B Sup Wiki:
67
- <https://github.com/sup-heliotrope/sup/wiki/>
61
+ Code repository:
62
+ \c
63
+ .UR https://github.com/sup-heliotrope/sup/
64
+ .UE \c
68
65
  .TP
69
- .B Sup IRC channel:
70
- #sup \[at] freenode.net
66
+ Sup Wiki:
67
+ \c
68
+ .UR https://github.com/sup-heliotrope/sup/wiki/
69
+ .UE \c
71
70
  .TP
72
- .B Mailing list:
71
+ Mailing list:
73
72
  supmua\[at]googlegroups.com
74
73
  .RS
75
74
  .PP
76
75
  supmua+subscribe\[at]googlegroups.com
77
76
  .PP
78
- Archives: <https://groups.google.com/d/forum/supmua/>
77
+ Archives: \c
78
+ .UR https://groups.google.com/d/forum/supmua/
79
+ .UE \c
79
80
  .RE
80
81
  .SH COPYRIGHT
81
- .PP
82
- Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
82
+ Copyright © 2006-2009 William Morgan \c
83
+ .MT mworgan-sup@masanjin.net
84
+ .ME \c
83
85
  .PP
84
86
  Copyright \[at] 2013-2014 Sup developers
85
87
  .PP
@@ -87,5 +89,7 @@ Permission is granted to copy and distribute this manual under the terms
87
89
  of the GNU General Public License; either version 2 or (at your option)
88
90
  any later version.
89
91
  .SH AUTHORS
90
- Sup was originally written by William Morgan <wmorgan-sup@masanjin.net>
91
- and is now developed and maintained by the Sup developers.
92
+ Sup was originally written by William Morgan \c
93
+ .MT wmorgan-sup@masanjin.net
94
+ .ME \c
95
+ \ and is now developed and maintained by the Sup developers.
data/man/sup.1 CHANGED
@@ -1,15 +1,11 @@
1
- .\" Automatically generated by Pandoc 2.7.3
1
+ .\" Automatically generated by Pandoc 3.1.9
2
2
  .\"
3
3
  .TH "SUP" "1" "April 8, 2014" "Sup User Manual" ""
4
- .hy
5
4
  .SH NAME
6
- .PP
7
5
  sup - a curses-based email client
8
6
  .SH SYNOPSIS
9
- .PP
10
7
  sup [\f[I]options\f[R]]
11
8
  .SH DESCRIPTION
12
- .PP
13
9
  Sup is a console-based email client for people with a lot of email.
14
10
  .PP
15
11
  It presents an interface of a list of threads, which are each
@@ -21,92 +17,98 @@ If you\[cq]re the type of person who treats email as an extension of
21
17
  your long-term memory, Sup is for you.
22
18
  .SH OPTIONS
23
19
  .TP
24
- .B -l, --list-hooks
20
+ -l, --list-hooks
25
21
  List all hooks and descriptions, and quit.
26
22
  Use \[en]hooks-matching to filter
27
23
  .TP
28
- .B -m, --hooks-matching=<s>
24
+ -m, --hooks-matching=<s>
29
25
  If given, list all hooks and descriptions matching the given pattern.
30
26
  Needs the \[en]list-hooks option (default: )
31
27
  .TP
32
- .B -n, --no-threads
28
+ -n, --no-threads
33
29
  Turn off threading.
34
30
  Helps with debugging.
35
31
  (Necessarily disables background polling for new messages.)
36
32
  .TP
37
- .B -o, --no-initial-poll
33
+ -o, --no-initial-poll
38
34
  Don\[cq]t poll for new messages when starting.
39
35
  .TP
40
- .B -s \f[I]QUERY\f[R], --search \f[I]QUERY\f[R]
36
+ -s \f[I]QUERY\f[R], --search \f[I]QUERY\f[R]
41
37
  Search for this query upon startup
42
38
  .TP
43
- .B -c \f[I]STRING\f[R], --compose \f[I]STRING\f[R]
39
+ -c \f[I]STRING\f[R], --compose \f[I]STRING\f[R]
44
40
  Compose message to this recipient upon startup
45
41
  .TP
46
- .B -j \f[I]STRING\f[R], --subject \f[I]STRING\f[R]
42
+ -j \f[I]STRING\f[R], --subject \f[I]STRING\f[R]
47
43
  When composing, use this subject
48
44
  .TP
49
- .B -v, --version
45
+ -v, --version
50
46
  Print version and exit
51
47
  .TP
52
- .B -h, --help
48
+ -h, --help
53
49
  Show brief help message
54
50
  .SH ENVIRONMENT
55
51
  .TP
56
- .B SUP_LOG_LEVEL
52
+ SUP_LOG_LEVEL
57
53
  Set log level verbosity.
58
54
  Valid values ordered by decresing verbosity: debug info warn error.
59
55
  Default log level is info.
60
56
  .TP
61
- .B SUP_BASE\[rs]
57
+ SUP_BASE\[rs]
62
58
  Specify home directory for configuration files and xapian index,
63
59
  defaults to: $HOME/.sup.
64
60
  .SH FILES
65
61
  .TP
66
- .B $HOME/.sup/config.yaml
62
+ $HOME/.sup/config.yaml
67
63
  Configuration file for Sup
68
64
  .TP
69
- .B $HOME/.sup/sources.yaml
65
+ $HOME/.sup/sources.yaml
70
66
  Configuration file for Sup mail sources
71
67
  .TP
72
- .B $HOME/.sup/colors.yaml
68
+ $HOME/.sup/colors.yaml
73
69
  Color theme for Sup
74
70
  .SH SEE ALSO
75
- .PP
76
71
  mail(1), sup-add(1), sup-config(1), sup-dump(1), sup-import-dump(1),
77
72
  sup-recover-sources(1), sup-sync(1), sup-sync-back-maildir(1),
78
73
  sup-tweak-labels(1)
79
74
  .SH REPORTING BUGS
80
- .PP
81
75
  You are welcome to submit bug reports to the Sup issue tracker, located
82
76
  at
83
77
  .PP
84
- <https://github.com/sup-heliotrope/sup/issues>
78
+ \c
79
+ .UR https://github.com/sup-heliotrope/sup/issues
80
+ .UE \c
85
81
  .SH CONTACT INFORMATION
86
82
  .TP
87
- .B The Sup web page:
88
- <http://supmua.org/>
89
- .TP
90
- .B Code repository:
91
- <https://github.com/sup-heliotrope/sup/>
83
+ The Sup web page:
84
+ \c
85
+ .UR https://sup-heliotrope.github.io/
86
+ .UE \c
92
87
  .TP
93
- .B Sup Wiki:
94
- <https://github.com/sup-heliotrope/sup/wiki/>
88
+ Code repository:
89
+ \c
90
+ .UR https://github.com/sup-heliotrope/sup/
91
+ .UE \c
95
92
  .TP
96
- .B Sup IRC channel:
97
- #sup \[at] freenode.net
93
+ Sup Wiki:
94
+ \c
95
+ .UR https://github.com/sup-heliotrope/sup/wiki/
96
+ .UE \c
98
97
  .TP
99
- .B Mailing list:
98
+ Mailing list:
100
99
  supmua\[at]googlegroups.com
101
100
  .RS
102
101
  .PP
103
102
  supmua+subscribe\[at]googlegroups.com
104
103
  .PP
105
- Archives: <https://groups.google.com/d/forum/supmua/>
104
+ Archives: \c
105
+ .UR https://groups.google.com/d/forum/supmua/
106
+ .UE \c
106
107
  .RE
107
108
  .SH COPYRIGHT
108
- .PP
109
- Copyright \[co] 2006-2009 William Morgan <mworgan-sup@masanjin.net>
109
+ Copyright © 2006-2009 William Morgan \c
110
+ .MT mworgan-sup@masanjin.net
111
+ .ME \c
110
112
  .PP
111
113
  Copyright \[at] 2013-2014 Sup developers
112
114
  .PP
@@ -114,5 +116,7 @@ Permission is granted to copy and distribute this manual under the terms
114
116
  of the GNU General Public License; either version 2 or (at your option)
115
117
  any later version.
116
118
  .SH AUTHORS
117
- Sup was originally written by William Morgan <wmorgan-sup@masanjin.net>
118
- and is now developed and maintained by the Sup developers.
119
+ Sup was originally written by William Morgan \c
120
+ .MT wmorgan-sup@masanjin.net
121
+ .ME \c
122
+ \ and is now developed and maintained by the Sup developers.
data/shell.nix ADDED
@@ -0,0 +1 @@
1
+ contrib/nix/ruby3.3-shell.nix
data/sup.gemspec CHANGED
@@ -4,7 +4,7 @@ require 'sup/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "sup"
7
- s.version = ENV["REL"] || (::Redwood::VERSION == "git" ? "999" : ::Redwood::VERSION)
7
+ s.version = ENV["REL"] || (/-git-/ =~ ::Redwood::VERSION ? "999" : ::Redwood::VERSION)
8
8
  s.date = Time.now.strftime "%Y-%m-%d"
9
9
  s.authors = ["William Morgan", "Gaute Hope", "Hamish Downer", "Matthieu Rakotojaona"]
10
10
  s.email = "supmua@googlegroups.com"
@@ -32,7 +32,7 @@ SUP: please note that our old mailing lists have been shut down,
32
32
  https://github.com/sup-heliotrope/sup/wiki/Installation%3A-OpenBSD.
33
33
  EOF
34
34
 
35
- s.files = `git ls-files -z`.split("\x0")
35
+ s.files = File.read("Manifest.txt").split
36
36
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
37
37
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
38
38
  s.require_paths = ["lib"]
@@ -51,7 +51,7 @@ SUP: please note that our old mailing lists have been shut down,
51
51
  ## ext/mkrf_conf_xapian.rb and Gemfile.
52
52
 
53
53
  s.add_runtime_dependency "ncursesw", "~> 1.4.0"
54
- s.add_runtime_dependency "rmail", "~> 1.1"
54
+ s.add_runtime_dependency "rmail", ">= 1.1.2", "< 2"
55
55
  s.add_runtime_dependency "highline"
56
56
  s.add_runtime_dependency "optimist"
57
57
  s.add_runtime_dependency "lockfile"
@@ -60,12 +60,14 @@ SUP: please note that our old mailing lists have been shut down,
60
60
  s.add_runtime_dependency "chronic"
61
61
  s.add_runtime_dependency "unicode", "~> 0.4.4"
62
62
  s.add_runtime_dependency "unicode-display_width"
63
+ s.add_runtime_dependency "string-scrub" if /^2\.0\./ =~ RUBY_VERSION
63
64
 
64
65
  s.add_development_dependency "bundler", ">= 1.3", "< 3"
65
66
  s.add_development_dependency "rake"
66
- s.add_development_dependency 'minitest', '~> 5.5.1'
67
+ s.add_development_dependency 'minitest', '~> 5.5'
67
68
  s.add_development_dependency "rr", "~> 1.1"
68
69
  s.add_development_dependency "gpgme", ">= 2.0.2"
69
70
  s.add_development_dependency "pry"
71
+ s.add_development_dependency "rubocop-packaging" unless /^2\.[012]\./ =~ RUBY_VERSION
70
72
 
71
73
  end
data/test/dummy_source.rb CHANGED
@@ -25,32 +25,38 @@ class DummySource < Source
25
25
  return @messages ? @messages.length - 1 : 0
26
26
  end
27
27
 
28
- def load_header offset
29
- Source.parse_raw_email_header StringIO.new(raw_header(offset))
28
+ def with_file_for id
29
+ fn = @messages[id]
30
+ File.open(fn, 'rb') { |f| yield f }
30
31
  end
31
32
 
32
- def load_message offset
33
- RMail::Parser.read raw_message(offset)
33
+ def load_header id
34
+ with_file_for(id) { |f| parse_raw_email_header f }
34
35
  end
35
36
 
36
- def raw_header offset
37
+ def load_message id
38
+ with_file_for(id) { |f| RMail::Parser.read f }
39
+ end
40
+
41
+ def raw_header id
37
42
  ret = ""
38
- f = StringIO.new(@messages[offset])
39
- until f.eof? || (l = f.gets) =~ /^$/
40
- ret += l
43
+ with_file_for(id) do |f|
44
+ until f.eof? || (l = f.gets) =~ /^$/
45
+ ret += l
46
+ end
41
47
  end
42
48
  ret
43
49
  end
44
50
 
45
- def raw_message offset
46
- @messages[offset]
51
+ def raw_message id
52
+ with_file_for(id) { |f| f.read }
47
53
  end
48
54
 
49
- def each_raw_message_line offset
50
- ret = ""
51
- f = StringIO.new(@messages[offset])
52
- until f.eof?
53
- yield f.gets
55
+ def each_raw_message_line id
56
+ with_file_for(id) do |f|
57
+ until f.eof?
58
+ yield f.gets
59
+ end
54
60
  end
55
61
  end
56
62
  end
@@ -0,0 +1,34 @@
1
+ Return-Path: <return@example.com>
2
+ From: Sender <sender@example.com>
3
+ To: <recipient@example.invalid>
4
+ Subject: Email with embedded message
5
+ MIME-Version: 1.0
6
+ Content-Type: multipart/mixed; boundary="----------=_4F506AC2.EE281DC4"
7
+ Message-Id: <9181f493-df49-4af5-8ad2-e1a8eb692a98>
8
+ Date: Wed, 15 Jul 2020 19:48:41 +0100
9
+
10
+ This is a multi-part message in MIME format.
11
+
12
+ ------------=_4F506AC2.EE281DC4
13
+ Content-Type: text/plain; charset=iso-8859-1
14
+ Content-Disposition: inline
15
+ Content-Transfer-Encoding: 8bit
16
+
17
+ Example outer message.
18
+ Example second line.
19
+
20
+
21
+ ------------=_4F506AC2.EE281DC4
22
+ Content-Type: message/rfc822; x-spam-type=original
23
+ Content-Transfer-Encoding: 8bit
24
+
25
+ From: "Embed sender" <embed@example.com>
26
+ To: <rcpt2@example.invalid>
27
+ Subject: Embedded subject line
28
+ Date: Wed, 15 Jul 2020 12:34:56 +0000
29
+
30
+ Example embedded message.
31
+ Second line.
32
+
33
+ ------------=_4F506AC2.EE281DC4--
34
+