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