HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.31k stars 2.26k forks source link

Seeding mode #737

Open antilibrary opened 7 years ago

antilibrary commented 7 years ago

It would be nice to have a command line parameter to run zeronet.py in a mode that it will just download a zite (provided in the command line) and keep it up to date, nothing else. This would be useful to make the zite files available to other apps. Example: python zeronet.py --seeding-mode zite_hash

Use case:

This would allow us to run zeronet programmatically to keep a given zite downloaded and up to date so that the json files from that zite can be used by a different script.

Antilibrary.bit has a use case of adding books requested by the users. When a user requests a new book that is not in the main zite DB, the book ISBN gets added to the user data.json file in the merger db userdb. There is a docker container that runs the script that adds the new books. This script will scan the userdb folder for new books requested. Currently I need to have a local instance of zeronet running with the userdb zite added to it, and then I will share the files with the docker container. This requires manual intervention because there is no way to start zeronet in such a way that it will auto-download a zite. If there was a way to run zeronet in this seeding mode I could automate the deploy of this script to run 2 containers, one with zeronet in the seeding mode for the userdb and the other with the script. No manual intervention would be necessary.

JazzMaster commented 7 years ago

or straight just upload server....

JazzMaster commented 7 years ago

btw- get in the site list...but thx for the link. chomping-at-the.bit(frustrated?)

antilibrary commented 6 years ago

@HelloZeroNet As a work around for this, is there a way to exit the zeronet process once a given site has been updated? I need to run it as part of a sequence of commands and all I need from zeronet is for one site to be updated and it can exit, so the next commands can use the updated json files for that site.

HelloZeroNet commented 6 years ago

zeronet.py --debug siteDownload anysite should do that

sergei-bondarenko commented 6 years ago

@HelloZeroNet Seems it will download only required files, but not optional. Is there a way to fully download site with all optional files? "autodownloadoptional": true in the data/sites.json appears not suitable either as this feature only download new optional files, am I right?