Skip to content
Simple CWL document generator from given execution commands
D Dockerfile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.devcontainer
.github/workflows
.gitignore
Dockerfile
LICENSE
README.md
dev.Dockerfile
zatsu-cwl-generator.d

README.md

zatsu-cwl-generator

release container Actions Status

This is a simple CWL document generator from given execution commands.

Build Requirements

How to execute

There are several ways to execute it. See zatsu-cwl-generator --help for more details.

  • Use Docker container

    $ docker run --rm ttanjo/zatsu-cwl-generator:latest "cat aaa.txt bbb.txt > output.txt"
    #!/usr/bin/env cwl-runner
    # Generated from: cat aaa.txt bbb.txt > output.txt
    class: CommandLineTool
    cwlVersion: v1.0
    baseCommand: cat
    arguments:
      - $(inputs.aaa_txt)
      - $(inputs.bbb_txt)
    inputs:
      - id: aaa_txt
        type: File
      - id: bbb_txt
        type: File
    outputs:
      - id: all-for-debugging
        type:
          type: array
          items: [File, Directory]
        outputBinding:
          glob: "*"
      - id: out
        type: stdout
    stdout: output.txt
  • Download the latest binary from the release page

    $ export ver=v1.0.5
    $ export os=linux # `export os=osx` for macOS
    $ wget -O zatsu-cwl-generator.tar.xz https://github.com/tom-tan/zatsu-cwl-generator/releases/download/${ver}/zatsu-cwl-generator-${ver}-${os}-x86_64.tar.xz
    $ tar xf zatsu-cwl-generator.tar.xz
    $ chmod +x zatsu-cwl-generator
    $ ./zatsu-cwl-generator "cat aaa.txt bbb.txt > output.txt"
    ...
  • Use rdmd

    $ ./zatsu-cwl-generator.d "cat aaa.txt bbb.txt > output.txt"
    ...
  • Build a binary and use it

    $ ldc2 zatsu-cwl-generator.d
    $ ./zatsu-cwl-generator "cat aaa.txt bbb.txt > output.txt"
    ...

If you need a static linked binary, add -static to the build command:

$ ldc2 zatsu-cwl-generator.d # for dynamic link (default)
$ ldd zatsu-cwl-generator
        /lib/ld-musl-x86_64.so.1 (0x7f476696e000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f4766711000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f476696e000)

$ ldc2 -static zatsu-cwl-generator.d # for static link
$ ldd zatsu-cwl-generator
/lib/ld-musl-x86_64.so.1: zatsu-cwl-generator: Not a valid dynamic program

How to test this program

$ rdmd -main -unittest zatsu-cwl-generator.d

How to generate an internal document

$ ldc2 -Dddocs zatsu-cwl-generator.d

You can see a HTML file in the docs directory.

You can’t perform that action at this time.