Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
itunes-client Ryo Katsuma Tokyu Ruby Kaigi #07
Slide 2
Slide 2 text
http://www.flickr.com/photos/koichiroo/9293622896/ Ryo Katsuma @ryo_katsuma Engineer at COOKPAD Inc.
Slide 3
Slide 3 text
http://www.flickr.com/photos/desarrollalatam/10271530923/ Hack
Slide 4
Slide 4 text
music http://www.gratisography.com/
Slide 5
Slide 5 text
iTunes https://www.apple.com/itunes/
Slide 6
Slide 6 text
iTunes meets https://www.apple.com/itunes/
Slide 7
Slide 7 text
iTunes meets Ruby https://www.apple.com/itunes/
Slide 8
Slide 8 text
to improve operability? https://www.apple.com/itunes/
Slide 9
Slide 9 text
a new Ruby gem
Slide 10
Slide 10 text
ɹitunes-client https://github.com/katsuma/itunes-client
Slide 11
Slide 11 text
ɹitunes-client https://github.com/katsuma/itunes-client Demo
Slide 12
Slide 12 text
Find tracks with some conditions by Ruby
Slide 13
Slide 13 text
Find tracks with some conditions by Ruby itunes-client solves it
Slide 14
Slide 14 text
Itunes::Track.find_by
Slide 15
Slide 15 text
No content
Slide 16
Slide 16 text
Play or Stop a track by Ruby
Slide 17
Slide 17 text
Play or Stop a track by Ruby itunes-client solves it
Slide 18
Slide 18 text
Itunes::Track#play
Slide 19
Slide 19 text
Itunes::Track#pause
Slide 20
Slide 20 text
Itunes::Track#stop
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
Add a new file, and tag it by Ruby
Slide 23
Slide 23 text
Add a new file, and tag it by Ruby itunes-client solves it
Slide 24
Slide 24 text
Itunes::Player.add
Slide 25
Slide 25 text
Itunes::Track#update
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
tell application "iTunes" set specified_tracks to (every track whose #{conditions}) … end generate temporary AppleScript
Slide 28
Slide 28 text
execute_out, process_status = ɹ ɹ*Open3.capture2("osascript #{script_path}") exec it by osascript
Slide 29
Slide 29 text
Play a song stored at YouTube by iTunes
Slide 30
Slide 30 text
Play a song stored at YouTube by iTunes itunes-client wrapper solves it
Slide 31
Slide 31 text
ɹtaifu https://github.com/katsuma/taifu
Slide 32
Slide 32 text
taifu http://youtube.com/watch?v=I1X6MrBfjrk
Slide 33
Slide 33 text
Download by youtube-dl
Slide 34
Slide 34 text
Download by youtube-dl Convert by ffmpeg
Slide 35
Slide 35 text
Download by youtube-dl Convert by ffmpeg Add, encode and tag by itunes-client
Slide 36
Slide 36 text
Automation is great
Slide 37
Slide 37 text
http://www.flickr.com/photos/desarrollalatam/10271530923/ happy music hack