Skip to content

Extended integration #17

Open
Open
@abraverm

Description

@abraverm

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:

  1. I would define that a ticket format as - [ ] {{template:jira, id:JIRA-1234}}.
  2. 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.
  3. The result will be in this case:
- [ ] {{template:jira, id:JIRA-1234}} <TICKET NAME>
  - Description: ...
  - Comments:
    - ...
    - ...
  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions