sms_backup_renderer 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca777b9b54c07e23ee9cd6ad8d5f759d35dda975
4
- data.tar.gz: f0d1547ec2f8a012c58b3f09b3306b72db59c640
3
+ metadata.gz: d2eaefa4b7709115e5b0095317eb46a4b761efeb
4
+ data.tar.gz: b74cbe49f967e7ed2cda2abe23aae359d32481f8
5
5
  SHA512:
6
- metadata.gz: e46fced0b335e29123b6435254010ce42e6ea857103f98efae0cdf32b5da8f09378b9ac12925d96e1222780cb08805ab3070ac524a3c6a768d0947fe0a48954d
7
- data.tar.gz: 5345ec20e294ecf62d5fcd3c3086f1d56171d09afa86ad8bc897f150726ebdd214b1f18c75bb5ae7f363b41dc3ecc5dd4f39ae5b212e8c8b1501119557606514
6
+ metadata.gz: d7bbead2d7b11318b4250955afaa71dc449fcb36d18662cbeed33944abd55312dec45cfa9aec1ea53c38dab44b7e3bdbf2a64c260ccb7afce265006cfaa8a9bf
7
+ data.tar.gz: bd642e7108822a15638c6a82f170c43e14942c7cf12d25ad185adf94014251c0aedbf0ad0e3ad4142bff9cc7cbdc5eff3cddae3c3cf8053c30082a90bdae6446
data/README.md CHANGED
@@ -19,6 +19,12 @@ I suggest creating a new, empty directory to use as the output directory the fir
19
19
 
20
20
  After the command runs, the output directory will contain an `index.html` file you can open in your browser.
21
21
 
22
+ ## Output
23
+
24
+ You can [browse sample pages generated by the tool at this link](https://brokensandals.github.io/sms_backup_renderer/sample-output/index.html). Screenshot:
25
+
26
+ ![screenshot of generated conversation page](docs/sample-output-screenshot.png?raw=true)
27
+
22
28
  ## Caveats
23
29
 
24
30
  The backup files may represent the same number in different ways (e.g `+1 (234) 567-8901` and `2345678901`) at different times.
@@ -46,7 +46,7 @@ module SmsBackupRenderer
46
46
  subject: sms.attr('subject'))
47
47
  when 'mms'
48
48
  mms = Nokogiri::XML(node.outer_xml).at('/mms')
49
- unless mms.attr('ct_t') == 'application/vnd.wap.multipart.related'
49
+ unless ['null', 'application/vnd.wap.multipart.related'].include?(mms.attr('ct_t'))
50
50
  raise "Unrecognized MMS ct_t #{mms.attr('ct_t')}"
51
51
  end
52
52
 
@@ -84,6 +84,12 @@ module SmsBackupRenderer
84
84
  sender: mms_sender_addr_type?(addr.attr('type')))
85
85
  end
86
86
 
87
+ # Some messages include the sender as a recipient as well; we don't want Participants
88
+ # for those recipients since it would interfere with proper conversation grouping.
89
+ if sender = participants.detect(&:sender)
90
+ participants.delete_if { |p| !p.sender && p.normalized_address == sender.normalized_address}
91
+ end
92
+
87
93
  messages << Message.new(
88
94
  date_time: Time.strptime(mms.attr('date'), '%Q'),
89
95
  outgoing: mms_outgoing_type?(mms.attr('m_type')),
@@ -1,3 +1,3 @@
1
1
  module SmsBackupRenderer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
- f.match(%r{^(test|spec|features)/})
17
+ f.match(%r{^(docs|test|spec|features)/})
18
18
  end
19
19
  spec.bindir = "exe"
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_backup_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-24 00:00:00.000000000 Z
11
+ date: 2017-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri