phildenhoff / logseq-raindrop

A Raindrop plugin for Logseq
MIT License
62 stars 5 forks source link

Use raindrop collection names in nested page structure #82

Open cjfagerstrom opened 10 months ago

cjfagerstrom commented 10 months ago

Many of my Raindrops are grouped in collections. If I'm importing a number of bookmarks, it would be very helpful to keep them grouped in pages based on the collection name instead of having them solely grouped under a page such as logseq-raindrop. Ex: Raindrop/Construction/Electrical Code vs Raindrop/Construction/Framing Tips or Raindrop/Firearms/Wishlist vs Raindrop/Firearms/Optics. This helps keep things more organized as it matches an existing convention in Raindrop with how our bookmarks are stored and our mind's expectation of how to find the information. Currently, all framing/electrical/firearms wishlist/optics are grouped together and it takes some effort to sort through the stuff.

phildenhoff commented 10 months ago

Hi @cjfagerstrom, are you talking about in Single-page import mode or multi-page import?

In Multi-page mode, this could make sense. But in single-page mode (you're saying they're all grouped together?) we can't really group imports.

cjfagerstrom commented 10 months ago

In multi-page import. Even if it structured the collections the way the single-page import does. The "Articles" heading could be replaced with the collection name and then each block would be an article. Obviously, multiple nested collection levels becomes an issue.

For single-page import the collection name could be an h2 with the blocks for each raindrop under h2.

phildenhoff commented 10 months ago

Can you lay out your ideal page hierarchy & page structure? That would help me understand a lot better. For example, something like

hierarchy:

Raindrop /

And the page:

page title: Raindrop/Technology Radar

properties:

(note, if you didn't already know this, when you have a hierarchy, each step in the hierarchy shows up in the page title. So if you have Raindrop > Useful Sites > Technology Radar, the page title is "Raindrop/Useful Sites/Technology Radar"

cjfagerstrom commented 10 months ago

I will review this evening and draft something to better communicate my vision.

pwillia7 commented 5 months ago

I have this same request -- My main generic bookmarks are not in a Raindrop collection (unsorted) and import into a Logseq page called "Bookmarks"

I now want to setup a new raindrop collection called 3d prints and have these import into a new page. Currently they import into the same Bookmarks page with Logseq and there is no variable/data for the collection to query on.

Ideally, I'd be able to map collections to specific pages in the plugin options. This would let me keep separate groups of bookmarks in a single Raindrop account.

Thanks

pwillia7 commented 5 months ago

Another maybe easier idea is to just have a boolean that creates separate logseq pages for separate collections if enabled in single page mode.

phildenhoff commented 5 months ago

Hi @pwillia7 — I’ll have to think about that. The syncing logic isn’t really prepared to split by collection, but it’s certainly possible.

I’m pretty busy these days so I’m not sure how quickly I’ll get around to it. As always, I appreciate pull requests if anyone is interested in tackling this work!

pwillia7 commented 5 months ago

Ok Cool I'll look into it this weekend maybe

flegfleg commented 5 months ago

Hi, what's the template tag for collections? Could not find it in the documentation

cjfagerstrom commented 5 months ago

(note, if you didn't already know this, when you have a hierarchy, each step in the hierarchy shows up in the page title. So if you have Raindrop > Useful Sites > Technology Radar, the page title is "Raindrop/Useful Sites/Technology Radar"

I think this is close to what I'm looking for. One thing I figured out was if the Raindrop has a slash in it, the resulting logseq page is broken into two pages. If you want to experience it first hand, add https://www.reddit.com/r/bose/comments/ucdg83/my_qc45_wont_power_on/ a raindrop and sync it to logseq. It breaks it into Raindrop/My QC45 won't power on r:/ and bose.

Once I sorted that out, I realized the hierarchy on the bottom of the page in multipage import will break my pages up. The remaining issue I was referring to was to inject the collection name(s) in that hierarchy. Instead of Raindrop / My QC45 won't power on it would be Raindrop / Tips & Tricks / My QC45 won't power on. The My QC45 won't power on would be on the page Tips & Tricks along with any other Raindrops in that Tips & Tricks Raindrop collection.

I think this could be accomplished by adding a mustache template for the collection(s). Maybe there is {{collection}} and {{collections}}. Singular would group everything under the top level collection, ignoring nested collections. The plural would nest the Raindrop under a page with the name of each subsequent level of collections/folders.