icloud-photo 0.0.1 → 0.1.0

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: 0e1f189419d974adfba153c99870f84786970e74
4
- data.tar.gz: aef7c605e6a185c7f6001a9d998cd1642659d3c5
3
+ metadata.gz: b11ff1b6643b98fab2cd3c19f56a17436b4f4693
4
+ data.tar.gz: 409dc0b100617ebf4cfa730a8a2de66584a071b8
5
5
  SHA512:
6
- metadata.gz: cb7c0a39234ae12d123c9c855c61438b3382fd322bdd9bbd0a6933eb4480792ffa5595f03a743c5c22ce8edc56d1db7fdd479534218749b6e97b9372948c443a
7
- data.tar.gz: 8e32e6862755e36a25b770ae5d4360d614cb050d7ca856dd8c7434906c872beadd8de9c506ac121cf59caddf1f48dc071e9e8d6c202d8e57f86a3fcfa9ab28ff
6
+ metadata.gz: 0beeec92059e230c9c1aa4bac7b72ae54e0112faf24b165021a8ec191c239321a0684618f6050b0951ecf5f71b56cbfda35c8a8f9426c683840a61565b9f996c
7
+ data.tar.gz: a2537f522b1cc8e615408abc9f2fc46e00f9578ad14e3bb8da5ad6d2c6d039aac5fe087f1889917f0f4e9f3a7231ecaa620ffd0a803769e54cc3ae9918430686
data/README.md CHANGED
@@ -3,4 +3,30 @@
3
3
  So you want to send photos to your photo stream on iCloud. I looked for an API and couldn't find one.
4
4
  So I made this mess. It uses AppleScript to launch iPhoto and then puppeteers it until the photos are in iPhoto.
5
5
 
6
+ It is being used in the [Dashing on Apple TV](https://github.com/bleonard/dashing_on_appletv) sample.
6
7
 
8
+ ## Setup
9
+
10
+ Open iPhoto and click on "iCloud" on the side. Sign if if necesssary.
11
+
12
+ NOTE: this is meant to have total control over this iCloud account. It should be a new account for your dashboard, not your personal one. It may delete you photos.
13
+
14
+ Import a photo, select "Share...", and share it to the iCloud album(s) you want to use (just to make the album). In the sample, it is called "dashboard."
15
+
16
+ The first time you run it, you'll likely need to allow some accessibility access to iPhoto from the Applescript. Follow the given instructions.
17
+
18
+ You should see it succeed after a few times of that. When iPhoto closes itself, that means it worked.
19
+
20
+ ## Usage
21
+
22
+ ```ruby
23
+ require 'icloud-photo'
24
+
25
+ cloud = ICloudPhoto::Sync.new("screenshots")
26
+
27
+ # put the sampletv image in the dashboard album
28
+ cloud.add("dashboard", ["sampletv"])
29
+ cloud.upload!
30
+ ```
31
+
32
+ Then don't touch the keyboard!
@@ -3,6 +3,7 @@ tell application "iPhoto"
3
3
  delay 10
4
4
 
5
5
  activate
6
+ delay 1
6
7
  tell album "Photos"
7
8
  set thePhotos to get every photo
8
9
  repeat with aPhoto in thePhotos
@@ -43,6 +44,9 @@ on refreshCloud(cloudName, thePhotos)
43
44
  end tell
44
45
 
45
46
  repeat with aName in thePhotos
47
+ activate
48
+ delay 1
49
+
46
50
  tell album "Last Import" to select photo aName
47
51
  delay 1
48
52
 
@@ -70,6 +74,8 @@ on refreshCloud(cloudName, thePhotos)
70
74
  end if
71
75
  if (count of currentPhotos) > 0 then
72
76
  repeat with aPhoto in currentPhotos
77
+ activate
78
+ delay 1
73
79
  select aPhoto
74
80
  tell application "System Events"
75
81
  delay 1
@@ -1,3 +1,3 @@
1
1
  module ICloudPhoto
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
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.0.1
4
+ version: 0.1.0
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-06 00:00:00.000000000 Z
11
+ date: 2015-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler