# nb_extension_empinken
Jupyter notebook extension for background colouring selected cells.
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/innovationOUtside/nb_extension_empinken/master)
Install the latest version from the default branch in this repository:
`pip install --upgrade git+https://github.com/innovationOUtside/nb_extension_empinken.git`
Or from a particular branch (eg the `BRANCH` branch):
`pip install --upgrade git+https://github.com/innovationOUtside/nb_extension_empinken.git@BRANCH`
Install a released version from PyPi:
`pip install nb-extension-empinken`
The extension should be automatically installed and enabled.
If you need to do things manually:
```
jupyter nbextension uninstall empinken
jupyter nbextension install empinken --user
jupyter nbextension enable empinken/index
```
Four buttons are defined provided that toggle the colour of selected code or markdown cells:
- activity cells (blue);
- student annotation cells (yellow);
- tutor feedback cells (pink);
- solution cells (green).
![](.images/empinken_buttons.png)
From the `nbextesions_configurator` panel, you can control which buttons are selected and what colour styling is applied:
![](.images/empinken_config.png)
When cells are toggled, a tag is set on them that is used to apply the styling:
![](.images/empinken_tags.png)
Currently, the following tags are used; <s>`style_activity`, `style_solution`, `style_student` `style_commentate`</s> UPDATED TO: `style-activity`, `style-solution`, `style-student` `style-commentate`
## History
Originally developed in support the OU distance education course *TM351 Data Management and Analysis*, the extension provides toolbar buttons that highlight selected cells with particular background colours.
The extension broke after a year or two of use, but has been patched and made more customisable since then.
The original use case allowed course material authors to style activity related cells with a blue colour theme, matching the convention used in online VLE materials.
A pink colour was used in production by the course team to highlight prodcution related course team discussions in notebooks, or cells that contained errors.
The pink colouring button was used by tutors during course presentation (i.e. in support of direct teaching) to colour feedback cells they had added to students' marked work. Somewhere along the line, the feature came to be known as "empinken"...
The updated version of the extension also includes a yellow cell highlight, that I think can be used in at least two ways:
- firstly, as an activity prompt to students in provided materials that they need to write something in the notebook as part of the activity;
- secondly, as a way for students to highlight cells that they have added to the notebook to distinguish them from content that came with the original notebook.
The green solution styling was added in response to a module team request for a style that could be used to distinguish solution cells.
## Future Considerations
The extension could be generalised to allow particular notebook cell tags to be used to identify cells that should be coloured in particular ways. So e.g. in configurator, associate the tag "activity" with a selected blue etc. See the related [`nb_extension_tagstyler`](https://github.com/innovationOUtside/nb_extension_tagstyler) extension that explores how to use cell tags to invoke the application of Bootstrap `alert` styling to correspondingly tagged cells.
Maybe also consider a setting that would colour all student created cells yellow (or whatever) by hooking something on to the notebook's cell add button to tag cells as `contributed`? Or use a pre-distribution step to tag all cells in notebooks provided to students as `distributed`?
Better support for hidden/revealable solutions in activities is an ongoing consideration. Basing this around appropriate tags would seem to be a sensible approach,
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共16个文件
txt:4个
py:2个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:nb_extension_empinken-0.0.3.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
nb_extension_empinken-0.0.3.tar.gz (16个子文件)
nb_extension_empinken-0.0.3
MANIFEST.in 110B
PKG-INFO 168B
empinken
static
empinken.yaml 1KB
index.js 10KB
__init__.py 402B
nb_extension_empinken.egg-info
PKG-INFO 168B
requires.txt 43B
not-zip-safe 1B
SOURCES.txt 441B
top_level.txt 9B
dependency_links.txt 1B
LICENSE 1KB
jupyter-config
nbconfig
notebook.d
empinken.json 65B
setup.cfg 74B
setup.py 650B
README.md 4KB
共 16 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功