Skip to content

Instantly share code, notes, and snippets.

@chesster
Created July 4, 2014 22:01
Show Gist options
  • Save chesster/f0d2dfa1a58d516c7412 to your computer and use it in GitHub Desktop.
Save chesster/f0d2dfa1a58d516c7412 to your computer and use it in GitHub Desktop.
# coding: utf-8
import os
import subprocess
import urllib
theme_names = ['3024-dark',
'3024-light',
'atelierdune-dark',
'atelierdune-light',
'atelierforest-dark',
'atelierforest-light',
'atelierheath-dark',
'atelierheath-light',
'atelierlakeside-dark',
'atelierlakeside-light',
'atelierseaside-dark',
'atelierseaside-light',
'bespin-dark',
'bespin-light',
'chalk-dark',
'chalk-light',
'default-dark',
'default-light',
'eighties-dark',
'eighties-light',
'grayscale-dark',
'grayscale-light',
'greenscreen-dark',
'greenscreen-light',
'isotope-dark',
'isotope-light',
'londontube-dark',
'londontube-light',
'marrakesh-dark',
'marrakesh-light',
'mocha-dark',
'mocha-light',
'monokai-dark',
'monokai-light',
'ocean-dark',
'ocean-light',
'paraiso-dark',
'paraiso-light',
'railscasts-dark',
'railscasts-light',
'shapeshifter-dark',
'shapeshifter-light',
'solarized-dark',
'solarized-light',
'tomorrow-dark',
'tomorrow-light',
'twilight-dark',
'twilight-light']
for i in theme_names:
get_ipython().system(u'ipython profile create $i')
profile_dir = get_ipython().getoutput(u'ipython locate profile $i')
url = "https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-" + i + ".css"
tgt = os.path.join(profile_dir[0], 'static', 'custom', "custom.css")
urllib.urlretrieve (url, tgt)
for i, name in enumerate(theme_names):
port = str(9000 + i)
subprocess.Popen(["ipython", "notebook", "--profile=" + name, "--port=" + port, "--no-browser"])
base_url = "http://127.0.0.1:"
notebook = "/notebooks/Todoist.ipynb"
for i, name in enumerate(theme_names):
port = str(9000 + i)
url = base_url + port + notebook
print url, name
get_ipython().system(u'killall -9 ipython')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment