rien7 / obsidian-colorful-tag

Make your tag more beautiful and powerful!
Apache License 2.0
126 stars 3 forks source link

Any way to access the Tag Detail via javascript #37

Open MMoMM-org opened 1 year ago

MMoMM-org commented 1 year ago

Hi, I would like to use javascript to access the tag detail of tags.

Any idea on how to do that?

rien7 commented 1 year ago

in #40 , the tag detail store data in frontmatter

MMoMM-org commented 1 year ago

hi, in which frontmatter are the details stored?

rien7 commented 1 year ago

you can select "frontmatter" in "General Setting", and the data will save in the file frontmatter where the tag in

MMoMM-org commented 1 year ago

hi, thanks. I did notice it now. I can't use that approach unfortunately as it clutters the frontmatter too much.

Plus it looks like there might be an issue (or have been reading other reported issues here) that it will also make changes to the existing yaml... one of my date containing yaml fields was formatted as "string" value, which changed the date from 2022-12-18 to 129324263242 (at least similar).

An API or perhaps a specific note which contains all the tag information would probably be a better approach.

rien7 commented 1 year ago

Plus it looks like there might be an issue (or have been reading other reported issues here) that it will also make changes to the existing yaml... one of my date containing yaml fields was formatted as "string" value, which changed the date from 2022-12-18 to 129324263242 (at least similar).

i will try to fix this next version.

An API or perhaps a specific note which contains all the tag information would probably be a better approach.

If you choose "save data in plugin", the data will be saved in "${VALUE_ROOT}/.obsidian/plugins/obsidian-colorful-tag/data.json". But i can not find a good way to expose these to user. Maybe it will be a query way just like "dataview" or anything else in the future.

If you have any idea, please let me know.