Show More
@@ -1,64 +1,95 b'' | |||||
1 | ((= Auto-generated template file, DO NOT edit directly! |
|
1 | ((= Auto-generated template file, DO NOT edit directly! | |
2 | To edit this file, please refer to ../../skeleton/README.md =)) |
|
2 | To edit this file, please refer to ../../skeleton/README.md =)) | |
3 |
|
3 | |||
4 |
|
4 | |||
5 | ((= |
|
5 | ((= | |
6 |
|
6 | |||
7 |
DO NOT USE THIS AS A BASE |
|
7 | DO NOT USE THIS AS A BASE, | |
8 | IF YOU ARE COPY AND PASTING THIS FILE |
|
8 | IF YOU ARE COPY AND PASTING THIS FILE | |
9 |
YOU ARE PROBABLY DOING THINGS |
|
9 | YOU ARE PROBABLY DOING THINGS INCORRECTLY. | |
10 |
|
10 | |||
11 |
Null template, |
|
11 | Null template, does nothing except defining a basic structure | |
12 | To layout the different blocks of a notebook. |
|
12 | To layout the different blocks of a notebook. | |
13 |
|
13 | |||
14 | Subtemplates can override blocks to define their custom representation. |
|
14 | Subtemplates can override blocks to define their custom representation. | |
15 |
|
15 | |||
16 | If one of the block you do overwrite is not a leave block, consider |
|
16 | If one of the block you do overwrite is not a leave block, consider | |
17 | calling super. |
|
17 | calling super. | |
18 |
|
18 | |||
19 | ((*- block nonLeaveBlock -*)) |
|
19 | ((*- block nonLeaveBlock -*)) | |
20 | #add stuff at beginning |
|
20 | #add stuff at beginning | |
21 | ((( super() ))) |
|
21 | ((( super() ))) | |
22 | #add stuff at end |
|
22 | #add stuff at end | |
23 | ((*- endblock nonLeaveBlock -*)) |
|
23 | ((*- endblock nonLeaveBlock -*)) | |
24 |
|
24 | |||
25 | consider calling super even if it is a leave block, we might insert more blocks later. |
|
25 | consider calling super even if it is a leave block, we might insert more blocks later. | |
26 |
|
26 | |||
27 | =)) |
|
27 | =)) | |
28 | ((*- block header -*)) |
|
28 | ((*- block header -*)) | |
29 | ((*- endblock header -*)) |
|
29 | ((*- endblock header -*)) | |
30 | ((*- block body -*)) |
|
30 | ((*- block body -*)) | |
31 | ((*- for worksheet in nb.worksheets -*)) |
|
31 | ((*- for worksheet in nb.worksheets -*)) | |
32 | ((*- for cell in worksheet.cells -*)) |
|
32 | ((*- for cell in worksheet.cells -*)) | |
33 | ((*- block any_cell scoped -*)) |
|
33 | ((*- block any_cell scoped -*)) | |
34 | ((*- if cell.cell_type in ['code'] -*)) |
|
34 | ((*- if cell.cell_type in ['code'] -*)) | |
35 | ((*- block codecell scoped -*)) |
|
35 | ((*- block codecell scoped -*)) | |
36 | ((*- block input_group -*)) |
|
36 | ((*- block input_group -*)) | |
37 | ((*- include 'cell_input.tplx' -*)) |
|
37 | ((*- block in_prompt -*))((*- endblock in_prompt -*)) | |
|
38 | ((*- block input -*))((*- endblock input -*)) | |||
38 | ((*- endblock input_group -*)) |
|
39 | ((*- endblock input_group -*)) | |
39 | ((*- if cell.outputs -*)) |
|
40 | ((*- if cell.outputs -*)) | |
40 | ((*- block output_group -*)) |
|
41 | ((*- block output_group -*)) | |
41 | ((*- include 'cell_outputs.tplx' -*)) |
|
42 | ((*- block output_prompt -*))((*- endblock output_prompt -*)) | |
|
43 | ((*- block outputs scoped -*)) | |||
|
44 | ((*- for output in cell.outputs -*)) | |||
|
45 | ((*- block output scoped -*)) | |||
|
46 | ((*- if output.output_type in ['pyout'] -*)) | |||
|
47 | ((*- block pyout scoped -*))((*- endblock pyout -*)) | |||
|
48 | ((*- elif output.output_type in ['stream'] -*)) | |||
|
49 | ((*- block stream scoped -*)) | |||
|
50 | ((*- if output.stream in ['stdout'] -*)) | |||
|
51 | ((*- block stream_stdout scoped -*)) | |||
|
52 | ((*- endblock stream_stdout -*)) | |||
|
53 | ((*- elif output.stream in ['stderr'] -*)) | |||
|
54 | ((*- block stream_stderr scoped -*)) | |||
|
55 | ((*- endblock stream_stderr -*)) | |||
|
56 | ((*- endif -*)) | |||
|
57 | ((*- endblock stream -*)) | |||
|
58 | ((*- elif output.output_type in ['display_data'] -*)) | |||
|
59 | ((*- block display_data scoped -*)) | |||
|
60 | ((*- block data_priority scoped -*)) | |||
|
61 | ((*- endblock data_priority -*)) | |||
|
62 | ((*- endblock display_data -*)) | |||
|
63 | ((*- elif output.output_type in ['pyerr'] -*)) | |||
|
64 | ((*- block pyerr scoped -*)) | |||
|
65 | ((*- for line in output.traceback -*)) | |||
|
66 | ((*- block traceback_line scoped -*))((*- endblock traceback_line -*)) | |||
|
67 | ((*- endfor -*)) | |||
|
68 | ((*- endblock pyerr -*)) | |||
|
69 | ((*- endif -*)) | |||
|
70 | ((*- endblock output -*)) | |||
|
71 | ((*- endfor -*)) | |||
|
72 | ((*- endblock outputs -*)) | |||
42 | ((*- endblock output_group -*)) |
|
73 | ((*- endblock output_group -*)) | |
43 | ((*- endif -*)) |
|
74 | ((*- endif -*)) | |
44 | ((*- endblock codecell -*)) |
|
75 | ((*- endblock codecell -*)) | |
45 | ((*- elif cell.cell_type in ['markdown'] -*)) |
|
76 | ((*- elif cell.cell_type in ['markdown'] -*)) | |
46 | ((*- block markdowncell scoped-*)) |
|
77 | ((*- block markdowncell scoped-*)) | |
47 | ((*- endblock markdowncell -*)) |
|
78 | ((*- endblock markdowncell -*)) | |
48 | ((*- elif cell.cell_type in ['heading'] -*)) |
|
79 | ((*- elif cell.cell_type in ['heading'] -*)) | |
49 | ((*- block headingcell scoped-*)) |
|
80 | ((*- block headingcell scoped-*)) | |
50 | ((*- endblock headingcell -*)) |
|
81 | ((*- endblock headingcell -*)) | |
51 | ((*- elif cell.cell_type in ['raw'] -*)) |
|
82 | ((*- elif cell.cell_type in ['raw'] -*)) | |
52 | ((*- block rawcell scoped-*)) |
|
83 | ((*- block rawcell scoped-*)) | |
53 | ((*- endblock rawcell -*)) |
|
84 | ((*- endblock rawcell -*)) | |
54 | ((*- else -*)) |
|
85 | ((*- else -*)) | |
55 | ((*- block unknowncell scoped-*)) |
|
86 | ((*- block unknowncell scoped-*)) | |
56 | ((*- endblock unknowncell -*)) |
|
87 | ((*- endblock unknowncell -*)) | |
57 | ((*- endif -*)) |
|
88 | ((*- endif -*)) | |
58 | ((*- endblock any_cell -*)) |
|
89 | ((*- endblock any_cell -*)) | |
59 | ((*- endfor -*)) |
|
90 | ((*- endfor -*)) | |
60 | ((*- endfor -*)) |
|
91 | ((*- endfor -*)) | |
61 | ((*- endblock body -*)) |
|
92 | ((*- endblock body -*)) | |
62 |
|
93 | |||
63 | ((*- block footer -*)) |
|
94 | ((*- block footer -*)) | |
64 | ((*- endblock footer -*)) |
|
95 | ((*- endblock footer -*)) |
@@ -1,60 +1,91 b'' | |||||
1 | {# |
|
1 | {# | |
2 |
|
2 | |||
3 | DO NOT USE THIS AS A BASE, |
|
3 | DO NOT USE THIS AS A BASE, | |
4 | IF YOU ARE COPY AND PASTING THIS FILE |
|
4 | IF YOU ARE COPY AND PASTING THIS FILE | |
5 | YOU ARE PROBABLY DOING THINGS INCORRECTLY. |
|
5 | YOU ARE PROBABLY DOING THINGS INCORRECTLY. | |
6 |
|
6 | |||
7 | Null template, does nothing except defining a basic structure |
|
7 | Null template, does nothing except defining a basic structure | |
8 | To layout the different blocks of a notebook. |
|
8 | To layout the different blocks of a notebook. | |
9 |
|
9 | |||
10 | Subtemplates can override blocks to define their custom representation. |
|
10 | Subtemplates can override blocks to define their custom representation. | |
11 |
|
11 | |||
12 | If one of the block you do overwrite is not a leave block, consider |
|
12 | If one of the block you do overwrite is not a leave block, consider | |
13 | calling super. |
|
13 | calling super. | |
14 |
|
14 | |||
15 | {%- block nonLeaveBlock -%} |
|
15 | {%- block nonLeaveBlock -%} | |
16 | #add stuff at beginning |
|
16 | #add stuff at beginning | |
17 | {{ super() }} |
|
17 | {{ super() }} | |
18 | #add stuff at end |
|
18 | #add stuff at end | |
19 | {%- endblock nonLeaveBlock -%} |
|
19 | {%- endblock nonLeaveBlock -%} | |
20 |
|
20 | |||
21 | consider calling super even if it is a leave block, we might insert more blocks later. |
|
21 | consider calling super even if it is a leave block, we might insert more blocks later. | |
22 |
|
22 | |||
23 | #} |
|
23 | #} | |
24 | {%- block header -%} |
|
24 | {%- block header -%} | |
25 | {%- endblock header -%} |
|
25 | {%- endblock header -%} | |
26 | {%- block body -%} |
|
26 | {%- block body -%} | |
27 | {%- for worksheet in nb.worksheets -%} |
|
27 | {%- for worksheet in nb.worksheets -%} | |
28 | {%- for cell in worksheet.cells -%} |
|
28 | {%- for cell in worksheet.cells -%} | |
29 | {%- block any_cell scoped -%} |
|
29 | {%- block any_cell scoped -%} | |
30 | {%- if cell.cell_type in ['code'] -%} |
|
30 | {%- if cell.cell_type in ['code'] -%} | |
31 | {%- block codecell scoped -%} |
|
31 | {%- block codecell scoped -%} | |
32 | {%- block input_group -%} |
|
32 | {%- block input_group -%} | |
33 | {%- include 'cell_input.tpl' -%} |
|
33 | {%- block in_prompt -%}{%- endblock in_prompt -%} | |
|
34 | {%- block input -%}{%- endblock input -%} | |||
34 | {%- endblock input_group -%} |
|
35 | {%- endblock input_group -%} | |
35 | {%- if cell.outputs -%} |
|
36 | {%- if cell.outputs -%} | |
36 | {%- block output_group -%} |
|
37 | {%- block output_group -%} | |
37 | {%- include 'cell_outputs.tpl' -%} |
|
38 | {%- block output_prompt -%}{%- endblock output_prompt -%} | |
|
39 | {%- block outputs scoped -%} | |||
|
40 | {%- for output in cell.outputs -%} | |||
|
41 | {%- block output scoped -%} | |||
|
42 | {%- if output.output_type in ['pyout'] -%} | |||
|
43 | {%- block pyout scoped -%}{%- endblock pyout -%} | |||
|
44 | {%- elif output.output_type in ['stream'] -%} | |||
|
45 | {%- block stream scoped -%} | |||
|
46 | {%- if output.stream in ['stdout'] -%} | |||
|
47 | {%- block stream_stdout scoped -%} | |||
|
48 | {%- endblock stream_stdout -%} | |||
|
49 | {%- elif output.stream in ['stderr'] -%} | |||
|
50 | {%- block stream_stderr scoped -%} | |||
|
51 | {%- endblock stream_stderr -%} | |||
|
52 | {%- endif -%} | |||
|
53 | {%- endblock stream -%} | |||
|
54 | {%- elif output.output_type in ['display_data'] -%} | |||
|
55 | {%- block display_data scoped -%} | |||
|
56 | {%- block data_priority scoped -%} | |||
|
57 | {%- endblock data_priority -%} | |||
|
58 | {%- endblock display_data -%} | |||
|
59 | {%- elif output.output_type in ['pyerr'] -%} | |||
|
60 | {%- block pyerr scoped -%} | |||
|
61 | {%- for line in output.traceback -%} | |||
|
62 | {%- block traceback_line scoped -%}{%- endblock traceback_line -%} | |||
|
63 | {%- endfor -%} | |||
|
64 | {%- endblock pyerr -%} | |||
|
65 | {%- endif -%} | |||
|
66 | {%- endblock output -%} | |||
|
67 | {%- endfor -%} | |||
|
68 | {%- endblock outputs -%} | |||
38 | {%- endblock output_group -%} |
|
69 | {%- endblock output_group -%} | |
39 | {%- endif -%} |
|
70 | {%- endif -%} | |
40 | {%- endblock codecell -%} |
|
71 | {%- endblock codecell -%} | |
41 | {%- elif cell.cell_type in ['markdown'] -%} |
|
72 | {%- elif cell.cell_type in ['markdown'] -%} | |
42 | {%- block markdowncell scoped-%} |
|
73 | {%- block markdowncell scoped-%} | |
43 | {%- endblock markdowncell -%} |
|
74 | {%- endblock markdowncell -%} | |
44 | {%- elif cell.cell_type in ['heading'] -%} |
|
75 | {%- elif cell.cell_type in ['heading'] -%} | |
45 | {%- block headingcell scoped-%} |
|
76 | {%- block headingcell scoped-%} | |
46 | {%- endblock headingcell -%} |
|
77 | {%- endblock headingcell -%} | |
47 | {%- elif cell.cell_type in ['raw'] -%} |
|
78 | {%- elif cell.cell_type in ['raw'] -%} | |
48 | {%- block rawcell scoped-%} |
|
79 | {%- block rawcell scoped-%} | |
49 | {%- endblock rawcell -%} |
|
80 | {%- endblock rawcell -%} | |
50 | {%- else -%} |
|
81 | {%- else -%} | |
51 | {%- block unknowncell scoped-%} |
|
82 | {%- block unknowncell scoped-%} | |
52 | {%- endblock unknowncell -%} |
|
83 | {%- endblock unknowncell -%} | |
53 | {%- endif -%} |
|
84 | {%- endif -%} | |
54 | {%- endblock any_cell -%} |
|
85 | {%- endblock any_cell -%} | |
55 | {%- endfor -%} |
|
86 | {%- endfor -%} | |
56 | {%- endfor -%} |
|
87 | {%- endfor -%} | |
57 | {%- endblock body -%} |
|
88 | {%- endblock body -%} | |
58 |
|
89 | |||
59 | {%- block footer -%} |
|
90 | {%- block footer -%} | |
60 | {%- endblock footer -%} |
|
91 | {%- endblock footer -%} |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now