✨ (linguoland): 加上月读书源入口
插件描述和元信息走月读的书源契约,设置页按需加载。
This commit is contained in:
1 parent
55e6303d0a
commit
8ff04cee9b
5 files changed
+52
No files matched your search
@@ -0,0 +1,5 @@
|
||||
local _ = require("gettext")
|
||||
return {
|
||||
fullname = _("月读书源:LinguoLand"),
|
||||
description = _("给月读增加「LinguoLand」书源。需要同时安装月读,与 LinguoLand 官方无关。"),
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
--[[--
|
||||
KOReader 只认带 main.lua 的插件目录;书源本身不需要任何插件钩子,月读读取旁边的 moon_source.lua。
|
||||
--]]
|
||||
local WidgetContainer = require("ui/widget/container/widgetcontainer")
|
||||
|
||||
return WidgetContainer:extend{
|
||||
name = "moonsource_linguoland",
|
||||
is_doc_only = false,
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
--[[--
|
||||
月读第三方书源描述:LinguoLand。契约见月读 examples/moonsource-demo.koplugin/moon_source.lua。
|
||||
--]]
|
||||
|
||||
local function lazy(module)
|
||||
return setmetatable({}, { __index = function(_, key) return require(module)[key] end })
|
||||
end
|
||||
|
||||
return {
|
||||
api = 1,
|
||||
provides = {
|
||||
source = true,
|
||||
},
|
||||
meta = function() return require("moonsource_linguoland.source").meta() end,
|
||||
new = function() return require("moonsource_linguoland.source").new() end,
|
||||
setting = lazy("moonsource_linguoland.setting"),
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--[[--
|
||||
LinguoLand 书源元信息。
|
||||
|
||||
@module moonsource_linguoland._meta
|
||||
--]]
|
||||
|
||||
local _ = require("l10n").get("moonsource_linguoland")
|
||||
|
||||
return {
|
||||
id = "linguoland",
|
||||
name = _("LinguoLand"),
|
||||
type = "book",
|
||||
description = _("LinguoLand 英文原版阅读"),
|
||||
abilities = {
|
||||
_("邮箱密码登录"), _("邮箱验证码登录"), _("手机验证码登录"), _("浏览器登录"),
|
||||
_("书架同步"), _("书城浏览"), _("进度拉取"), _("进度上传"),
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return function()
|
||||
return require("moonsource_linguoland._meta")
|
||||
end
|
||||
Reference in new issue
Block a user