Acclimatise是一个Python库和命令行实用程序,用于解析命令行工具的帮助输出,然后以更结构化的格式输出工具的描述

acclimatise的Python项目详细描述


有关完整文档,请参阅Github Pages Website。在

Acclimatise是一个Python库和命令行实用程序,用于解析帮助输出 然后在more中输出该工具的描述 结构化格式,例如 Common Workflow Language tool definition。在

当前“适应”同时支持CWLWDL输出,但将来会考虑其他格式,特别是拉式 请求支持他们。在

示例

假设您要创建一个包含通用Unix wc(word count)的CWL工作流 实用性。运行wc --help返回:

Usage: wc [OPTION]... [FILE]...
  or: wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified.  A word is a non-zero-length sequence of
characters delimited by white space.

With no FILE, or when FILE is -, read standard input.

The options below may be used to select which counts are printed, always in
the following order: newline, word, character, byte, maximum line length.
  -c, --bytes            print the byte counts
  -m, --chars            print the character counts
  -l, --lines            print the newline counts
      --files0-from=F    read input from the files specified by
                           NUL-terminated names in file F;
                           If F is - then read names from standard input
  -L, --max-line-length  print the maximum display width
  -w, --words            print the word counts
      --help display this help and exit
      --version output version information and exit

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/wc>
or available locally via: info '(coreutils) wc invocation'

如果运行acclimatise explore wc,这意味着“解析wc命令和所有子命令”, 在当前目录中,您将得到以下文件:

  • wc.cwl
  • wc.wdl
  • wc.yml

这些是命令wc的3种不同格式的表示。如果你看一下wc.wdl,你会看到它 包含wc的WDL兼容工具定义:

^{pr2}$

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

推荐PyPI第三方库


热门话题
jsoup有效文件路径抛出java。木卫一。FileNotFoundException   java如何在不删除和添加Mapbox中的层的情况下更改SymbolLayer的Z值?   java计算用户定义年数内四个季度的降雨量   如何在Java中轻松地将格式为“20 0F 01”的字符串更改为十六进制值?   java在JPA或Hibernate中“持久类”和“实体”之间有什么区别?   java Android:AlarmManager“缺少对unregisterReceiver()的调用?”当按下后退按钮时   logcat中的java错误“isDataSchedulerEnabled():false”   java i/p col特性必须是字符串或数字类型,但不能是org。阿帕奇。火花利纳格小姐。向量   java如何从Post请求url和浏览器转储中隐藏密码   多线程javamail中的java问题   java我的用户应该直接连接到数据库吗?如何将用户连接到数据库;   java如何获得Spring数据JPA存储库工厂?   windows java字节数组转换为字符串,但不同的操作系统会产生不同的结果   java代码在eclipse中编译,但不在命令行上编译