imapget 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ChangeLog +5 -0
- data/README +3 -3
- data/Rakefile +2 -2
- data/example/config.yaml +12 -11
- data/lib/imapget/cli.rb +2 -2
- data/lib/imapget/version.rb +2 -2
- data/lib/imapget.rb +2 -2
- metadata +20 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fe656b65453bccee9c4e108fa5c88f00647beeaccaae7b579cf5892f9e8c4236
|
4
|
+
data.tar.gz: d3a01358001af8415f4aff124863f7f5cc59008408cf14a8c2f034298eb043c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 431bc3e4b193c523cc044fcba3c5c49ca8d18daeabd28387170e5eabede4cf674fdec6eb8b95a7fe59bee399b85ef23daa0dd32ee8d15319333f4038a1863a37
|
7
|
+
data.tar.gz: 5a06d9e2e9898dc41bc1ada7ef41c083683d94bb7c5e34ab92c2bc6f5e778d9dcb9d1531123f73d5b91e0a9a434fe89412b9ec8b69d670dc743f9dd2e0bae29b
|
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
== VERSION
|
4
4
|
|
5
|
-
This documentation refers to imapget version 0.
|
5
|
+
This documentation refers to imapget version 0.3.0
|
6
6
|
|
7
7
|
|
8
8
|
== DESCRIPTION
|
@@ -14,7 +14,7 @@ server! Thus, it's different from your typical *sync* tool.
|
|
14
14
|
|
15
15
|
== LINKS
|
16
16
|
|
17
|
-
Documentation:: https://blackwinter.github.
|
17
|
+
Documentation:: https://blackwinter.github.io/imapget
|
18
18
|
Source code:: https://github.com/blackwinter/imapget
|
19
19
|
RubyGem:: https://rubygems.org/gems/imapget
|
20
20
|
|
@@ -26,7 +26,7 @@ RubyGem:: https://rubygems.org/gems/imapget
|
|
26
26
|
|
27
27
|
== LICENSE AND COPYRIGHT
|
28
28
|
|
29
|
-
Copyright (C) 2009-
|
29
|
+
Copyright (C) 2009-2022 Jens Wille
|
30
30
|
|
31
31
|
imapget is free software: you can redistribute it and/or modify it under
|
32
32
|
the terms of the GNU Affero General Public License as published by the Free
|
data/Rakefile
CHANGED
@@ -13,9 +13,9 @@ begin
|
|
13
13
|
email: %q{jens.wille@gmail.com},
|
14
14
|
license: %q{AGPL-3.0},
|
15
15
|
homepage: :blackwinter,
|
16
|
-
dependencies: { cyclops: '~> 0.
|
16
|
+
dependencies: { cyclops: '~> 0.3', nuggets: '~> 1.5' },
|
17
17
|
|
18
|
-
required_ruby_version: '>= 1
|
18
|
+
required_ruby_version: '>= 2.1'
|
19
19
|
}
|
20
20
|
}}
|
21
21
|
rescue LoadError => err
|
data/example/config.yaml
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
### Global settings
|
2
2
|
|
3
|
-
:
|
4
|
-
:
|
3
|
+
default_config:
|
4
|
+
base_dir: /var/backup/mail # Point to storage location or specify on command-line.
|
5
|
+
strategy: exclude # This is the default strategy.
|
5
6
|
|
6
7
|
|
7
8
|
### Profiles
|
8
9
|
|
9
10
|
# Get all mailboxes (via SSL), *except* Spam and Trash.
|
10
11
|
you-1:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
host: imap.example.com
|
13
|
+
port: 123
|
14
|
+
ssl: true
|
15
|
+
user: login
|
16
|
+
exclude:
|
16
17
|
- Spam
|
17
18
|
- Trash
|
18
19
|
|
19
20
|
# Get *only* mailboxes INBOX, Sent, and Drafts.
|
20
21
|
you-2:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
host: imap.example.com
|
23
|
+
user: login2
|
24
|
+
strategy: include
|
25
|
+
include:
|
25
26
|
- INBOX
|
26
27
|
- Sent
|
27
28
|
- Drafts
|
data/lib/imapget/cli.rb
CHANGED
@@ -50,7 +50,7 @@ class IMAPGet
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def run(arguments)
|
53
|
-
|
53
|
+
default_config, profiles = config.delete(:default_config), config.to_a
|
54
54
|
|
55
55
|
(arguments.empty? ? profiles.map(&:first) : arguments).each { |profile|
|
56
56
|
profile_config = profile_config(profile, profiles, default_config) or next
|
@@ -67,7 +67,7 @@ class IMAPGet
|
|
67
67
|
} }
|
68
68
|
else
|
69
69
|
imapget.get(options[:directory] ||
|
70
|
-
File.join(profile_config[:base_dir] || '.', profile))
|
70
|
+
File.join(profile_config[:base_dir] || '.', profile.to_s))
|
71
71
|
end
|
72
72
|
}
|
73
73
|
end
|
data/lib/imapget/version.rb
CHANGED
data/lib/imapget.rb
CHANGED
@@ -68,7 +68,7 @@ class IMAPGet
|
|
68
68
|
end)
|
69
69
|
}
|
70
70
|
|
71
|
-
@strategy = options.fetch(:strategy, DEFAULT_STRATEGY)
|
71
|
+
@strategy = options.fetch(:strategy, DEFAULT_STRATEGY).to_sym
|
72
72
|
end
|
73
73
|
|
74
74
|
def mailboxes
|
@@ -183,7 +183,7 @@ class IMAPGet
|
|
183
183
|
def fetch(mail, dir, name)
|
184
184
|
uid = mail.attr['UID'].to_s
|
185
185
|
file = File.join(dir, uid)
|
186
|
-
exists = File.
|
186
|
+
exists = File.exist?(file)
|
187
187
|
|
188
188
|
if deleted?(mail)
|
189
189
|
if exists
|
metadata
CHANGED
@@ -1,35 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imapget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDMDCCAhigAwIBAgIBADANBg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
-
H19TDW3R9p594jCl1ykPs3dz/0Bk+r1HTd35Yw+yBbyprSJb4S7OcRRHCryuo09l
|
29
|
-
NBGyZvOBuqUp0xostWSk0dfxyn/YQ7eqvQRGBhK1VGa7Tg/KYqnemDE57+VOXrua
|
30
|
-
59wzaA==
|
31
|
-
-----END CERTIFICATE-----
|
32
|
-
date: 2016-03-25 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
33
12
|
dependencies:
|
34
13
|
- !ruby/object:Gem::Dependency
|
35
14
|
name: cyclops
|
@@ -37,48 +16,48 @@ dependencies:
|
|
37
16
|
requirements:
|
38
17
|
- - "~>"
|
39
18
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
19
|
+
version: '0.3'
|
41
20
|
type: :runtime
|
42
21
|
prerelease: false
|
43
22
|
version_requirements: !ruby/object:Gem::Requirement
|
44
23
|
requirements:
|
45
24
|
- - "~>"
|
46
25
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
26
|
+
version: '0.3'
|
48
27
|
- !ruby/object:Gem::Dependency
|
49
28
|
name: nuggets
|
50
29
|
requirement: !ruby/object:Gem::Requirement
|
51
30
|
requirements:
|
52
31
|
- - "~>"
|
53
32
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
33
|
+
version: '1.5'
|
55
34
|
type: :runtime
|
56
35
|
prerelease: false
|
57
36
|
version_requirements: !ruby/object:Gem::Requirement
|
58
37
|
requirements:
|
59
38
|
- - "~>"
|
60
39
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
40
|
+
version: '1.5'
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: hen
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
44
|
requirements:
|
66
45
|
- - "~>"
|
67
46
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
47
|
+
version: '0.9'
|
69
48
|
- - ">="
|
70
49
|
- !ruby/object:Gem::Version
|
71
|
-
version: 0.
|
50
|
+
version: 0.9.1
|
72
51
|
type: :development
|
73
52
|
prerelease: false
|
74
53
|
version_requirements: !ruby/object:Gem::Requirement
|
75
54
|
requirements:
|
76
55
|
- - "~>"
|
77
56
|
- !ruby/object:Gem::Version
|
78
|
-
version: '0.
|
57
|
+
version: '0.9'
|
79
58
|
- - ">="
|
80
59
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
60
|
+
version: 0.9.1
|
82
61
|
- !ruby/object:Gem::Dependency
|
83
62
|
name: rake
|
84
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,13 +97,14 @@ licenses:
|
|
118
97
|
metadata: {}
|
119
98
|
post_install_message: |2+
|
120
99
|
|
121
|
-
imapget-0.
|
100
|
+
imapget-0.3.0 [2022-08-19]:
|
122
101
|
|
123
|
-
*
|
102
|
+
* Introduced default config section.
|
103
|
+
* Switched config to strings.
|
124
104
|
|
125
105
|
rdoc_options:
|
126
106
|
- "--title"
|
127
|
-
- imapget Application documentation (v0.
|
107
|
+
- imapget Application documentation (v0.3.0)
|
128
108
|
- "--charset"
|
129
109
|
- UTF-8
|
130
110
|
- "--line-numbers"
|
@@ -137,16 +117,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
117
|
requirements:
|
138
118
|
- - ">="
|
139
119
|
- !ruby/object:Gem::Version
|
140
|
-
version: 1
|
120
|
+
version: '2.1'
|
141
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
122
|
requirements:
|
143
123
|
- - ">="
|
144
124
|
- !ruby/object:Gem::Version
|
145
125
|
version: '0'
|
146
126
|
requirements: []
|
147
|
-
|
148
|
-
|
149
|
-
signing_key:
|
127
|
+
rubygems_version: 3.3.5
|
128
|
+
signing_key:
|
150
129
|
specification_version: 4
|
151
130
|
summary: Get IMAP mails.
|
152
131
|
test_files: []
|
132
|
+
...
|