Extended integration
Opened this issue · 4 comments
This is a great plugin, and I think it can be the baseline for a generic integration with external tools.
TL;DR
Make the snippet plugin work for any block. Use regex to identify which template to use. Allow interaction with current block and/or child blocks.
My use case - Jira integration
Having the tickets content within my notes and to be able to update tickets through Obsidian. If the snippet plugin would support the features above, then this integration would be rather simple:
- I would define that a ticket format as
- [ ] {{template:jira, id:JIRA-1234}}
. - I will run the snippet plugin on that block. Through custom regex it will pick up that the template is "jira" and pass the content of the block tree, current block and child blocks, to external program. The external program will return the updated block tree.
- The result will be in this case:
- [ ] {{template:jira, id:JIRA-1234}} <TICKET NAME>
- Description: ...
- Comments:
- ...
- ...
- On creation of a new comment, and running the snippet plugin on the comment or anywhere else within the ticket block tree, it will trigger the snippet plugin on the parent block.
Features/Requirements:
- Running snippet for any block type
- Custom Regex to identify the snippet template - first match wins
- Standarized block tree output/input for external program
- Chlid block can trigger a parent, in the example above it would be enough to put a new comment with a date and run the snippet on it that will actually trigger on the parent block as a whole
- (nice to have) bottom up chain reaction - when a child block matches a different template and after successful execution it will trigger the parent block.
- (nice to have) tow down chain reaction - parent block snippet execution will trigger all the nested childern blocks recursively
- (nice to have) Hidding regex - in reading/edit mode to hide or minimize the snippet relevent markers, for example the
{{ .... }}
above - (nice to have) Notification and progress bar
I can implement this functionality, but can it be part of this plugin?
Hi @abraverm,
I remember the plugin uses the block types defined in the config, if you add a 'jira' entry in the config, then 'jira' blocks will be recognized to be run as configured in the config.
Regarding being part of the plugin, and if you are into JIRA, I would definitely recommend looking into the https://github.com/marc0l92/obsidian-jira-issue plugin and look if your functionality could be added there!
Cheers.
Hi @cristianvasquez,
By "blocks" I mean whatever Obsidian considers a block - this includes paragraphs, bullets and code blocks. From UX perspective, using code blocks for jira tickets is troublesome.
I'm not intrested in a Jira specific solution, also that plugin focus seems to be only on retrieving information.
If you are not intrested in this diraction, that is fine and feel free to close the this issue.
Best.
Hi @abraverm, I don't want to close the issue because it's interesting what you describe there.
As I understand it you want to mark parts of the markdown with something recognizable like this:
- {{template:jira, id:JIRA-1234}}
- Other Line
- Another
And use all the bullets hanging from that node to be processed by some program.
I don't see it as a bad idea. Do you usually describe things using bullets (like logseq)?
I'm asking, because I'm searching for ways to describe semi-structured data in markdown in a non-invasive way, for other use-cases
Do you usually describe things using bullets (like logseq)?
I overview my work with bullets and have independed notes for a more detailed work.
For example:
## My Notebook
- [ ] #dev Jira integration with Obsidian
- Extend snippets plugin
- [[22/04/2022]] I got a reply from Cristian...
- [[this awesome idea]]
- [ ] #write need to find more information about X
In this example, I would have another note "this awesome idea" where I would write something that is more like a blog post.
Currently I'm using Obsidian tasks plugin to find what I should/can be working on. Directories and notes help me seperate different topics. But Obsidian doesn't enforce me to keep one part in bullets or in a "free form", so often I have tasks that are inside the free form notes.
The snippets plugin reminded me a little bit of Jupyter notebook, so I thought it would be nice to do the same thing but for daily work, like my use case with Jira. I think this could have other cases of integration, for example if you wish to maintain a document with a public version, so you can mark what sections (blocks) in the document are private and how to treat the public version. In my work I use Confluence pages, and markdown integration is a pain, I want to push parts of the document and update them. However Confluence has a different format for pages and making this entire process work with some special plugin doesn't worth my time.