weichenw / obsidian-hypothesis-plugin

An Obsidian.md plugin that syncs highlights from Hypothesis.
MIT License
235 stars 20 forks source link

Support grouping files by URL domain #36

Closed phgn0 closed 2 years ago

phgn0 commented 2 years ago

Add the ability to group generated files into folders based on the URL domain of the annotated article, if enabled via the plugin settings.

I find that some file structure helps it to feel manageable with 200+ annotated articles. Even if most folders only contain one article file. It's disabled by default because it'll not work with existing synced files.

I'm not sure how many additional uses cases there are to justify adding a fully customizable path based on a template.

phgn0 commented 2 years ago

Looking at https://github.com/weichenw/obsidian-hypothesis-plugin/issues/22 and https://github.com/weichenw/obsidian-hypothesis-plugin/issues/26, there does seem to be a use case for other folder names, at least for using the group name. Maybe a customizable file path is worth it after all then...

This work should be largely independent of recognizing files based on their frontmatter -- the frontmatter will only make this customization with without resetting the sync state.

phgn0 commented 2 years ago

This needs to be rebased if https://github.com/weichenw/obsidian-hypothesis-plugin/pull/39 merges, but should apply similarly.