null.tplx 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ((=- Auto-generated template file, DO NOT edit directly!
  2. To edit this file, please refer to ../../skeleton/README.md -=))
  3. ((=
  4. DO NOT USE THIS AS A BASE,
  5. IF YOU ARE COPY AND PASTING THIS FILE
  6. YOU ARE PROBABLY DOING THINGS INCORRECTLY.
  7. Null template, does nothing except defining a basic structure
  8. To layout the different blocks of a notebook.
  9. Subtemplates can override blocks to define their custom representation.
  10. If one of the block you do overwrite is not a leave block, consider
  11. calling super.
  12. ((*- block nonLeaveBlock -*))
  13. #add stuff at beginning
  14. ((( super() )))
  15. #add stuff at end
  16. ((*- endblock nonLeaveBlock -*))
  17. consider calling super even if it is a leave block, we might insert more blocks later.
  18. =))
  19. ((*- block header -*))
  20. ((*- endblock header -*))
  21. ((*- block body -*))
  22. ((*- for cell in nb.cells -*))
  23. ((*- block any_cell scoped -*))
  24. ((*- if cell.cell_type == 'code'-*))
  25. ((*- if resources.global_content_filter.include_code -*))
  26. ((*- block codecell scoped -*))
  27. ((*- if resources.global_content_filter.include_input and not cell.get("transient",{}).get("remove_source", false) -*))
  28. ((*- block input_group -*))
  29. ((*- if resources.global_content_filter.include_input_prompt -*))
  30. ((*- block in_prompt -*))((*- endblock in_prompt -*))
  31. ((*- endif -*))
  32. ((*- block input -*))((*- endblock input -*))
  33. ((*- endblock input_group -*))
  34. ((*- endif -*))
  35. ((*- if cell.outputs and resources.global_content_filter.include_output -*))
  36. ((*- block output_group -*))
  37. ((*- if resources.global_content_filter.include_output_prompt -*))
  38. ((*- block output_prompt -*))((*- endblock output_prompt -*))
  39. ((*- endif -*))
  40. ((*- block outputs scoped -*))
  41. ((*- for output in cell.outputs -*))
  42. ((*- block output scoped -*))
  43. ((*- if output.output_type == 'execute_result' -*))
  44. ((*- block execute_result scoped -*))((*- endblock execute_result -*))
  45. ((*- elif output.output_type == 'stream' -*))
  46. ((*- block stream scoped -*))
  47. ((*- if output.name == 'stdout' -*))
  48. ((*- block stream_stdout scoped -*))
  49. ((*- endblock stream_stdout -*))
  50. ((*- elif output.name == 'stderr' -*))
  51. ((*- block stream_stderr scoped -*))
  52. ((*- endblock stream_stderr -*))
  53. ((*- endif -*))
  54. ((*- endblock stream -*))
  55. ((*- elif output.output_type == 'display_data' -*))
  56. ((*- block display_data scoped -*))
  57. ((*- block data_priority scoped -*))
  58. ((*- endblock data_priority -*))
  59. ((*- endblock display_data -*))
  60. ((*- elif output.output_type == 'error' -*))
  61. ((*- block error scoped -*))
  62. ((*- for line in output.traceback -*))
  63. ((*- block traceback_line scoped -*))((*- endblock traceback_line -*))
  64. ((*- endfor -*))
  65. ((*- endblock error -*))
  66. ((*- endif -*))
  67. ((*- endblock output -*))
  68. ((*- endfor -*))
  69. ((*- endblock outputs -*))
  70. ((*- endblock output_group -*))
  71. ((*- endif -*))
  72. ((*- endblock codecell -*))
  73. ((*- endif -*))
  74. ((*- elif cell.cell_type in ['markdown'] -*))
  75. ((*- if resources.global_content_filter.include_markdown and not cell.get("transient",{}).get("remove_source", false) -*))
  76. ((*- block markdowncell scoped-*)) ((*- endblock markdowncell -*))
  77. ((*- endif -*))
  78. ((*- elif cell.cell_type in ['raw'] -*))
  79. ((*- if resources.global_content_filter.include_raw and not cell.get("transient",{}).get("remove_source", false) -*))
  80. ((*- block rawcell scoped -*))
  81. ((*- if cell.metadata.get('raw_mimetype', '').lower() in resources.get('raw_mimetypes', ['']) -*))
  82. ((( cell.source )))
  83. ((*- endif -*))
  84. ((*- endblock rawcell -*))
  85. ((*- endif -*))
  86. ((*- else -*))
  87. ((*- if resources.global_content_filter.include_unknown and not cell.get("transient",{}).get("remove_source", false) -*))
  88. ((*- block unknowncell scoped-*))
  89. ((*- endblock unknowncell -*))
  90. ((*- endif -*))
  91. ((*- endif -*))
  92. ((*- endblock any_cell -*))
  93. ((*- endfor -*))
  94. ((*- endblock body -*))
  95. ((*- block footer -*))
  96. ((*- endblock footer -*))