From 239f8b2db04722a499a006cf743ca841ed62007d Mon Sep 17 00:00:00 2001 From: Joshua Sandlin Date: Tue, 13 Jan 2015 20:43:51 -0500 Subject: [PATCH 1/3] added functionality to save address and private key pair to disk I know I'd forget that information under my own volition, so why not save it to disk? I opted for 'data/mysites.txt' as an easy place to remember, and alerted the user that such an action was taking place. --- src/main.py | 5 +++++ zeronet.py | 0 2 files changed, 5 insertions(+) mode change 100644 => 100755 zeronet.py diff --git a/src/main.py b/src/main.py index 4b3dab92..502be7b7 100644 --- a/src/main.py +++ b/src/main.py @@ -78,6 +78,11 @@ def siteCreate(): os.mkdir("data/%s" % address) open("data/%s/index.html" % address, "w").write("Hello %s!" % address) + #start:dydx + logging.info("Saving address and private ket to data/mysite.txt...") + open("data/mysite.txt", a+).write("address: %s, private key: %s" % (address, privatekey)) + #end:dydx + logging.info("Creating content.json...") site = Site(address) site.signContent(privatekey) diff --git a/zeronet.py b/zeronet.py old mode 100644 new mode 100755 From a83b2c97f143435a9ed87123d87437813aa8d57e Mon Sep 17 00:00:00 2001 From: Josh Sandlin Date: Tue, 13 Jan 2015 21:03:11 -0500 Subject: [PATCH 2/3] Update main.py --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 502be7b7..3e3f567b 100644 --- a/src/main.py +++ b/src/main.py @@ -80,7 +80,7 @@ def siteCreate(): #start:dydx logging.info("Saving address and private ket to data/mysite.txt...") - open("data/mysite.txt", a+).write("address: %s, private key: %s" % (address, privatekey)) + open("data/mysite.txt", "a+").write("address: %s, private key: %s" % (address, privatekey)) #end:dydx logging.info("Creating content.json...") From e05bc8ab9a1182e367e845cb242de8f63764d651 Mon Sep 17 00:00:00 2001 From: Josh Sandlin Date: Tue, 13 Jan 2015 21:08:59 -0500 Subject: [PATCH 3/3] Update main.py --- src/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 3e3f567b..44c87212 100644 --- a/src/main.py +++ b/src/main.py @@ -80,7 +80,7 @@ def siteCreate(): #start:dydx logging.info("Saving address and private ket to data/mysite.txt...") - open("data/mysite.txt", "a+").write("address: %s, private key: %s" % (address, privatekey)) + open("data/mysite.txt", "a+").write("address: %s\n private key: %s\n\n" % (address, privatekey)) #end:dydx logging.info("Creating content.json...")