thunderbird 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thunderbird/mbox.rb +39 -0
- data/lib/thunderbird/version.rb +2 -2
- data/thunderbird.gemspec +1 -0
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0a36f18150baeaca38257b5960f587109627efc496984dc106600d378213956
|
4
|
+
data.tar.gz: 7617ad0f5425c70529507944aad50db6e68395f2296dbc0357824ad6484e0acb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86bfecfb40f78d1291bbf7da3e88497936fc0c2ed73aa7fa26d16838acc13303477a703f65ed117cd6e10b9ee2bac699eb427e9169ea29ad290bae4b0a6cdced
|
7
|
+
data.tar.gz: 68259a791aee48238e634eb5a00d49e1ca88d3df718d886b5cf59c9e78145538b51499a4a1ad5e5f0e06ee73bddd3f3e0b6c2d2e50dde5e0a51e2dd850cc0414
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mork/parser"
|
4
|
+
|
5
|
+
class Thunderbird
|
6
|
+
class Mbox
|
7
|
+
attr_reader :path
|
8
|
+
|
9
|
+
def initialize(path:)
|
10
|
+
@path = path
|
11
|
+
end
|
12
|
+
|
13
|
+
def each(&block)
|
14
|
+
content = File.read(path)
|
15
|
+
data = parser.data(content)
|
16
|
+
messages = data.tables[MESSAGE_NAMESPACE]["1"]
|
17
|
+
File.open(index_path) do |file|
|
18
|
+
messages.each do |id, message_info|
|
19
|
+
message_size = message_info["offlineMsgSize"]
|
20
|
+
length = message_size.to_i(16)
|
21
|
+
message = file.read(length)
|
22
|
+
block.call(id, message)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
MESSAGE_NAMESPACE = "ns:msg:db:row:scope:msgs:all"
|
30
|
+
|
31
|
+
def parser
|
32
|
+
@parser ||= Mork::Parser.new
|
33
|
+
end
|
34
|
+
|
35
|
+
def index_path
|
36
|
+
"#{path}.msf"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/thunderbird/version.rb
CHANGED
data/thunderbird.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thunderbird
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Yates
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mork-parser
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.1
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: os
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,7 +38,7 @@ dependencies:
|
|
24
38
|
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
|
-
description:
|
41
|
+
description:
|
28
42
|
email:
|
29
43
|
- joe.g.yates@gmail.com
|
30
44
|
executables: []
|
@@ -36,6 +50,7 @@ files:
|
|
36
50
|
- lib/thunderbird.rb
|
37
51
|
- lib/thunderbird/install.rb
|
38
52
|
- lib/thunderbird/local_folder.rb
|
53
|
+
- lib/thunderbird/mbox.rb
|
39
54
|
- lib/thunderbird/profile.rb
|
40
55
|
- lib/thunderbird/profiles.rb
|
41
56
|
- lib/thunderbird/subdirectory.rb
|
@@ -50,7 +65,7 @@ metadata:
|
|
50
65
|
source_code_uri: https://github.com/joeyates/thunderbird
|
51
66
|
changelog_uri: https://github.com/joeyates/thunderbird/blob/main/CHANGELOG.md
|
52
67
|
rubygems_mfa_required: 'true'
|
53
|
-
post_install_message:
|
68
|
+
post_install_message:
|
54
69
|
rdoc_options: []
|
55
70
|
require_paths:
|
56
71
|
- lib
|
@@ -65,8 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
80
|
- !ruby/object:Gem::Version
|
66
81
|
version: '0'
|
67
82
|
requirements: []
|
68
|
-
rubygems_version: 3.3
|
69
|
-
signing_key:
|
83
|
+
rubygems_version: 3.5.3
|
84
|
+
signing_key:
|
70
85
|
specification_version: 4
|
71
86
|
summary: Conveniences for interacting with Mozilla Thunderbird
|
72
87
|
test_files: []
|