icloud-photo 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b11ff1b6643b98fab2cd3c19f56a17436b4f4693
4
- data.tar.gz: 409dc0b100617ebf4cfa730a8a2de66584a071b8
3
+ metadata.gz: 7751536194433e5c8e06d4ce7acd63048a011164
4
+ data.tar.gz: 3f8d7f8e73455d6c8c40ce5d92f121fbdccf8aae
5
5
  SHA512:
6
- metadata.gz: 0beeec92059e230c9c1aa4bac7b72ae54e0112faf24b165021a8ec191c239321a0684618f6050b0951ecf5f71b56cbfda35c8a8f9426c683840a61565b9f996c
7
- data.tar.gz: a2537f522b1cc8e615408abc9f2fc46e00f9578ad14e3bb8da5ad6d2c6d039aac5fe087f1889917f0f4e9f3a7231ecaa620ffd0a803769e54cc3ae9918430686
6
+ metadata.gz: 3953d25081d1fb77a52419f7761fad88c257203fa81ef53d50be4c8953671809064aba79330d0b5fa3d7c5085024220b5aaf771010180afac23880627b0effca
7
+ data.tar.gz: 865de0e9ac86223c1fdc0cbaa3bbd28b9e50576955db9215d650422bcec286fb9db5c4772f1e5eb15696ff629e8a201acb6544e2b27da439c91e5d2a67c74641
@@ -31,11 +31,13 @@ end tell
31
31
  on refreshCloud(cloudName, thePhotos)
32
32
  tell application "iPhoto"
33
33
  set currentPhotos to {}
34
+ set currentSize to 0
34
35
  set hasHold to false
35
36
  tell album cloudName
36
37
  set cloudPhotos to get every photo
38
+ set currentSize to the count of cloudPhotos
37
39
  repeat with aPhoto in cloudPhotos
38
- if name of aPhoto is "hold"
40
+ if name of aPhoto is "hold" then
39
41
  set hasHold to true
40
42
  else
41
43
  set the end of currentPhotos to aPhoto
@@ -46,7 +48,7 @@ on refreshCloud(cloudName, thePhotos)
46
48
  repeat with aName in thePhotos
47
49
  activate
48
50
  delay 1
49
-
51
+
50
52
  tell album "Last Import" to select photo aName
51
53
  delay 1
52
54
 
@@ -67,25 +69,33 @@ on refreshCloud(cloudName, thePhotos)
67
69
  end tell
68
70
  end repeat
69
71
 
70
- select album cloudName
71
- if not hasHold
72
+ if not hasHold then
72
73
  -- need to let iCloud catch up
73
74
  delay 100
74
75
  end if
75
- if (count of currentPhotos) > 0 then
76
- repeat with aPhoto in currentPhotos
77
- activate
78
- delay 1
79
- select aPhoto
80
- tell application "System Events"
81
- delay 1
82
- keystroke (ASCII character 127) -- delete
76
+
77
+ delay 20 -- make sure all uploaded and stuff
78
+ select album cloudName
79
+
80
+ set updatedSize to the count of every photo in album cloudName
81
+
82
+ if updatedSize > currentSize then
83
+ -- for some reason, it doesn't always actually upload
84
+ if (count of currentPhotos) > 0 then
85
+ repeat with aPhoto in currentPhotos
86
+ activate
83
87
  delay 1
84
- keystroke "d" using command down -- yes, really
85
- delay 3
86
- end tell
87
- end repeat
88
+ select aPhoto
89
+ tell application "System Events"
90
+ delay 1
91
+ keystroke (ASCII character 127) -- delete
92
+ delay 1
93
+ keystroke "d" using command down -- yes, really
94
+ delay 3
95
+ end tell
96
+ end repeat
97
+ end if
88
98
  end if
89
99
 
90
100
  end tell
91
- end refreshCloud
101
+ end refreshCloud
@@ -1,3 +1,3 @@
1
1
  module ICloudPhoto
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icloud-photo
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
  - Brian Leonard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-07 00:00:00.000000000 Z
11
+ date: 2015-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,3 +80,4 @@ signing_key:
80
80
  specification_version: 4
81
81
  summary: Uses iPhoto on a Mac to send pictures to iCloud.
82
82
  test_files: []
83
+ has_rdoc: