jsonMartin / readwise-mirror

MIT License
52 stars 11 forks source link

feat: ✨ implement additional tag functionality #19

Closed johannrichard closed 1 year ago

johannrichard commented 1 year ago

I've implemented a few small changes that add two new features related to tags:

With the two new fields, one can for example put all document tags or all tags from highlights into frontmatter as a tags array and can reduce clutter in notes as tags are preserved within a note.

Either set of tags is deduplicated (but only within the respective set, that is, document tags or highlight tags). If a tag is present in both tag sets, and both are added to frontmatter, the tag will be duplicate.

Currently, I've created new metadata fields for this, as I think recreating the functionality in nunjucks is more complicated.

jsonMartin commented 1 year ago

Hi @johannrichard , apologizes for the long delay in reviewing your additions. I have went ahead and approved the other two PRs.

This PR also looks good, you seem to have done your in depth research into Frontmatter so I'll go ahead and trust your opinion on this one.

However, after merging in the other two, there's now a conflict with this one. Can you please resolve the conflict in main.ts so I can merge it in for the next update?

Thanks again for all your hard work on this 🙏🏼

johannrichard commented 1 year ago

Hi @jsonMartin no problem here. It's a stepwise approach. I have resolved the merge conflict and seized the opportunity to include a small fix for tags that use "@" (which is valid in Readwise but breaks frontmatter in Obsidian unless put in quotes).