Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. from click import group, argument
  4.  
  5. from ScriptingBridge import SBApplication
  6.  
  7.  
  8. @group()
  9. def main():
  10. pass
  11.  
  12.  
  13. @main.command()
  14. @argument('name')
  15. def sync(name):
  16. itunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
  17. for src in itunes.sources():
  18. if src.name() == name:
  19. src.update()
  20.  
  21.  
  22. if __name__ == '__main__':
  23. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement