From 75a2cc7acb5a2a83dae172003b13729baf2e2756 Mon Sep 17 00:00:00 2001 From: Karl Semich <0xloem@gmail.com> Date: Sat, 27 Aug 2016 06:20:06 -0400 Subject: added pyFreenet as a submodule --- backend/TODO | 23 ++++++ .../freesitemgr/Standing With Resilience Public | 82 +++++++++++----------- backend/dep/pyFreenet | 1 + backend/resilient/__init__.py | 4 ++ backend/resilient/freenet.py | 12 ++-- 5 files changed, 77 insertions(+), 45 deletions(-) create mode 100644 backend/TODO create mode 160000 backend/dep/pyFreenet (limited to 'backend') diff --git a/backend/TODO b/backend/TODO new file mode 100644 index 0000000..c1cb11c --- /dev/null +++ b/backend/TODO @@ -0,0 +1,23 @@ +[x] set up ikistrap loading locally +[ ] sync swr with freenet, zeronet, and ipfs +[ ] put swr on gitlab per pages-ikiwiki +get automatically if not present: (submodule or gpg) +[ ] DO ONE: + [ ] ikiwiki + [ ] ipfs + [ ] freenet + [x] pyfreenet + [ ] automatically configure open FCP port 9481 + [ ] infocalypse + [ ] gitocalypse + [ ] zeronet + +integrate with git-annex +[ ] DO TWO: + [ ] git annex init the thing + [ ] use update.py to manage git-annex + [ ] add gitlake as a dep, store large things on freenet and ipfs + [ ] fix reinsertion in gitlake + [ ] add zeronet to gitlake? + +[ ] pin private to bitcoin/namecoin ... this is also a good place for ipns diff --git a/backend/auth/freesitemgr/Standing With Resilience Public b/backend/auth/freesitemgr/Standing With Resilience Public index bd065c5..923c075 100644 --- a/backend/auth/freesitemgr/Standing With Resilience Public +++ b/backend/auth/freesitemgr/Standing With Resilience Public @@ -111,7 +111,7 @@ files = [ "uri": "", "sizebytes": 2528, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/Freenet/index.html", + "path": "../html/Freenet/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|Freenet/index.html", "target": "manifest" @@ -123,7 +123,7 @@ files = [ "uri": "", "sizebytes": 6115, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/Shielding/index.html", + "path": "../html/Shielding/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|Shielding/index.html", "target": "manifest" @@ -135,7 +135,7 @@ files = [ "uri": "", "sizebytes": 2142, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/TODO/index.html", + "path": "../html/TODO/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|TODO/index.html", "target": "manifest" @@ -147,7 +147,7 @@ files = [ "uri": "", "sizebytes": 1351, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/Tech_Savvy/index.html", + "path": "../html/Tech_Savvy/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|Tech_Savvy/index.html", "target": "manifest" @@ -159,7 +159,7 @@ files = [ "uri": "", "sizebytes": 1301, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/Technical_Resources/index.html", + "path": "../html/Technical_Resources/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|Technical_Resources/index.html", "target": "manifest" @@ -182,7 +182,7 @@ files = [ "uri": "", "sizebytes": 371, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/favicon.ico", + "path": "../html/favicon.ico", "dda": true, "id": "freesitemgr|Standing With Resilience Public|favicon.ico", "target": "manifest" @@ -194,7 +194,7 @@ files = [ "uri": "", "sizebytes": 3290, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/directive/index.html", + "path": "../html/ikiwiki/directive/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/directive/index.html", "target": "manifest" @@ -206,7 +206,7 @@ files = [ "uri": "", "sizebytes": 3539, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/formatting/index.html", + "path": "../html/ikiwiki/formatting/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/formatting/index.html", "target": "manifest" @@ -218,7 +218,7 @@ files = [ "uri": "", "sizebytes": 1707, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/index.html", + "path": "../html/ikiwiki/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/index.html", "target": "manifest" @@ -230,7 +230,7 @@ files = [ "uri": "", "sizebytes": 101525, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/jquery.min.js", + "path": "../html/ikiwiki/jquery.min.js", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/jquery.min.js", "target": "manifest" @@ -242,7 +242,7 @@ files = [ "uri": "", "sizebytes": 1841, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/markdown/index.html", + "path": "../html/ikiwiki/markdown/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/markdown/index.html", "target": "manifest" @@ -254,7 +254,7 @@ files = [ "uri": "", "sizebytes": 460, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/aol.png", + "path": "../html/ikiwiki/openid/aol.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/aol.png", "target": "manifest" @@ -266,7 +266,7 @@ files = [ "uri": "", "sizebytes": 592, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/goa-account-flickr.png", + "path": "../html/ikiwiki/openid/goa-account-flickr.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/goa-account-flickr.png", "target": "manifest" @@ -278,7 +278,7 @@ files = [ "uri": "", "sizebytes": 825, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/goa-account-google.png", + "path": "../html/ikiwiki/openid/goa-account-google.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/goa-account-google.png", "target": "manifest" @@ -290,7 +290,7 @@ files = [ "uri": "", "sizebytes": 741, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/goa-account-yahoo.png", + "path": "../html/ikiwiki/openid/goa-account-yahoo.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/goa-account-yahoo.png", "target": "manifest" @@ -302,7 +302,7 @@ files = [ "uri": "", "sizebytes": 2123, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/index.html", + "path": "../html/ikiwiki/openid/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/index.html", "target": "manifest" @@ -314,7 +314,7 @@ files = [ "uri": "", "sizebytes": 772, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/livejournal.png", + "path": "../html/ikiwiki/openid/livejournal.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/livejournal.png", "target": "manifest" @@ -326,7 +326,7 @@ files = [ "uri": "", "sizebytes": 7042, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/openid-jquery.js", + "path": "../html/ikiwiki/openid/openid-jquery.js", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/openid-jquery.js", "target": "manifest" @@ -338,7 +338,7 @@ files = [ "uri": "", "sizebytes": 714, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/verisign.png", + "path": "../html/ikiwiki/openid/verisign.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/verisign.png", "target": "manifest" @@ -350,7 +350,7 @@ files = [ "uri": "", "sizebytes": 886, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/openid/wordpress.png", + "path": "../html/ikiwiki/openid/wordpress.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/openid/wordpress.png", "target": "manifest" @@ -362,7 +362,7 @@ files = [ "uri": "", "sizebytes": 2917, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/pagespec/attachment/index.html", + "path": "../html/ikiwiki/pagespec/attachment/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/pagespec/attachment/index.html", "target": "manifest" @@ -374,7 +374,7 @@ files = [ "uri": "", "sizebytes": 6079, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/pagespec/index.html", + "path": "../html/ikiwiki/pagespec/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/pagespec/index.html", "target": "manifest" @@ -386,7 +386,7 @@ files = [ "uri": "", "sizebytes": 2156, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/pagespec/po/index.html", + "path": "../html/ikiwiki/pagespec/po/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/pagespec/po/index.html", "target": "manifest" @@ -398,7 +398,7 @@ files = [ "uri": "", "sizebytes": 2303, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/pagespec/sorting/index.html", + "path": "../html/ikiwiki/pagespec/sorting/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/pagespec/sorting/index.html", "target": "manifest" @@ -410,7 +410,7 @@ files = [ "uri": "", "sizebytes": 2095, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/searching/index.html", + "path": "../html/ikiwiki/searching/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/searching/index.html", "target": "manifest" @@ -422,7 +422,7 @@ files = [ "uri": "", "sizebytes": 2018, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/subpage/index.html", + "path": "../html/ikiwiki/subpage/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/subpage/index.html", "target": "manifest" @@ -434,7 +434,7 @@ files = [ "uri": "", "sizebytes": 3110, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/subpage/linkingrules/index.html", + "path": "../html/ikiwiki/subpage/linkingrules/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/subpage/linkingrules/index.html", "target": "manifest" @@ -446,7 +446,7 @@ files = [ "uri": "", "sizebytes": 2779, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/ikiwiki/wikilink/index.html", + "path": "../html/ikiwiki/wikilink/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|ikiwiki/wikilink/index.html", "target": "manifest" @@ -458,7 +458,7 @@ files = [ "uri": "CHK@Df82KVE2jZFntgB~bLWgSpZPqvbf1cyYZyHqWlwWryY,mJshNq8d-2L6J9yG0P3bJgU~6vBVeoxg-bZLbk1v~tU,AAMC--8/index.html", "sizebytes": 1893, "state": "changed", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/index.html", + "path": "../html/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|index.html", "target": "manifest" @@ -470,7 +470,7 @@ files = [ "uri": "", "sizebytes": 95, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/local.css", + "path": "../html/local.css", "dda": true, "id": "freesitemgr|Standing With Resilience Public|local.css", "target": "manifest" @@ -482,7 +482,7 @@ files = [ "uri": "", "sizebytes": 1132, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/recentchanges/index.html", + "path": "../html/recentchanges/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|recentchanges/index.html", "target": "manifest" @@ -494,7 +494,7 @@ files = [ "uri": "", "sizebytes": 1788, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/sandbox/index.html", + "path": "../html/sandbox/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|sandbox/index.html", "target": "manifest" @@ -506,7 +506,7 @@ files = [ "uri": "", "sizebytes": 7337, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/shortcuts/index.html", + "path": "../html/shortcuts/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|shortcuts/index.html", "target": "manifest" @@ -518,7 +518,7 @@ files = [ "uri": "", "sizebytes": 9716, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/style.css", + "path": "../html/style.css", "dda": true, "id": "freesitemgr|Standing With Resilience Public|style.css", "target": "manifest" @@ -530,7 +530,7 @@ files = [ "uri": "", "sizebytes": 5581, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/templates/index.html", + "path": "../html/templates/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|templates/index.html", "target": "manifest" @@ -542,7 +542,7 @@ files = [ "uri": "", "sizebytes": 1342, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/templates/note/index.html", + "path": "../html/templates/note/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|templates/note/index.html", "target": "manifest" @@ -554,7 +554,7 @@ files = [ "uri": "", "sizebytes": 1727, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/templates/popup/index.html", + "path": "../html/templates/popup/index.html", "dda": true, "id": "freesitemgr|Standing With Resilience Public|templates/popup/index.html", "target": "manifest" @@ -566,7 +566,7 @@ files = [ "uri": "", "sizebytes": 219, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/wikiicons/diff.png", + "path": "../html/wikiicons/diff.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|wikiicons/diff.png", "target": "manifest" @@ -578,7 +578,7 @@ files = [ "uri": "", "sizebytes": 336, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/wikiicons/openidlogin-bg.gif", + "path": "../html/wikiicons/openidlogin-bg.gif", "dda": true, "id": "freesitemgr|Standing With Resilience Public|wikiicons/openidlogin-bg.gif", "target": "manifest" @@ -590,7 +590,7 @@ files = [ "uri": "", "sizebytes": 397, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/wikiicons/revert.png", + "path": "../html/wikiicons/revert.png", "dda": true, "id": "freesitemgr|Standing With Resilience Public|wikiicons/revert.png", "target": "manifest" @@ -602,7 +602,7 @@ files = [ "uri": "", "sizebytes": 74, "state": "idle", - "path": "/home/gentoo/src/standingwithresilience.branchable.com/html/wikiicons/search-bg.gif", + "path": "../html/wikiicons/search-bg.gif", "dda": true, "id": "freesitemgr|Standing With Resilience Public|wikiicons/search-bg.gif", "target": "manifest" diff --git a/backend/dep/pyFreenet b/backend/dep/pyFreenet new file mode 160000 index 0000000..a20a8cc --- /dev/null +++ b/backend/dep/pyFreenet @@ -0,0 +1 @@ +Subproject commit a20a8cc0b92740503b8a16d90049f8b1ba4acd2a diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index 818a6f5..fca9441 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -11,6 +11,7 @@ __all__ = ["freenet"] backend_path = os.path.normpath(os.path.join(os.path.dirname(__file__), '..')) auth_path = os.path.join(backend_path, 'auth') +dep_path = os.path.join(backend_path, 'dep') html_path = os.path.normpath(os.path.join(backend_path, '../html')) wiki_src_path = os.path.normpath(os.path.join(backend_path, '../wiki')) ikiwiki_setup_path = os.path.join(backend_path, 'ikiwiki.setup') @@ -35,6 +36,9 @@ class git: if not found: print("ERROR: git not found") exit(1) + else: + os.system("git submodule init") + os.system("git submodule update") def __init__(self, remote, push_remote = ""): self.remote = remote diff --git a/backend/resilient/freenet.py b/backend/resilient/freenet.py index 92affef..76ee33d 100644 --- a/backend/resilient/freenet.py +++ b/backend/resilient/freenet.py @@ -1,4 +1,4 @@ -from resilient import auth_path, git, ikiwiki, url200 +from resilient import auth_path, dep_path, git, ikiwiki, url200 import os running = url200('http://127.0.0.1:8888/') @@ -11,9 +11,13 @@ class gitocalypse(git): print("WARNING: gitocalypse not found, changes won't be synced with freenet") class freesitemgr(): - found = (os.system("freesitemgr --version") == 0) + binary = "freesitemgr" + found = (os.system("%s --version" % binary) == 0) if not found: - print("WARNING: freesitemgr/pyFreenet not found, public freesite won't be updated") + binary = "%s/pyFreenet/freesitemgr" % dep_path + found = (os.system("%s --version" % binary) == 0) + if not found: + print("WARNING: freesitemgr/pyFreenet not found. freesite won't be updated") def __init__(self): pass @@ -22,5 +26,5 @@ class freesitemgr(): if not ikiwiki.synced or not freesitemgr.found or not running: return False config_path = os.path.join(auth_path, 'freesitemgr') - status = os.system("freesitemgr -c '%s' -v -r 1 update" % config_path) + status = os.system("%s -c '%s' -v -r 1 update" % (freesitemgr.binary, config_path)) return status == 0 -- cgit v1.2.3