Created
December 12, 2013 14:03
-
-
Save brunogama/7928390 to your computer and use it in GitHub Desktop.
omg themes downloader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python -tt | |
# -*- encoding: utf-8 -*- | |
# License: Beerware | |
from __future__ import print_function | |
import urllib | |
import json | |
AUTHOR = 'Bruno Gama' | |
TWITTER = '@brunogama' | |
URL_OMG_THEMES = 'http://omgthemes.net' | |
URL_OMG_THEMES_JSON = 'themes.json' | |
URL_OMG_THEMES_FULL_PATH = URL_OMG_THEMES + '/' + URL_OMG_THEMES_JSON | |
r = urllib.urlopen(URL_OMG_THEMES_FULL_PATH) | |
j = json.loads(r.read()) | |
raw_url = lambda x, y : 'https://raw.github.com/' + x + '/omgthemes/master/' + urllib.quote(y) | |
shell_command = ''' | |
mkdir -p ~/Library/Developer/Xcode/UserData/FontAndColorThemes \ | |
&& curl %s \ | |
> ~/Library/Developer/Xcode/UserData/FontAndColorThemes/"%s.dvtcolortheme" | |
''' | |
for d in j: | |
print(shell_command % (raw_url(d['fork'], d['raw']), d['name'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
To install all the themes just type in the Terminal