diff --git a/src/.init.lua b/src/.init.lua
index 052a882..381fe39 100644
--- a/src/.init.lua
+++ b/src/.init.lua
@@ -30,6 +30,15 @@ app = require("soakbean") {
addPlugin = function(file)
local p = require(file)
table.insert(app.plugin,p)
+ -- ensure plugin config-defaults
+ foreach( app.plugin, function(name,plugin)
+ foreach( plugin.opts, function(k,opt)
+ local key = opt.key:gsub("app.opts.","")
+ if not app.opts[ key ] then
+ app.opts[ key ] = opt.default
+ end
+ end)
+ end)
return p
end
}
@@ -52,16 +61,6 @@ app.plugin.clouddrive = app.addPlugin('plugin/clouddrive')
app.plugin.webhook = app.addPlugin('plugin/webhook')
app.plugin.markdown = app.addPlugin('plugin/markdown')
--- ensure plugin config-defaults
-foreach( app.plugin, function(name,plugin)
- foreach( plugin.opts, function(k,opt)
- local key = opt.key:gsub("app.opts.","")
- if not app.opts[ key ] then
- app.opts[ key ] = opt.default
- end
- end)
-end)
-
app.runcmd(app) -- run clicmds
print = function(...) Log(kLogInfo, ... or "''") end -- nice redbean logging from now on
diff --git a/src/.lua/util.lua b/src/.lua/util.lua
index 30ce7a5..475296a 100644
--- a/src/.lua/util.lua
+++ b/src/.lua/util.lua
@@ -104,6 +104,14 @@ util.contains = function(tab,k_or_v)
return result
end
+util.execute = function(cmd)
+ local handle = io.popen(cmd)
+ print("running : "..cmd)
+ local result = handle:read("*a")
+ handle:close()
+ return result
+end
+
util.memoize = function(fn, ttl_seconds)
local cached_results = nil
local last_executed = 0
@@ -123,7 +131,7 @@ util.memoize = function(fn, ttl_seconds)
end
util.cmdExist = function(cmd)
- if api.runtime.os == 'unixy' then cmd = cmd .. " 1>/dev/null 2>/dev/null" end
+ cmd = cmd .. " 1>/dev/null 2>/dev/null"
local stdout, retstr, retcode = os.execute(cmd)
return retcode ~= 127
end
diff --git a/src/page/about.html b/src/page/about.html
index e40d7cb..7a0be45 100644
--- a/src/page/about.html
+++ b/src/page/about.html
@@ -91,6 +91,11 @@ div#xrecosystem{
+ What is it
+
+ XRForge is a little VR/AR utility, which projects directories from (remote) filesystems into 3D, allowing users to 'surf' the deep immersive web, of experiences (3d files) and portal-rooms (directories).
+
+
Why people want XRForge
diff --git a/src/page/footer.html b/src/page/footer.html
index 4e25a13..8f8cf67 100644
--- a/src/page/footer.html
+++ b/src/page/footer.html
@@ -13,6 +13,7 @@
XR Hypermedia Federation
+ XR Fragment deeplinking spec
JanusXR Guide
NLNET
|
diff --git a/src/plugin/clouddrive.lua b/src/plugin/clouddrive.lua
index 9f100c1..741a630 100644
--- a/src/plugin/clouddrive.lua
+++ b/src/plugin/clouddrive.lua
@@ -1,4 +1,5 @@
local util = require('util')
+local remotes = {"-- disabled --"}
app.on('scan_experience', function(exp)
--print_r(exp)
@@ -11,46 +12,64 @@ app.on('set', function(k,v)
print("content was updated")
end)
+if util.cmdExist('rclone') then
+ local stdout = util.execute('rclone listremotes 2>&1')
+ print('stdout = ' .. stdout)
+ local lines = util.split(stdout,"\n")
+ foreach( lines, function(k,v)
+ local remote = v:gsub(":$","")
+ remotes[ remote ] = remote
+ end)
+end
+
+
-- this registers the plugin UI
local plugin = {
- name = 'Clouddrive disabled',
+ name = 'Cloud drives disabled',
info = '',
opts = {
{
- key='app.opts.plugin_clouddrive_webdir',
- title='Webdirectory URL',
- info='scan for experiences in open webdirs (apache/lighttpd/nginx/rclone/archive.org/copyparty)',
- default="https://archive.org/download/janusxr-1",
+ key='app.opts.plugin_clouddrive_remote_1',
+ title='Cloud 1',
+ info='rclone remotes show up in the dropdown (if installed)',
+ default="-- disabled --",
+ values=remotes
+ },
+ {
+ key='app.opts.plugin_clouddrive_remote_1_target',
+ title='Cloud 1 URL',
+ info='at which URL should this folder show up?',
+ default=app.opts.plugin_diskscan_dir:sub(2) .. "/cloud1",
values=''
},
{
- key='app.opts.plugin_clouddrive_remotestorage',
- title='Remotestorage URL',
- info='scan for experiences via remotestorage protocol (via 5apps e.g.',
- default="username@5apps.com",
+ key='app.opts.plugin_clouddrive_remote_2',
+ title='Cloud 2',
+ info='rclone remotes show up in the dropdown (if installed)',
+ default="-- disabled --",
+ values=remotes
+ },
+ {
+ key='app.opts.plugin_clouddrive_remote_2_target',
+ title='Cloud 2 URL',
+ info='at which URL should this folder show up?',
+ default=app.opts.plugin_diskscan_dir:sub(2) .. "/cloud2",
values=''
},
{
- key='app.opts.plugin_clouddrive_webdav',
- title='WebDav URL',
- info='scan for experiences in WebDav-drive (NextCloud/copyparty e.g.) via rclone',
- default="",
- values=''
+ key='app.opts.plugin_clouddrive_remote_3',
+ title='Cloud 3',
+ info='rclone remotes show up in the dropdown (if installed)',
+ default="-- disabled --",
+ values=remotes
},
{
- key='app.opts.plugin_clouddrive_dropbox',
- title='Dropbox remote',
- info='scan for experiences in Dropbox via rclone',
- default="",
+ key='app.opts.plugin_clouddrive_remote_3_target',
+ title='Cloud 3 URL',
+ info='at which URL should this folder show up?',
+ default=app.opts.plugin_diskscan_dir:sub(2) .. "/cloud3",
values=''
},
- {
- key='app.opts.plugin_clouddrive_gdrive',
- title='Gdrive remote',
- info='scan for experiences in Google Drive via rclone',
- default="",
- values=''
- }
}
}
diff --git a/src/plugin/manyfold.lua b/src/plugin/manyfold.lua
index afe9a11..1a6db73 100644
--- a/src/plugin/manyfold.lua
+++ b/src/plugin/manyfold.lua
@@ -39,7 +39,7 @@ local plugin = {
},
{
key='app.opts.plugin_manyfold_sync_strategy',
- title='Instance 3 URL',
+ title='Sync strategy',
info="Specify how content from manyfold instances should be fetched",
default="recent",
values={recent='only recent',all_recent='everything + recent', disabled='disabled'}