datasette-multiline-links 作者 simonw

星标

README 源代码

datasette-multiline-links

PyPI Changelog Tests License

使 Datasette 中多行分隔的 URL 可点击

安装

将此插件安装在与 Datasette 相同的环境中。

datasette install datasette-multiline-links

演示

在此使用 Datasette Lite 针对来自 Data is Plural 以前精选数据集的 Google 表格电子表格试用此插件

用法

安装后,如果某个单元格包含如下内容

https://example.com
Not a link
https://google.com

它将渲染为

https://example.com Not a link https://google.com">
<a href="https://example.com">https://example.coma>
Not a link
<a href="https://google.com">https://google.coma>

开发

要在本地设置此插件,请先检出代码。然后创建一个新的虚拟环境

cd datasette-multiline-links
python3 -m venv venv
source venv/bin/activate

现在安装依赖项和测试依赖项

pip install -e '.[test]'

运行测试

pytest