Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .github/assets/demo/demo-dark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/assets/demo/demo-dark.mp4
Binary file not shown.
8 changes: 4 additions & 4 deletions .github/assets/demo/demo-dark.tape
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Output .github/assets/demo/demo-dark.gif

Set Theme "rose-pine-moon"
Set Shell "bash"
Set FontSize 28
Set FontSize 26
Set Width 1920
Set Height 750

# need to have pixi-diff-to-markdown and mdt (md-tui) installed
# pixi global install md-tui
# need to have pixi-diff-to-markdown and glow (glow-md on conda-forge) installed
# pixi global install glow-md
# pixi global install pixi-diff-to-markdown
Hide
Type "export PATH=$(pwd)/target/debug:$PATH" Enter
Expand All @@ -21,7 +21,7 @@ Type "clear" Enter
Sleep 1s
Show

Type@150ms "git show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown | mdt" Sleep 1s Enter
Type@150ms "git show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown | glow -t -w 999" Sleep 1s Enter
Sleep 5s

Down@150ms 20
Expand Down
Binary file modified .github/assets/demo/demo-light.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/assets/demo/demo-light.mp4
Binary file not shown.
8 changes: 4 additions & 4 deletions .github/assets/demo/demo-light.tape
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Output .github/assets/demo/demo-light.gif

Set Theme "rose-pine-dawn"
Set Shell "bash"
Set FontSize 28
Set FontSize 26
Set Width 1920
Set Height 750

# need to have pixi-diff-to-markdown and mdt (md-tui) installed
# pixi global install md-tui
# need to have pixi-diff-to-markdown and glow (glow-md on conda-forge) installed
# pixi global install glow-md
# pixi global install pixi-diff-to-markdown
Hide
Type "export PATH=$(pwd)/target/debug:$PATH" Enter
Expand All @@ -21,7 +21,7 @@ Type "clear" Enter
Sleep 1s
Show

Type@150ms "git show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown | mdt" Sleep 1s Enter
Type@150ms "git show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown | glow -t -w 999" Sleep 1s Enter
Sleep 5s

Down@150ms 20
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,23 @@ $ git show HEAD~20:pixi.lock | pixi-diff --after pixi.lock | pixi-diff-to-markdo
...
```

#### View with md-tui
#### View in terminal with glow

You can view this generated markdown file in your terminal using [glow](https://github.com/charmbracelet/glow) (available on [conda-forge](https://prefix.dev/channels/conda-forge/packages/glow-md) as `glow-md`).

```bash
git show HEAD~20:pixi.lock | pixi-diff --before - --after pixi.lock | pixi-diff-to-markdown | glow
# or using pixi exec
git show HEAD~20:pixi.lock | pixi exec pixi-diff --before - --after pixi.lock | pixi exec pixi-diff-to-markdown | pixi exec -s glow-md -- glow --tui
```

A couple of issues with this approach:

- Width is not correct in `--tui` mode ([charmbracelet/glow#805](https://github.com/charmbracelet/glow/issues/805)). Workaround: use `glow --tui --width=$(tput cols)`
- Links are not properly rendered in `--tui` mode when not reading from stdin ([charmbracelet/glow#806](https://github.com/charmbracelet/glow/issues/806))
- Unwanted whitespace in beginning when using `--tui` when not reading from stdin ([charmbracelet/glow#807](https://github.com/charmbracelet/glow/issues/807))

#### View in terminal with md-tui

You can view this generated markdown file in your terminal using [md-tui](https://github.com/henriklovhaug/md-tui) (available on [conda-forge](https://prefix.dev/channels/conda-forge/packages/md-tui)).

Expand Down
42 changes: 42 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rust = "==1.88.0"
openssl = "*"
pkg-config = "*"
vhs = "*"
glow-md = "*"

[target.linux.dependencies]
compilers = ">=1.7.0"
Expand Down
Loading