Deprecate w3m for viewing readme and add mdview.py instead#599
Deprecate w3m for viewing readme and add mdview.py instead#599EnigmaCurry wants to merge 3 commits into
Conversation
mcmikemn
left a comment
There was a problem hiding this comment.
This works for me for root: ...enigmacurry/d.rymcg.tech/ $ make readme
But it doesn't work for service readmes: $ d make whoami readme or ...enigmacurry/d.rymcg.tech/whoami $ make readme
|
Also, certainly not a requirement, but a pager option would be nice. |
|
Yes I forgot about those other calls. It is supposed to have a pager, if you're not seeing it, its a bug. |
|
oh on nix, for whatever reason, I had set PAGER=cat which disabled the pager. after unsetting it I saw the pager. |
|
a regression of mdview.py from using w3m: none of the links are hyperlinks. |
|
This works for me for main and project READMEs, but it only works in VTERM in Emacs. When I try it in an ssh session, I see the ANSI escape codes: ESC[1;4mOllamaESC[0m
ESC[4;34mOllamaESC[0m is a local LLM runtime/engine that lets you run and interact with language models via simple API endpoints.
ESC[4;35mConfigESC[0m
ESC[48;5;235m
ESC[0mESC[48;5;235m ESC[0mESC[38;5;231;48;5;235mmake configESC[0mESC[48;5;235m ESC[0mESC[48;5;235m ESC[0m
ESC[48;5;235m
ESC[0m
This will ask you to enter the domain name to use. It automatically saves your responses into the configuration file ESC[1;36;40m.env_{DOCKER_CONTEXT}_{INSTANCE}ESC[0m.
Edit the ESC[1;36;40mOLLAMA_CONTEXT_LENGTHESC[0m variable to set the default context length for models you load. (The default is ESC[1;36;40m4096ESC[0m which is set conservatively low.)
ESC[1;35mAuthentication and AuthorizationESC[0m
You may add an API token to secure your service by setting ESC[1;36;40mOLLAMA_API_TOKENESC[0m in the ESC[1;36;40m.env_{CONTEXT}_{INSTANCE}ESC[0m file.
See ESC[4;34mAUTH.mdESC[0m for information on adding external authentication on top of your app.
ESC[4;35mInstallESC[0m
ESC[48;5;235m
ESC[0mESC[48;5;235m ESC[0mESC[38;5;231;48;5;235mmake installESC[0mESC[48;5;235m ESC[0mESC[48;5;235m ESC[0m
ESC[48;5;235m
ESC[0m
ESC[4;35mUsing OllamaESC[0m
There is no web frontend to Ollama. You use it via its REST API. You can ESC[1;36;40mmake shellESC[0m to enter a shell in the Ollama container and use it via its CLI (ESC[4;34mhere is a CLIESC[0mESC[4;34m ESC[0mESC[4;34mreferenceESC[0m), or you can use it via API calls (ESC[4;34mhere is the APIESC[0mESC[4;34m ESC[0mESC[4;34mdocumentationESC[0m).
ESC[4;35mDestroyESC[0m
ESC[48;5;235m
ESC[0mESC[48;5;235m ESC[0mESC[38;5;231;48;5;235mmake destroyESC[0mESC[48;5;235m ESC[0mESC[48;5;235m ESC[0m
ESC[48;5;235m
ESC[0m
This completely removes the container and deletes all its volumes.In the same ssh session I can use a different tool (glow) to view the same README and it displays the formatting fine. |
|
Does glow let you follow links? |
|
Possible replacement for mdview.py? elinks |
Fixes #598
If the browser is not resolved to a system browser like
firefox, then this script will fallback to using mdview.py which requires that the user has installed theuvdependency, which was previously added to the docs as a required dependency.