Roger-luo / GarishPrint.jl

An opinioned pretty printing package for Julia objects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GarishPrint

CI codecov

An opinioned pretty printing package for Julia objects.

Installation

GarishPrint is a   Julia Language   package. To install GarishPrint, please open Julia's interactive session (known as REPL) and press ] key in the REPL to use the package mode, then type the following command

pkg> add GarishPrint

Usage

there is only one function exported that is pprint, here is a quick example

using GarishPrint

struct ABC{T1, T2, T3}
    hee::T1
    haa::T2
    hoo::T3
end

struct Example{T1, T2}
    field_a::T1
    field_b::T2
    abc::ABC
end

x = Example(
    Dict(
        "a"=>Example(
            [1, 2, 3],
            2.0,
            ABC(1, 2.0im, 3.12f0),
        ),
        "str" => Set([1, 2, 3]),
    ),
    undef,
    ABC(nothing, 1.2+2.1im, π),
)

pprint(x)

it will print the following

readme-example

Please read documentation for more advanced usage.

License

MIT License

About

An opinioned pretty printing package for Julia objects.

License:MIT License


Languages

Language:Julia 100.0%