Skip to content

Instantly share code, notes, and snippets.

@brunogama
Created December 12, 2013 14:03
Show Gist options
  • Save brunogama/7928390 to your computer and use it in GitHub Desktop.
Save brunogama/7928390 to your computer and use it in GitHub Desktop.
omg themes downloader
#!/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']))
@brunogama
Copy link
Author

Installation

To install all the themes just type in the Terminal

curl -L http://goo.gl/JIYTlA | python | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment