u/vihu
-
1points
-
37points
penview.nvim: pseudo real time markdown rendering (self.neovim) [Plugin]
vihu
vihu
Since you said small: opengist, use it pretty much everyday to share markdown notes.
vihu
I tried Ketch in the past but found it a bit inconsistent. Had a bit more consistent results with obscura headless browser, it works via mcp though.
vihu
Project Name: pagebin
One liner: Like opengist but for static html sites
Repo: https://github.com/vihu/pagebin
Description: I really like opengist for sharing markdown files/gists with my colleagues but quite often we make architecture diagrams and simple static HTML sites and I couldn't really find dedicated OSS which allows me to do that; pagebin effectively is a simple way to do so. (Yes, I am aware that this is doable with nginx/caddy/copyparty, I just wanted a purpose built app).
Basically pagebin a single binary. You paste some HTML or upload a folder/zip and get a shareable link. Links can be optionally password protected and/or expire as per your choice. I also added a tiny API and a skill dir so your choice of AI agent can publish a generated static HTML directly to your instance.
pagebin repo has a simple docker-compose and instructions to set it up on your machine with reverse proxy (caddy) example. If you feel something is missing for your use case, I'll try to get it in. That said, for my purposes pagebin is largely feature-complete.
Hopefully someone else finds it useful too, cheers!
Disclaimer: All(most) of the code for pagebin was written by AI (claude fable 5.1 + gpt-6 astra). I was simply the driver. This post, however, is written entirely by me (human).
vihu
Would you be open to open sourcing the addon so we can self-host it?
vihu
netsplit happened with me a few times as well, heck it even happened during the interview (multiple times) but the staff was very helpful to allow me to regain my spot pretty much everytime I lost it.
Honestly the queueing and interview is testing your patience rather than anything else, took me about 3 weeks of keeping my mac mini running 24x7, you can do this too!
vihu
I also built an extension, similar to ddgs: https://github.com/vihu/pi-web (wraps ddgr and trafilatura, exposes web_search and web_fetch tools), works relatively okay.
vihu
Couldn't agree more and yes it's very much a tinkerer's harness.
With the right set of experience + workflows + extensions one can certainly make an extremely capable custom system which in my own limited testing certainly exceeds the capabilities of other harnesses.
My ~/.pi/agent/AGENTS.md is:
This is additional context for pi coding agent.
# Ideation
- ideas must be put in project-local `.ai-docs/` directory
- ideas must be prefixed by `IDEA-<xyz>.md`
# Planning
- plans must be put in project-local `.ai-docs/` directory
- plans must be prefixed by `PLAN-<xyz>.md`
# Tasks
- tasks must be put in project-local `.ai-docs/` directory
- tasks must be prefixed by `TASK-<xyz>.md`
And the plugins I use are:
$ pi list
User packages:
git:github.com/elpapi42/pi-fork (on-demand subagents)
git:github.com/elpapi42/pi-observational-memory (temporal memory)
git:github.com/vihu/pi-portia (long term durable memory, my own)
git:github.com/vihu/pi-web (local web fetch/search, my own)
And just with these I have pretty much everything I could possibly need to get by.
vihu
Thanks, glad you found it useful!
vihu
I just tried inline math with penview: https://files.catbox.moe/mzl5ag.mp4, seems to work okay I think.
vihu
Shameless self-plug: https://github.com/vihu/penview.nvim (I too was frustrated with previewers so ended up rolling my own).
Happy to address any issues/concerns!
vihu
I just went ahead and made an extension for myself: https://github.com/vihu/pi-web
I chose json (ddgr) + xml (trafilatura) instead though. Seems to be working quite well. Thanks a lot for the awesome idea!
vihu
Thank you for the inspiration, your idea of using rust for most of the gruntwork was extremely helpful!
vihu
Pretty cool, I use zsh functions to do something similar:
# set kanagawa-wave
wave() {
sed -i "s/theme = .*/theme = kanagawa-wave/g" $HOME/.config/ghostty/config
sed -i 's/kanagawa-theme .*/kanagawa-theme "wave"/g' $HOME/.tmux.conf
sed -i "s/vim.g.colorscheme = .*/vim.g.colorscheme = 'kanagawa-wave'/g" $HOME/.config/nvim/lua/config/globals.lua
sed -i "s/color_theme = .*/color_theme = \"wave\"/g" $HOME/.config/btop/btop.conf
sed -i "s/--theme=.*/--theme=\"wave\"/g" $HOME/.config/bat/config
}
# set kanagawa-dragon
dragon() {
sed -i "s/theme = .*/theme = kanagawa-dragon/g" $HOME/.config/ghostty/config
sed -i 's/kanagawa-theme .*/kanagawa-theme "dragon"/g' $HOME/.tmux.conf
sed -i "s/vim.g.colorscheme = .*/vim.g.colorscheme = 'kanagawa-dragon'/g" $HOME/.config/nvim/lua/config/globals.lua
sed -i "s/color_theme = .*/color_theme = \"dragon\"/g" $HOME/.config/btop/btop.conf
sed -i "s/--theme=.*/--theme=\"dragon\"/g" $HOME/.config/bat/config
}
# set kanagawa-lotus
lotus() {
sed -i "s/theme = .*/theme = kanagawa-lotus/g" $HOME/.config/ghostty/config
sed -i 's/kanagawa-theme .*/kanagawa-theme "lotus"/g' $HOME/.tmux.conf
sed -i "s/vim.g.colorscheme = .*/vim.g.colorscheme = 'kanagawa-lotus'/g" $HOME/.config/nvim/lua/config/globals.lua
sed -i "s/color_theme = .*/color_theme = \"lotus\"/g" $HOME/.config/btop/btop.conf
sed -i "s/--theme=.*/--theme=\"lotus\"/g" $HOME/.config/bat/config
}
vihu
No worries, and yeah I agree that having plugin diversity is generally good.
FWIW, here's a few things which penview does slightly differently:
- no support for any other format than markdown
- light/dark toggle in the browser
- github flavored markdown rendering only
- headless mode support (thanks to one of the commenters on this thread for the suggestion)
It's arguable whether either of these things are better/worse to be fair :)
vihu
Added support for this. Updated instructions in the readme. Good call, thanks!
vihu
I wasn’t aware of this one honestly. Maybe just try out both and see which one you prefer :)
Well, I tried live-preview, it's pretty good! I probably would not have written penview if I had known about this. You should absolutely just continue using it, since you'll have to install the rust toolchain locally in order to use penview which is probably not worth the effort.
vihu
Could you please make an issue on the repo, I’ll get to it.
Okay, added headless mode support; should work nicely, instructions in the readme.
vihu
Doesn't support mermaid diagrams, I typically use ascii diagrams within code blocks so those render okay. I'll probably add mermaid rendering as well since that would be a good nice-to-have.
Alright, mermaid rendering should work now as well. PR#1, thanks for the suggestion!
vihu
Ah yes, to each their own I suppose.
vihu
Seconded. Here's my config for reference, I use fff for files and just bind ctrl+p. I do use fzf for other types of lookups though.
vihu
bruh are you me?
vihu
I think there's some kernel patching required for the cirrus audio drivers, I haven't bothered to do so (yet). There's some info on this thread.
I built a few apps with claude which I use on a daily basis:
I think livemark is the prettiest with itele a close second.