dat-ecosystem-archive / datBase

Open data sharing powered by Dat [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
http://datbase.org
244 stars 32 forks source link

Unpublish a duplicate dat #637

Open CristianCantoro opened 5 years ago

CristianCantoro commented 5 years ago

I have done a dat publish two times on the same dat with different titles and I have got this:

I would like to eliminate one of them.

joehand commented 5 years ago

(Not tested but...) can you run dat unpublish --name pagecounts-ez ?

joehand commented 5 years ago

Oh nope, that won't work. If you cd data-dir and then dat unpublish it will unpublish whatever name is in the dat.json file. So you can set it to the one you want to unpublish then run it. If that makes sense... ?

Sorry, this should be more straightforward!

CristianCantoro commented 5 years ago

@joehand said:

Oh nope, that won't work. If you cd data-dir and then dat unpublish it will unpublish whatever name is in the dat.json file. So you can set it to the one you want to unpublish then run it. If that makes sense... ?

Ok, I will try doing that, but I would like to point out that at the moment dat unpublish is undocumented.

This is what I get with dat 13.11.4:

$ dat --help

Usage: dat <cmd> [<dir>] [options]

Sharing Files:
   dat share                   create dat, import files, share to network
   dat create                  create empty dat and dat.json
   dat sync                    import files to existing dat & sync with network

Downloading Files:
   dat clone <link> [<dir>]    download a dat via link to <dir>
   dat pull                    update dat & exit
   dat sync                    live sync files with the network

Info:
   dat log                     log history for a dat
   dat status                  get key & info about a local dat

Dat public registries:
   dat <cmd> [<registry>]      All commands take <registry> option
   dat register                register new account
   dat login                   login to your account
   dat publish                 publish a dat
   dat whoami                  print active login information
   dat logout                  logout from active login

Stateless/Shortcut Commands:
   dat <link> [<dir>]          clone or sync link to <dir>
   dat <dir>                   create and sync dat in directory

Troubleshooting & Help:
   dat doctor                  run the dat network doctor
   dat help                    print this usage guide
   dat <command> --help, -h    print help for a specific command
   dat --version, -v           print the dat version

General Options:
    --dir, -d             set the directory for Dat
    --port                port to use for connections (default port: 3282 or first available)
    --utp                 use utp for discovery (default: true)
    --http                serve dat over http (default port: 8080)
    --sparse              download only requested data (default: false)
    --up                  throttle upload bandwidth (1024, 1kb, 2mb, etc.)
    --down                throttle download bandwidth (1024, 1kb, 2mb, etc.)

Have fun using Dat! Learn more at docs.datproject.org
CristianCantoro commented 5 years ago

I have issues with dat unpublish (it's throwing errors at me), I will investigate and open a separate bug report if needed.

CristianCantoro commented 5 years ago

At the moment I am not able to run dat unpublish (see the bug referenced above)