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: 9c6cdfbc6a52ca7ae467378ff36cb35ad24c8a4dcbeee36a3953daab19a8e6e2
4
- data.tar.gz: 28768a3f6378e7e5c2327cdec73dcdff9bab064f32e9f7c93784e49fac3f249d
3
+ metadata.gz: 9aa3bc95443845a57aca895eb7dce6486c89f8458ec2f061dbe84a784ab89dd5
4
+ data.tar.gz: a909ca881d4bbbbdd0bfd227bcc4d96f3d84ad5ec63182424e991c3c5e0e5ae7
5
5
  SHA512:
6
- metadata.gz: e7f1101ccbf489834f48a5bc909758bb6d1d4b0c34a512a4b17b31efcf9d851a0c1d7174e8745b35671df9cd2e9d4b525216e4d2a9800dbb63c16d1047f0432a
7
- data.tar.gz: 2e8601ef4107929d5ce524e62badaa5b7f16afebb4b7527455ffcf0542b12c4bdc0aee5147bf053f2e505e04593e52f6674127718a174064069bde897564af89
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
- #### `imessage`
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: fasle) Whether to load only messages with attachments
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
- #### `imessage`
42
+ #### `message`
42
43
  Transform an iMessage message into Chronicle Schema
@@ -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.4.4"
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 :db, default: File.join(Dir.home, 'Library', 'Messages', 'chat.db'), required: true
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(@config.db, results_as_hash: true)
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: nil,
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
- represent: 'identity',
132
+ represents: 'identity',
132
133
  provider: 'icloud',
133
134
  provider_id: icloud_account[:dsid],
134
135
  title: icloud_account[:display_name],
@@ -1,5 +1,5 @@
1
1
  module Chronicle
2
2
  module Imessage
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.7"
4
4
  end
5
5
  end
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
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-03-16 00:00:00.000000000 Z
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.4.4
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.4.4
26
+ version: '0.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement