summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbackend/update.py37
-rw-r--r--wiki/TODO.mdwn8
-rw-r--r--wiki/ZeroNet.mdwn7
-rw-r--r--wiki/index.mdwn2
4 files changed, 52 insertions, 2 deletions
diff --git a/backend/update.py b/backend/update.py
index 8af8fb3..ebf82bf 100755
--- a/backend/update.py
+++ b/backend/update.py
@@ -1,6 +1,10 @@
#!/usr/bin/env python2
import os
+import sys
+
+
+############### Enumerate dependencies
found_git = (os.system("git status --porcelain") == 0)
@@ -11,7 +15,11 @@ if not found_git:
found_ikiwiki = (os.system("ikiwiki --version") == 0)
found_gitocalypse = (os.system("git-remote-freenet") == 256)
found_freesitemgr = (os.system("freesitemgr --version") == 0)
-found_zeronetdir = 'ZERONETDIR' in os.environ
+found_zeronet = 'ZERONETDIR' in os.environ
+if found_zeronet:
+ zn_datadir = os.path.join(os.environ['ZERONETDIR'], 'ZeroNet/data')
+ zn_script = os.path.join(os.environ['ZERONETDIR'], 'ZeroNet.sh')
+ found_zeronet = (os.system("'%s' --version" % zn_script) == 0)
if not found_ikiwiki:
print("WARNING: ikiwiki not found, pages will not be built")
@@ -19,10 +27,15 @@ if not found_gitocalypse:
print("WARNING: gitocalypse not found, changes won't be synced with freenet")
if not found_freesitemgr:
print("WARNING: freesitemgr/pyFreenet not found, public freesite won't be updated")
+if not found_zeronet:
+ print("WARNING: ZeroNet not found in ZERONETDIR, public zeronet site won't be updated")
if not (found_ikiwiki or found_gitocalypse or found_freesitemgr):
print("Changes will still be propagated if branchable is working.")
+
+####################### Download from all
+
print(":: Pulling from simple repos ...")
os.environ["GIT_SSH_COMMAND"] = "ssh -F backend/auth/ssh-config"
@@ -41,6 +54,15 @@ if status != 0:
del os.environ["GIT_SSH_COMMAND"]
+
+# Pull from zeronet repos
+print(":: Pulling from zeronet repos ...")
+# public zeronet
+os.system("git pull http://127.0.0.1:43110/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4/.git master")
+# private zeronet
+os.system("git pull http://127.0.0.1:43110/1L363bqJnCG63SnV83kfV7izZXbmentctD/.git master")
+
+
# Pull from freenet repos
if found_gitocalypse:
print(":: Pulling from freenet repos ...")
@@ -50,6 +72,9 @@ if found_gitocalypse:
os.system("git pull freenet://USK@PSY0YngeDtGbj60hjEoilQiY9oKzVrptRC0rG4BEVPg,e6ZEjT4KvbsltPBJOeKNpIdty2oGzbLCdk4fsDA5Vdk,AQACAAE/Standing%20With%20Resilience.git.R1/0 master")
+
+######################### Upload to all
+
print(":: Pushing to simple repos ...")
os.environ["GIT_SSH_COMMAND"] = "ssh -F backend/auth/ssh-config"
@@ -84,6 +109,16 @@ if status != 0:
print (":: Exiting due to failure")
exit(status)
+if found_zeronet:
+ os.system('git update-server-info')
+ print (":: Publishing ZeroNet site ...")
+ zn_datadir = os.path.join(zn_datadir, '1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4')
+ os.system('cp -r ../html/. %s/.' % zn_datadir)
+ os.system('mkdir -p %s/.git' % zn_datadir)
+ for file in ('objects', 'refs', 'HEAD', 'info', 'packed-refs'):
+ os.system('cp -a ../.git/%s %s/.git' % (file, zn_datadir))
+ os.system('%s siteSign 1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4 5JzZACCELsT4bx66qmV9JDaWhEQ6Sx6j7LzeucsxJGA9H7nuoRr' % zn_script)
+
if found_freesitemgr:
print (":: Publishing freesite ...")
status += os.system("freesitemgr -c freesitemgr -v -l freesitemgr.log -r 1 update")
diff --git a/wiki/TODO.mdwn b/wiki/TODO.mdwn
index 7f2407f..7fd724f 100644
--- a/wiki/TODO.mdwn
+++ b/wiki/TODO.mdwn
@@ -2,8 +2,16 @@
[ ] Ensure branchable is pulling from other web mirror as well as pushing
[ ] Make a space for blogging in the wiki
[ ] Upload site to zeronet
+ [x] Upload private site
+ [x] Upload public site
+ [x] Add git syncing to update.py
+ [x] Add public upload to update.py
+ [ ] Add sites to public list, will need to register an id, perhaps via bitmessage
+ [ ] Add page in wiki regarding ZeroNet
[ ] Upload site to qora
[ ] Upload site to ipfs
[ ] Upload site to project maelstrom?
+[ ] Provide .bit domain name for ZeroNet
+[ ] Implement CGI in ZeroNet ??
[x] Link mirrors on index
[x] Upload site to freenet
diff --git a/wiki/ZeroNet.mdwn b/wiki/ZeroNet.mdwn
new file mode 100644
index 0000000..c2e76d3
--- /dev/null
+++ b/wiki/ZeroNet.mdwn
@@ -0,0 +1,7 @@
+<a href="https://zeronet.io">ZeroNet</a> is a network focused around providing a decentralized, uncensorable web using bittorrent.
+
+Once you have ZeroNet installed and running, you can visit <a href="http://127.0.0.1:43110/1L363bqJnCG63SnV83kfV7izZXbmentctD">Standing With Resilience on ZeroNet</a> or <a href="http://127.0.0.1:43110/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4">Standing With Resilience Public</a>.
+
+Viewing the website on ZeroNet helps the site survive if there is ever an issue with your normal access to the internet.
+
+If you are familiar with Git and Linux, the source of this website may be edited on ZeroNet. It may be fetched from either http://127.0.0.1:43110/1GtQ8bkFkhYtKerSdXHKe1z4j9VTmFR5d4/.git or http://127.0.0.1:43110/1L363bqJnCG63SnV83kfV7izZXbmentctD/.git and changes may be pushed with backend/update.py if ZERONETDIR is set to the path to the linux ZeroNet bundle.
diff --git a/wiki/index.mdwn b/wiki/index.mdwn
index 2015e6e..0d10632 100644
--- a/wiki/index.mdwn
+++ b/wiki/index.mdwn
@@ -11,6 +11,6 @@ This is a wiki, which anybody is free to [[edit, copy, or store|Editing]]. Plea
## Where to Find This Site
-These networks can help with isolation: [[Freenet]]
+These networks can help with isolation: [[Freenet]] [[ZeroNet]]
On the normal internet, this site is found at [branchable.com](https://standingwithresilience.branchable.com/) and [fairlystable.org](https://fairlystable.org/standingwithresilience/)