以HTML报表的形式执行和呈现笔记本。

reportsrender的Python项目详细描述


从Rmarkdown或jupyter笔记本生成可复制的报告

Build StatusDocumentation StatusThe uncompromising python formatter

Reportsrender允许从 jupyter笔记本和Rmarkdown文件。它利用papermillRmarkdown执行笔记本并使用 Pandoc将它们转换为HTML。在

功能
  • 两个执行引擎:papermill和Rmarkdown。在
  • 支持jupytext支持的任何格式。在
  • 创建可轻松共享的自包含HTML。在
  • 隐藏单元格的输入和/或输出。在
  • 参数化报告

请参阅documentation了解更多详细信息!在

入门

  • 使用rmarkdown引擎将rmarkdown文档执行为HTML
reportsrender --engine=rmd my_notebook.Rmd report.html
  • 使用papermill执行参数化jupyter笔记本
^{pr2}$
命令行中的用法
reportsrender

Execute and render a jupyter/Rmarkdown notebook.
The `index` subcommand generates an index html
or markdown file that links to html documents.

Usage:
  reportsrender <notebook> <out_file> [--cpus=<cpus>] [--params=<params>] [--engine=<engine>]
  reportsrender index [--index=<index_file>] [--title=<title>] [--] <html_files>...
  reportsrender --help

Arguments and options:
  <notebook>            Input notebook to be executed. Can be any format supported by jupytext.
  <out_file>            Output HTML file.
  -h --help             Show this screen.
  --cpus=<cpus>         Number of CPUs to use for Numba/Numpy/OpenBLAS/MKL [default: 1]
  --params=<params>     space-separated list of key-value pairs that will be passed
                        to papermill/Rmarkdown.
                        E.g. "input_file=dir/foo.txt output_file=dir2/bar.html"
  --engine=<engine>     Engine to execute the notebook. [default: auto]

Arguments and options of the `index` subcommand:
  <html_files>          List of HTML files that will be included in the index. The tool
                        will generate relative links from the index file to these files.
  --index=<index_file>  Path to the index file that will be generated. Will be
                        overwritten if exists. Will auto-detect markdown (.md) and
                        HTML (.html) format based on the extension. [default: index.html]
  --title=<title>       Headline of the index. [default: Index]

Possible engines are:
  auto                  Use `rmd` engine for `*.Rmd` files, papermill otherwise.
  rmd                   Use `rmarkdown` to execute the notebook. Supports R and
                        python (through reticulate)
  papermill             Use `papermill` to execute the notebook. Works for every
                        kernel available in the jupyter installation.

安装

手动安装:

获取依赖项:

对于Rmarkdown渲染引擎 (如果你不去,就不需要安装它们 要使用Rmarkdown渲染引擎,请执行以下操作:

  • R和以下包装:
rmarkdown
reticulate

然后

从pip安装:

pip install reportsrender

或者

从github安装:

pip install flit
flit installfrom github:grst/reportsrender

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何生成格式化文件。xml文件?   java向Vaadin布局添加模糊侦听器   Java中的默认构造函数内容   java Eclipse错误:“无法找到jre7的可执行文件”   Java8,如何使用流实现switch语句?   java在CDH4示例上运行map reduce作业   java在servlet中获取文件名   如何禁止在所有浏览器中加载脚本“Selenium Java”   java Play框架和gradle   如果DifferencedName有引号,java无法从组中获取成员   java如何在使用链表实现的堆栈中实现pop操作?   java如何在网络视图中全屏制作YouTube视频?   如何在java中为分配的时间或固定的时间执行循环   java如何使用Android SDK在onCreate语句中动态更改活动的背景颜色?   java如何理解客户端没有来自IBM MQ的消息的原因?   java使用表查找用户最多出现的字母   java中的数组多维数据结构   java如何将一个值设置为一个类中的变量,并从另一个类中获取该变量的值?   java在创建新AVD后无法运行Android应用程序   java使用广度优先搜索算法存储迷宫求解路径