moremeyou / Obsidian-Tag-Buddy

Unlock powerful tag editing features in Reading Mode. Add, remove and edit tags across your vault. Use tag inboxes to level up any workflow with a powerful idea assembly line.
MIT License
30 stars 0 forks source link

[Feature request] Possibe refinement of tag summary function #12

Open Ravenclawer opened 6 months ago

Ravenclawer commented 6 months ago

When using the below syntax to summarise certainly tags, the images in the insulting view are plain texts instead of rendered images.

include: #tag1 #tag2

image

Currently workaround

Using the flatten summary button to transport all the search results to the current note, and images will be rendered as they are embedded in the current note.

Problems with a current workaround

One of the possible problems with using the flatten function to summarise headings is that may cause multiple versions of certain headings since one tends to edit the summarised results. Such editing cannot synced to the original heading. Another problem is that the flattened results will be displayed in the future tag summary syntax causing clutter and might be confusing.

Possible solution

  1. Make images rendered in the tag summary syntax.
  2. (might be harder but more practical) Making an option to embed the heading of the tag summary results in the current note. (I often add tags to the headings of notes, for tags added at the end of a paragraph, maybe embedding the closest heading above the tags could be a possible solution)
moremeyou commented 6 months ago

Thanks for letting me know about this. Images SHOULD be rendering in the summaries. I'm going to investigate right now D

moremeyou commented 6 months ago

Should be fixed now. It's the same versions number, so you'll need to uninstall and reinstall the plugin.

Ravenclawer commented 6 months ago

Thank you for the fix. The images is rendered now. is it possible for you to implement "Making an option to embed the heading of the tag summary results in the current note. (I often add tags to the headings of notes, for tags added at the end of a paragraph, maybe embedding the closest heading above the tags could be a possible solution)" if you have time?

Ravenclawer commented 6 months ago

Currently, the flatten summary button can copy the summary contents to the current note, but this leaves possible risks of causing duplication in the future summary and version differences between the same content

moremeyou commented 6 months ago

Hey there. I'm curious to get a better understanding of the use case. What do you mean by the heading of the tag summary - something outside the summary code block? For your second point, the plugin will exclude any queried tags in the note where the summary is generated.

Ravenclawer commented 6 months ago

When I read research papers, I often collect all the images of the relevant papers in a single note. Every image has its headings and I can tag the image in its respective heading with the information I'd like to extract from the image. The heading contains a double bracket link to their citekey (Zotero generated) which could help me to identify the source of the image. the following image is an excerpt of such a note. image image image Since tag buddy allows tags at the end of the paragraph, some of my old notes have such paragraphs that have tags at the end. So I mimic the scenario in the above example.

The above note could be considered my knowledge base Let's say one day, my professor finds me and tells me that, I found microalgae could be a good research topic, what do you think, can you tell me what resource you need if you have to carry out related research?

Then I will create a new note and conduct a survey about microalgae. I will have a tag summary query about microalgae first

include: #microalgae

Then it will help me find all the tagged headings and paragraphs image

Now let's say we are particularly interested in rapid curve and want to survey how it could be measured or produced image image If I use ctrl + hover on the link, I can open the note and edit it, but I have to scroll down to find the tagged heading. image If I use the flatten summary button, I can further edit the rapidcurve part but the note will not sync to the original heading, if I query something in a new note like test3, there will be two results with overlapped information, which is confusing when such notes added up. image image

Using Heading embed could edit the content in the hover editor and will not cause duplication in future search image image image

Ravenclawer commented 6 months ago

This method allows incremental reading of research papers, one can query any tagged contents and further edit it without worrying about causing duplication or version differences. For now, one missing component about the method is heading embedding or linking.

moremeyou commented 6 months ago

Wow, super thorough. And I feel you with the need to make it work in just the way you want. It's why I made the plugin, nothing working quite I like I wanted. That said, I think I understand the functionality now. Unfortunately, tagged content is grouped by "blocks." That is, any block of text between empty lines. The 4 lines below are one block.

something #tag

Some heading #anotherTag

Details This and that.

So that empty space knowledge might be the detail you need to make it work how you want. And/or when you CMD click (setup in settings) a tag, there are some global functionalities that might be useful to work with this knowledge. Otherwise, detecting/pulling a heading from one of the summary items is out of scope right now. However, at one point I generated a heading when baking the summary. I've since moved that to when you flatten the summary to a new note. I could bring that kind of thing back as a setting for baking within the note. But check it out, see if it would work for your needs.

Other ideas:

Ravenclawer commented 6 months ago

I see, you mean that Obsidian offers no function to locate headings with tags, and when a tag is found in a note, the whole page will be considered a block, and it's impossible to apply heading embed or heading link in the plugin.

Ravenclawer commented 6 months ago

I reinstall the plugin and haven't see any thing like this image

Ravenclawer commented 6 months ago

Thank you for your time, I will try dataview and see if there is a solution to this

Ravenclawer commented 6 months ago

Could you make this link a link to heading instead of note? image

Ravenclawer commented 6 months ago

The closest query for this that I found could not address the issue, it could only query the headings with fixed name https://share.note.sx/47oiqm8g

moremeyou commented 6 months ago

I assume test_1 is the note link generated for each of the summary items? If so, I think that could be possible. So instead of it simply linking to the top of the source note, it would look for the first heading in the block of that summary item and make an anchor link to that. How does that sound?

About the missing buttons, check setting and switch the visibility options in case the old settings haven't updated. Also, might need to completely uninstall the plugin and reinstall. Only need to do this while I make these minor tweaks with the same version (not best practice, I know :)

I mention testing the buttons because copying a summary item to a section/heading in the current note (or another note) it does anchor link to the heading specified (if it exists).

Ravenclawer commented 6 months ago

Thank you for putting your valuable time into this feature. I completely reinstalled the plugin and found the button was refreshed, but the function changed, and some of them not working properly image

The copy paragraph link function produces a link to the note instead of a link to the paragraph. image

As to the first question. this is exactly what I want :) "I assume test_1 is the note link generated for each of the summary items? If so, I think that could be possible. So instead of it simply linking to the top of the source note, it would look for the first heading in the block of that summary item and make an anchor link to that. How does that sound?"

Ravenclawer commented 6 months ago

Could you make this link a link to heading instead of note? image

[[test1]] in the tag buddy summary code blocks could be [[test1#heading(where tags were found)]]

Ravenclawer commented 6 months ago

The previous example might be too long to demonstrate my use case. here is a more concise one:

# note 1
---
title: test1
contents:
# heading 1
paragraph1 
#tag1 

# #tag2 heading 2
paragraph2

# #tag1 heading 3
paragraph3
---
# note2
---
title: test2
```tag-summary 
include: #tag1

The query result could be

[[test1#heading 1]] <tag buddy block for the content of test 1#heading1> [[test1#tag1 heading 3]] <tag buddy block for the content of test1#tag1 heading 3> (note: the # mark will be ignored by the obsidian heading link) OR ![[test1#heading 1]] ![[test1#tag1 heading 3]] (note: the # mark will be ignored by the obsidian heading link)

Instead of [[test1]] <tag buddy block for the content of test 1#heading1> [[test1]] <tag buddy block for the content of test1#tag1 heading 3>

Ravenclawer commented 6 months ago

test 1.md test 2.md test 3.md

moremeyou commented 6 months ago

For the anchor linking. Should be no problem. I'll put it on the todo list. A lil donation would be appreciated tho :) When TB finds a tagged block, it will look for the first instance of a heading and used that for the link.

completely reinstalled the plugin and found the button was refreshed, but the function changed, and some of them not working properly

I'd need to investigate the file it's trying to copy to. Can you send it, or let me know if there's any special kind of formatting at the end of the file?

Ravenclawer commented 6 months ago

Maybe I misunderstood the button‘s function, I pressed the copy paragraph link button in a new note named untitled 1 and found the resulting link was a link to the note title instead of the paragraph. maybe the formatting of the test1.md caused the malfunction, Which I have already uploaded. image

As for donations, I want to support the development of the plugin. However, I cannot access a visa or any international payment system. I have access to Alipay, which is not supported by the website.

Ravenclawer commented 6 months ago

There are only two options in the 0.6.8 version of the plugin image

Ravenclawer commented 6 months ago

Hi. Although I can't donate for the time being. I promise will write a showcasing article in the community forum to share my workflow and help promote the plugin, a game changer that allows using tags in Obsidian to make a section-level search and collection of information, which I have never seen before (Tag summary only allow paragraph level of query and collection of information)

Ravenclawer commented 6 months ago

Hi. Although I can't donate for the time being. I promise will write a showcasing article in the community forum to share my workflow and help promote the plugin, a game changer that allows using tags in Obsidian to make a section-level search and collection of information, which I have never seen before (Tag summary only allow paragraph level of query and collection of information)

moremeyou commented 5 months ago

That'd be great. Jammed up with work right now. But I'll check back when I get into another sprint :)

On Wed, Apr 10, 2024 at 12:35 PM robert zhang @.***> wrote:

Hi. Although I can't donate for the time being. I promise will write a showcasing article in the community forum to share my workflow and help promote the plugin, a game changer that allows using tags in Obsidian to make a section-level search and collection of information, which I have never seen before (Tag summary only allow paragraph level of query and collection of information)

— Reply to this email directly, view it on GitHub https://github.com/moremeyou/Obsidian-Tag-Buddy/issues/12#issuecomment-2047174063, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEOMHG4MQHLYZT2MAPCSMLY4UIYBAVCNFSM6AAAAABFQDKAP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBXGE3TIMBWGM . You are receiving this because you commented.Message ID: @.***>