dat-ecosystem-archive / dat-desktop

Peer to peer data syncronization [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
https://dat.foundation
MIT License
648 stars 69 forks source link

accept `datproject.org/username/datname` dat links #241

Open okdistribute opened 7 years ago

okdistribute commented 7 years ago

Like in dat cli, you can do dat clone datproject.org/karissa/mydataset and it'll get the dat link from the registry and start cloning it.

juliangruber commented 7 years ago

How is this implemented in the CLI currently?

okdistribute commented 7 years ago

https://github.com/datproject/dat/blob/master/lib/commands/clone.js#L55

juliangruber commented 7 years ago

@karissa thanks for the link! Where do you think this logic should go? Dat-node? A small helper lib? A dat registry module? Hm :)

okdistribute commented 7 years ago

The idea is that the link itself should return a certain pattern {key:...} I believe, so it doesn't have to be fancy

There is a datproject/dat-registry-client library though maybe there?

juliangruber commented 7 years ago

I'm mostly wondering if wherever you can clone a dat those links should be accepted, and thus resolution should be part of a central library

okdistribute commented 7 years ago

It's hard to know what links are accepted ahead of time without pinging the URL, because you could have anther instance of the registry with a different host, or have a dns record

juliangruber commented 7 years ago

yeah, but I mean if resolving those urls were part of dat-node for example, we would get this feature for free in all tools using dat-node

joehand commented 7 years ago

yeah, but I mean if resolving those urls were part of dat-node for example, we would get this feature for free in all tools using dat-node

+1 I can put this on my list for dat-node. Using https://github.com/joehand/dat-link-resolve in CLI but no reason I can't resolve keys directly in dat-node.

joehand commented 7 years ago

Should work with dat-node 3.4.0!

okdistribute commented 7 years ago

nice