Skip to content

An opinioned pretty printing package for Julia objects.

License

Notifications You must be signed in to change notification settings

Roger-luo/GarishPrint.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages