chronicle-imessage 0.2.4 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa3bc95443845a57aca895eb7dce6486c89f8458ec2f061dbe84a784ab89dd5
|
4
|
+
data.tar.gz: a909ca881d4bbbbdd0bfd227bcc4d96f3d84ad5ec63182424e991c3c5e0e5ae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b787634292b964a2b1309eba7838fd3c8c06bcfcd55a9c6fd30187d9c24a3a0288936dceb6145fc467e2215864f264198c2538a41396e9adda188821b96de5c9
|
7
|
+
data.tar.gz: a62153bc50f02665f33f5833fafdda3c80accaff1ca75852b0e53270233c65c38094474c251625a80547d613bff8dd7b2d0859d12a7adf718623ccdf68449463
|
data/README.md
CHANGED
@@ -23,12 +23,13 @@ $ chronicle-etl -e imessage --loader csv --limit 10 -o imessages.csv
|
|
23
23
|
## Available Connectors
|
24
24
|
### Extractors
|
25
25
|
|
26
|
-
#### `
|
26
|
+
#### `messages`
|
27
27
|
Extractor for importing messages and attachments from local macOS iMessage install (`~/Library/Messages/chat.db`)
|
28
28
|
|
29
29
|
##### Settings
|
30
|
+
- `input`: (default: ~/Library/Messages/chat.db) Local iMessage sqlite database
|
30
31
|
- `load_attachments`: (default: false) Whether to load message attachments
|
31
|
-
- `only_attachments`: (default:
|
32
|
+
- `only_attachments`: (default: false) Whether to load only messages with attachments
|
32
33
|
|
33
34
|
We want messages to have sender/receiver information set properly so we try to infer your iCloud information and phone number automatically. If these fail, you can provide the necessary information with:
|
34
35
|
- `my_phone_number`: Your phone number (for setting messages's actor fields properly)
|
@@ -38,5 +39,5 @@ We want messages to have sender/receiver information set properly so we try to i
|
|
38
39
|
- Can find in Keychain or by running `$ defaults read MobileMeAccounts Accounts`
|
39
40
|
### Transformers
|
40
41
|
|
41
|
-
#### `
|
42
|
+
#### `message`
|
42
43
|
Transform an iMessage message into Chronicle Schema
|
data/chronicle-imessage.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
|
38
|
-
spec.add_dependency "chronicle-etl", "~> 0.
|
38
|
+
spec.add_dependency "chronicle-etl", "~> 0.5"
|
39
39
|
spec.add_dependency "sqlite3", "~> 1.4"
|
40
40
|
spec.add_dependency "phonelib", "~> 0.6"
|
41
41
|
|
@@ -7,9 +7,10 @@ module Chronicle
|
|
7
7
|
register_connector do |r|
|
8
8
|
r.provider = 'imessage'
|
9
9
|
r.description = 'a local imessage database'
|
10
|
+
r.identifier = 'messages'
|
10
11
|
end
|
11
12
|
|
12
|
-
setting :
|
13
|
+
setting :input, default: File.join(Dir.home, 'Library', 'Messages', 'chat.db'), required: true
|
13
14
|
setting :load_attachments, default: false
|
14
15
|
setting :only_attachments, default: false
|
15
16
|
setting :my_phone_number
|
@@ -40,8 +41,12 @@ module Chronicle
|
|
40
41
|
|
41
42
|
private
|
42
43
|
|
44
|
+
def db_file
|
45
|
+
[@config.input].flatten.first
|
46
|
+
end
|
47
|
+
|
43
48
|
def prepare_data
|
44
|
-
@db = SQLite3::Database.new(
|
49
|
+
@db = SQLite3::Database.new(db_file, results_as_hash: true)
|
45
50
|
@local_contacts = LocalContacts.new
|
46
51
|
@contacts = @local_contacts.contacts
|
47
52
|
|
@@ -65,7 +70,7 @@ module Chronicle
|
|
65
70
|
|
66
71
|
def load_my_icloud_account(local_contacts)
|
67
72
|
{
|
68
|
-
id:
|
73
|
+
id: @config.icloud_account_id || local_contacts.my_icloud_account&.fetch(:AccountID),
|
69
74
|
dsid: @config.icloud_account_dsid || local_contacts.my_icloud_account&.fetch(:AccountDSID),
|
70
75
|
display_name: @config.icloud_account_display_name || @config.my_name || local_contacts.my_icloud_account&.fetch(:DisplayName)
|
71
76
|
}
|
@@ -6,6 +6,7 @@ module Chronicle
|
|
6
6
|
register_connector do |r|
|
7
7
|
r.provider = 'imessage'
|
8
8
|
r.description = 'a row from a local imessage database'
|
9
|
+
r.identifier = 'message'
|
9
10
|
end
|
10
11
|
|
11
12
|
def transform
|
@@ -128,7 +129,7 @@ module Chronicle
|
|
128
129
|
raise(Chronicle::ETL::UntransformableRecordError, "Could not build record due to missing iCloud details. Please provide them through the extractor settings.") unless icloud_account
|
129
130
|
|
130
131
|
record = ::Chronicle::ETL::Models::Entity.new({
|
131
|
-
|
132
|
+
represents: 'identity',
|
132
133
|
provider: 'icloud',
|
133
134
|
provider_id: icloud_account[:dsid],
|
134
135
|
title: icloud_account[:display_name],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chronicle-imessage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Louis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chronicle-etl
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: '0.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|