https://github.com/atelierarith/docstringasimage.jl
This package visualizes Julia docstrings for functions with images
https://github.com/atelierarith/docstringasimage.jl
docstring julia julialang sixel-graphics
Last synced: 3 months ago
JSON representation
This package visualizes Julia docstrings for functions with images
- Host: GitHub
- URL: https://github.com/atelierarith/docstringasimage.jl
- Owner: AtelierArith
- License: mit
- Created: 2024-12-11T13:00:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-25T10:57:58.000Z (about 1 year ago)
- Last Synced: 2025-01-20T17:54:40.214Z (about 1 year ago)
- Topics: docstring, julia, julialang, sixel-graphics
- Language: Julia
- Homepage:
- Size: 19.5 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DocstringAsImage.jl
[](https://github.com/AtelierArith/DocstringAsImage.jl/actions/workflows/CI.yml)
This package allows us to visualize Julia docstrings as images. This feature works only in terminals that support Sixel Graphics. Internally we use Quarto and Typst to render images. We use Sixel.jl package to render generated images in your terminal.

## Setup
```
julia> using Pkg; Pkg.add("DocstringAsImage")
```
To build from source, run the following commands:
```sh
$ git clone https://github.com/AtelierArith/DocstringAsImage.jl.git
$ cd DocstringAsImage.jl
$ julia --project -e 'using Pkg; Pkg.instantiate()'
$ ls
Manifest.toml Project.toml README.md src
```
## Usage
Our package exports `@imgdoc` macro. It works like the `@doc` macro.
```julia
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.2 (2024-12-01)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using DocstringAsImage
julia> @imgdoc exp
julia> using SpecialFunctions: zeta
julia> @imgdoc zeta
julia> using Distributions: Beta
julia> @imgdoc Beta
```