aniero-iphone_data 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -18,6 +18,7 @@ Script to dump data from an iPhone's sync backup files.
18
18
  * Dump SMS message logs as a log file or an mbox file
19
19
  * Dump all of the iPhone backup files into a specified directory
20
20
  * Assumes only a single iPhone right now
21
+ * For SMS logs, only US numbers work correctly, I haven't tested international numbers
21
22
 
22
23
  == SYNOPSIS:
23
24
 
@@ -26,8 +27,8 @@ iphone_data <command> [options]
26
27
  Commands include:
27
28
 
28
29
  help - show help
29
- sms - show sms messages
30
- dump - dump the iphone backup data
30
+ sms - dump sms messages in log or threaded mbox format
31
+ dump - dump the iphone backup data to a specified directory
31
32
 
32
33
  == REQUIREMENTS:
33
34
 
data/Rakefile CHANGED
@@ -12,9 +12,12 @@ task :default => 'spec:run'
12
12
  PROJ.name = 'iphone_data'
13
13
  PROJ.authors = 'Nathan Witmer'
14
14
  PROJ.email = 'nwitmer@gmail.com'
15
- PROJ.url = 'http://github.com'
15
+ PROJ.url = 'http://github.com/aniero/iphone_data'
16
+ PROJ.version = IPhoneData.version
16
17
  PROJ.rubyforge.name = ''
17
18
 
18
19
  PROJ.spec.opts << '--color --format specdoc'
19
20
 
20
- # EOF
21
+ depend_on "plist", ">= 3.0.0"
22
+ depend_on "sqlite3-ruby", ">= 1.2.1"
23
+ depend_on "main", ">= 2.8.0"
@@ -46,9 +46,6 @@ module IPhoneData
46
46
  end
47
47
 
48
48
  require "rubygems"
49
- gem "plist", ">= 3.0.0"
50
- gem "sqlite3-ruby", ">= 1.2.1"
51
- gem "main", ">= 2.8.0"
52
49
  %w(plist sqlite3 main pathname tempfile).each { |lib| require lib }
53
50
 
54
51
  IPhoneData.require_all_libs_relative_to __FILE__
@@ -15,18 +15,14 @@ module IPhoneData
15
15
 
16
16
  option("format", "f") do
17
17
  argument_optional
18
- description "Format in which to dump the sms messages, One of 'log' or 'mbox'"
18
+ description "Format in which to dump the sms messages, One of 'log' or 'mbox'. 'mbox' format is threaded."
19
19
  default "log"
20
20
  validate { |a| %w(log mbox).include? a }
21
+ attribute # put it in local scope for run
21
22
  end
22
23
 
23
24
  run do
24
- case params['format'].value
25
- when "log"
26
- IPhoneData::IPhone.iphones.first.sms_messages.each { |m| puts m.to_s(:log) }
27
- when "mbox"
28
- IPhoneData::IPhone.iphones.first.sms_messages.each { |m| puts m.to_s(:mbox) }
29
- end
25
+ IPhoneData::IPhone.iphones.first.sms_messages.each { |m| puts m.to_s(format.to_sym) }
30
26
  end
31
27
  end
32
28
 
@@ -37,11 +33,11 @@ module IPhoneData
37
33
  argument("dir") do
38
34
  required
39
35
  description "Where to put the files (creates the directory if it doesn't exist)"
40
- attribute # puts it in local scope
36
+ attribute
41
37
  end
42
38
 
43
39
  run do
44
- where = Pathname.new(File.expand_path(dir)) # assigning to dir causes problems?
40
+ where = Pathname.new(File.expand_path(dir))
45
41
  phone = IPhoneData::IPhone.iphones.first
46
42
  puts "dumping #{phone.name.inspect} to #{where}"
47
43
  phone.dump_data(where)
@@ -45,10 +45,12 @@ module IPhoneData
45
45
  FileUtils.mkdir_p(to + File.dirname(key))
46
46
  File.open(to + key, "wb") do |out|
47
47
  case data[key]
48
- when IO
48
+ when StringIO
49
49
  out.write data[key].read # .mbackup file data
50
50
  when Hash
51
51
  out.write Plist::Emit.dump(data[key]) # Info.plist, etc.
52
+ else
53
+ puts "couldn't write out #{key}, don't know how to handle a #{data[key].class}"
52
54
  end
53
55
  end
54
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aniero-iphone_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Witmer
@@ -9,10 +9,36 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-11 00:00:00 -07:00
12
+ date: 2008-05-25 00:00:00 -07:00
13
13
  default_executable: iphone_data
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: plist
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: sqlite3-ruby
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.2.1
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: main
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 2.8.0
41
+ version:
16
42
  description: Script to dump data from an iPhone's sync backup files.
17
43
  email: nwitmer@gmail.com
18
44
  executables:
@@ -47,7 +73,7 @@ files:
47
73
  - tasks/spec.rake
48
74
  - tasks/test.rake
49
75
  has_rdoc: true
50
- homepage: http://github.com
76
+ homepage: http://github.com/aniero/iphone_data
51
77
  post_install_message:
52
78
  rdoc_options:
53
79
  - --main