sms_backup_renderer 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/sms_backup_renderer/parser.rb +7 -1
- data/lib/sms_backup_renderer/version.rb +1 -1
- data/sms_backup_renderer.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2eaefa4b7709115e5b0095317eb46a4b761efeb
|
4
|
+
data.tar.gz: b74cbe49f967e7ed2cda2abe23aae359d32481f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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')),
|
data/sms_backup_renderer.gemspec
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2017-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|