在 print 方法中显示格式化的 URL
Show formatted URL inside print method
我想创建一个 table 并在 "Link" 列中添加可点击的 URL,由于 URL 太长,这些 URL 应显示自定义标题。
到目前为止我有:
str = "Test Title";
link = str.link("https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567")
因为我在 Apache Zeppelin 段落中,所以我需要在 table 中打印内容。所以我使用 print 方法创建了一个 table 并以相同的方式向其中添加项目,例如:
print("%table Test Link)
print(link)
这导致 table 如:
Test Link
---------
<a href="https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567">Test Title</a>
我期望的是带有测试标题的超链接:
Test Link
---------
Test Title
这可能吗?
我使用 Apache Zeppelin 中的 %html 标签解决了这个问题:
str = "Test Title"
link =str.link("https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567")
print("%table Test Link)
print("%html " + link)
我想创建一个 table 并在 "Link" 列中添加可点击的 URL,由于 URL 太长,这些 URL 应显示自定义标题。
到目前为止我有:
str = "Test Title";
link = str.link("https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567")
因为我在 Apache Zeppelin 段落中,所以我需要在 table 中打印内容。所以我使用 print 方法创建了一个 table 并以相同的方式向其中添加项目,例如:
print("%table Test Link)
print(link)
这导致 table 如:
Test Link
---------
<a href="https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567">Test Title</a>
我期望的是带有测试标题的超链接:
Test Link
---------
Test Title
这可能吗?
我使用 Apache Zeppelin 中的 %html 标签解决了这个问题:
str = "Test Title"
link =str.link("https://my_long_url.com/v1.0/ui/index.html#/testkeywordreport?detailView=1&id=1234567")
print("%table Test Link)
print("%html " + link)