File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ travis: run_nb render
10
10
echo " Done"
11
11
12
12
render :
13
- python render.py
13
+ python render.py " ggplot vs Python Plotting. $( GIT_COMMIT ) .ipynb "
14
14
15
15
s3_upload :
16
16
s3cmd sync $(OUTPUTDIR ) / s3://$(S3_BUCKET ) --acl-public --delete-removed --guess-mime-type --no-mime-magic --no-preserve
Original file line number Diff line number Diff line change 1
1
#!/usr/local/bin/python
2
2
# encoding=utf8
3
3
4
+ import sys
4
5
import json
5
6
from jinja2 import Environment , FileSystemLoader
6
7
from collections import defaultdict
@@ -80,8 +81,8 @@ def order_plots(plots):
80
81
return meta
81
82
82
83
83
- def extract_cells ():
84
- with open ("./ggplot vs Python Plotting.ipynb" , 'r' ) as f :
84
+ def extract_cells (path ):
85
+ with open (path , 'r' ) as f :
85
86
nb = json .load (f )
86
87
cells = nb ['cells' ]
87
88
tags = {i : tags_from_cell (c ) for i , c in enumerate (cells )}
@@ -111,7 +112,7 @@ def get_git_revision_short_hash():
111
112
112
113
113
114
if __name__ == '__main__' :
114
- plots = extract_cells ()
115
+ plots = extract_cells (sys . argv [ 1 ] )
115
116
116
117
env = Environment (loader = FileSystemLoader ('web' ), extensions = ['jinja2_highlight.HighlightExtension' ])
117
118
template = env .get_template ('t_index.html' )
You can’t perform that action at this time.
0 commit comments