dat-desktop icon indicating copy to clipboard operation
dat-desktop copied to clipboard

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

Open okdistribute opened this issue 7 years ago • 10 comments

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.

okdistribute avatar Feb 17 '17 22:02 okdistribute

How is this implemented in the CLI currently?

juliangruber avatar Mar 17 '17 14:03 juliangruber

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

okdistribute avatar Mar 17 '17 18:03 okdistribute

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

juliangruber avatar Mar 17 '17 18:03 juliangruber

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?

okdistribute avatar Mar 17 '17 19:03 okdistribute

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

juliangruber avatar Mar 17 '17 19:03 juliangruber

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

okdistribute avatar Mar 17 '17 19:03 okdistribute

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

juliangruber avatar May 30 '17 08:05 juliangruber

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 avatar May 30 '17 17:05 joehand

Should work with dat-node 3.4.0!

joehand avatar Jun 19 '17 22:06 joehand

nice

okdistribute avatar Jun 20 '17 00:06 okdistribute