Skip to content
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

Extended integration #17

Open
abraverm opened this issue Apr 20, 2022 · 4 comments
Open

Extended integration #17

abraverm opened this issue Apr 20, 2022 · 4 comments

Comments

@abraverm
Copy link

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?

@cristianvasquez
Copy link
Owner

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.

@abraverm
Copy link
Author

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.

@cristianvasquez
Copy link
Owner

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

@abraverm
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants