xrforge-v2/src/plugin/pubnix.lua

50 lines
1.4 KiB
Lua

local util = require('util')
app.on('scan_experience', function(exp)
--print_r(exp)
end)
app.on('scan_experience_file', function(exp)
end)
app.on('set', function(k,v)
end)
-- this registers the plugin UI
local plugin = {
name = "PubNIX",
info = '<b class="tag">disabled</b> Turn server into a <a href="https://tildeverse.org/" target="_blank">pubnix</a>: automatically scan userdirectories in /home/* for XR experiences, and add them as 3D portals.',
opts = {
{
key='app.opts.plugin_pubnix_enabled',
title='Add homedirs',
info='Scan for experiences in /home/*',
default = "enabled",
values={enabled="enabled",disabled="disabled"}
},
{
key='app.opts.plugin_pubnix_folder',
title='Require folder',
info='Require specific folder (/home/john/xrforge e.g.)',
default = "./xrforge",
values=''
},
{
key='app.opts.plugin_pubnix_thumbnail',
title='User thumbnail',
info='look for /home/john/xrforge/~john.jpg sidecarfile',
default = "enabled",
values={enabled="enabled",disabled="disabled"}
},
{
key='app.opts.plugin_pubnix_exclude',
title='Exclude pattern',
info='Space-separated, <a href="http://lua-users.org/wiki/PatternsTutorial" target="_blank">lua patterns</a> for directories',
default = "",
placeholder = "admin root",
values=''
},
}
}
return plugin