-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: markdown template #96
base: main
Are you sure you want to change the base?
feat: markdown template #96
Conversation
I am sorry, could you please provide an example of how this works? |
Thank you for your kind response. As an example you could try: kb add kb/README.md --template="markdown"
kb view README.md But I'll be happy to add an example to the PR if you wish, and maybe some documentation. Sure you can use the existing functionalities to highlight the content of an artifact, but I think that parsing a CommonMark documents goes a little further than that. As a bonus it comes with a variety of predefined well known themes you can choose from and some global formatting options like console padding and paging. Here are some screenshots of the kb README.md with the default markdown config that use the |
Only if `title` or `template` are not specified.
Ok thanks for everything but before integrating I still need additional information... |
Hi, thanks for your time ... and your project. If I type And with The default markdown template is defined right after the general default template in For me this is behavior is reproduced with :
After |
Ok thanks for the patience, unlikely when I try: (Of course after I fetched your pull request). |
I am sorry I am really not able to reproduce what you have, may it be some file you have on your system that is missing on my machine? |
Hi, thanks for your response. I think that having reproduced the desired behavior in a vm remove the likelihood of any dependencies with local configurations and other files. Had you tried to start a vm and follow the exact steps listed in my previous post? |
I just came across this issue myself. If this is tried on an existing system the logic in initializer.py will prevent the new markdown template being created due to the existence of the templates directory. |
What does this implement/fix? Explain your changes.
Artifacts could now be parsed as markdown documents and rendered in color.
It uses
rich
which implements commonmark standards and several themes.Does this close any currently open issues?
No. It's a new feature.
Any relevant logs, error output, etc?
No.
Any other comments?
Discovered this repo today and fits pretty well my needs, except that I already have a knowledge base in form of markdown documents. This is my attempt to fill this gap.
Before pushing I've run all the tests and linters in the makefile; these fixes covers several files resulting in quite a bit of noise around the actual implementation of the functionality that is instead grouped in the commit 45e000e.
Where has this been tested?
Operating System: Arch
Platform: Linux
Target Platform: Linux desktop
OS: Arch Linux x86_64
Host: XPS 15 9570
Kernel: 5.14.16-arch1-1
Shell: bash 5.1.8
Resolution: 1920x1080
WM: i3
Terminal: alacritty
CPU: Intel i7-8750H (12) @ 4.100GHz