diff --git a/.github/assets/demo/demo-dark.gif b/.github/assets/demo/demo-dark.gif index 20491f9..d4a2e99 100644 Binary files a/.github/assets/demo/demo-dark.gif and b/.github/assets/demo/demo-dark.gif differ diff --git a/.github/assets/demo/demo-dark.mp4 b/.github/assets/demo/demo-dark.mp4 index c92938f..3b60862 100644 Binary files a/.github/assets/demo/demo-dark.mp4 and b/.github/assets/demo/demo-dark.mp4 differ diff --git a/.github/assets/demo/demo-dark.tape b/.github/assets/demo/demo-dark.tape index 3de87b7..3d6b705 100644 --- a/.github/assets/demo/demo-dark.tape +++ b/.github/assets/demo/demo-dark.tape @@ -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 @@ -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 diff --git a/.github/assets/demo/demo-light.gif b/.github/assets/demo/demo-light.gif index 898c00d..df3155a 100644 Binary files a/.github/assets/demo/demo-light.gif and b/.github/assets/demo/demo-light.gif differ diff --git a/.github/assets/demo/demo-light.mp4 b/.github/assets/demo/demo-light.mp4 index da60e3d..2f05e36 100644 Binary files a/.github/assets/demo/demo-light.mp4 and b/.github/assets/demo/demo-light.mp4 differ diff --git a/.github/assets/demo/demo-light.tape b/.github/assets/demo/demo-light.tape index f50e143..f56a461 100644 --- a/.github/assets/demo/demo-light.tape +++ b/.github/assets/demo/demo-light.tape @@ -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 @@ -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 diff --git a/README.md b/README.md index e9d4555..bb99b9d 100644 --- a/README.md +++ b/README.md @@ -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)). diff --git a/pixi.lock b/pixi.lock index 1463ef0..21af8f8 100644 --- a/pixi.lock +++ b/pixi.lock @@ -46,6 +46,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran-13.3.0-h9576a4e_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_impl_linux-64-13.3.0-h10434e7_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gfortran_linux-64-13.3.0-hb919d3a_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/glow-md-2.1.1-ha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gmp-6.3.0-hac33072_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/graphite2-1.3.14-hecca717_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/gxx-13.3.0-h9576a4e_1.conda @@ -237,6 +238,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/gfortran-13.3.0-h8a56e6e_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/gfortran_impl_linux-aarch64-13.3.0-h174a3c4_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/gfortran_linux-aarch64-13.3.0-h2809cf8_7.conda + - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/glow-md-2.1.1-h8af1aa0_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/gmp-6.3.0-h0a1ffab_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/graphite2-1.3.14-hfae3067_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/gxx-13.3.0-h8a56e6e_1.conda @@ -403,6 +405,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-64/freetype-2.13.3-h694c41f_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/fribidi-1.0.10-hbcb3906_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-64/gdk-pixbuf-2.42.12-ha587570_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/glow-md-2.1.1-h694c41f_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/gmp-6.3.0-hf036a51_2.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/graphite2-1.3.14-h21dd04a_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/harfbuzz-10.4.0-h86b413f_0.conda @@ -516,6 +519,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/osx-arm64/freetype-2.13.3-hce30654_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/fribidi-1.0.10-h27ca646_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/osx-arm64/gdk-pixbuf-2.42.12-h7ddc832_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/glow-md-2.1.1-hce30654_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/gmp-6.3.0-h7bae524_2.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/graphite2-1.3.14-hec049ff_1.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/harfbuzz-10.4.0-hb72c1af_0.conda @@ -627,6 +631,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/win-64/freetype-2.13.3-h57928b3_1.conda - conda: https://conda.anaconda.org/conda-forge/win-64/fribidi-1.0.10-h8d14728_0.tar.bz2 - conda: https://conda.anaconda.org/conda-forge/win-64/gdk-pixbuf-2.42.12-hed59a49_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/glow-md-2.1.1-h57928b3_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/graphite2-1.3.14-he0c23c2_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/harfbuzz-10.4.0-h9e37d49_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/icu-75.1-he0c23c2_0.conda @@ -2274,6 +2279,43 @@ packages: license_family: BSD size: 30553 timestamp: 1731939522932 +- conda: https://conda.anaconda.org/conda-forge/linux-64/glow-md-2.1.1-ha770c72_0.conda + sha256: 36c8683fe51e5b8310a51e4c6f20b20605c27c169b3bfae42c3ac44895a0721e + md5: aa07766662e64399fb9860a75cc05d9d + license: MIT + license_family: MIT + size: 5351841 + timestamp: 1748677646407 +- conda: https://conda.anaconda.org/conda-forge/linux-aarch64/glow-md-2.1.1-h8af1aa0_0.conda + sha256: 5d948aea065d8caf3b5f98a50e46b50dab00e662c78509bc89d0dc2e0a6af10a + md5: c7ad11912c98e37dfdd18072bad40498 + license: MIT + license_family: MIT + size: 4829355 + timestamp: 1748679026348 +- conda: https://conda.anaconda.org/conda-forge/osx-64/glow-md-2.1.1-h694c41f_0.conda + sha256: 5dcee91d10107fc44071077f4108cfbf87b7918a6bb4862463a5e61b0a452026 + md5: fbfb06086dc462b151e7c638500989b1 + constrains: + - __osx>=10.12 + license: MIT + license_family: MIT + size: 5217195 + timestamp: 1748677785524 +- conda: https://conda.anaconda.org/conda-forge/osx-arm64/glow-md-2.1.1-hce30654_0.conda + sha256: 49d9684416f3644ccd1590a1213e0ecf3c97762f0367f10d51df8ee6fcc0ffc1 + md5: 0a056f8811fea71e2114f1ec34daa846 + license: MIT + license_family: MIT + size: 4826763 + timestamp: 1748677751386 +- conda: https://conda.anaconda.org/conda-forge/win-64/glow-md-2.1.1-h57928b3_0.conda + sha256: bc7cd7cb9be55675ece37f21c6cb99e1b12b55a020acb0d18b2ffb2c62a2d218 + md5: 0199498383c6132c85bc1d7501047294 + license: MIT + license_family: MIT + size: 5280969 + timestamp: 1748677897543 - conda: https://conda.anaconda.org/conda-forge/linux-64/gmp-6.3.0-hac33072_2.conda sha256: 309cf4f04fec0c31b6771a5809a1909b4b3154a2208f52351e1ada006f4c750c md5: c94a5994ef49749880a8139cf9afcbe1 diff --git a/pixi.toml b/pixi.toml index e84792a..0a04ea1 100644 --- a/pixi.toml +++ b/pixi.toml @@ -13,6 +13,7 @@ rust = "==1.88.0" openssl = "*" pkg-config = "*" vhs = "*" +glow-md = "*" [target.linux.dependencies] compilers = ">=1.7.0"