IPython notebook viewer is an heroku application that given the url of a IPython notebook file (ending in ipynb) shows you a static html version.
If you have an heroku account, or have access to one, just push the master branch :
$ heroku create
Creating something-madeup-123... done, stack is cedar
https://something-madeup-123.herokuapp.com/ | [email protected]:something-madeup-123.git
Git remote heroku added
$ git push heroku master:master
...
The application will be available under yourappname.herokuapp.com
The app is based on Twitter Bootstrap
so you will need some dependencies like node
,uglify-js
.
- everything in
/static/
is served statically - html files in
/static/
are built from/template/
by doing$ make
in the root dirrectory /template/layout.mustache
contain headers and footers- every
*.mustache
file intemplate/pages
will create a corresponding html file in/static/
- any required python package should be availlable via
pip
, and should be added torequirement.txt
. seepip freeze
to know what to write in the file. - local debug mode is activated by creating a
.debug
file in the root directory,.debug
is excluded in.gitignore
and.slugignore
Sqlalchemy needs to connect to a database, you should export the environment variable DATABASE_URL. If you don't have any installed DB or just want to try out, you can use in memory sqlite :
$ export DATABASE_URL='sqlite:https:///:memory:'
heroku create [appname]
heroku git:remote -a [appname] -r [appname]
heroku addons:add memcachier:dev --app [appname]
heroku addons:add newrelic:standard --app [appname]
to deploy the new version :
git push nbviewer2 <local-branch>:master
You can eventually set the following github key to make authenticated requests to github. This will increase the maximum number of requests you can do to github /hour.
GITHUB_OAUTH_KEY: xxxxxxxxxxxxxxxxxxxx
GITHUB_OAUTH_SECRET: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
you can use heroku config:set KEY1=VALUE1
to do so.