Files
moonsource-jjwxc/moonsource-jjwxc.koplugin/moon_source.lua
T
GarfieldandCopilot 3305bfb291 ✨ (update): 书源插件加入检查更新与自动更新
每个插件带一份 update.lua 副本(源在 src/_common),所有插件同版本,
一个需要更新则已装的全部一起更新;设置项只由第一个插件登记到「书库 → 更新」。
打包时注入 version.lua 的版本号,README 与测试同步。

Co-authored-by: Copilot <[email protected]>
2026-11-16 19:22:44 +08:00

24 lines
891 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--[[--
月读第三方书源描述:晋江文学城。契约见月读 examples/moonsource-demo.koplugin/moon_source.lua。
--]]
-- 本源的段评可借给本地书(reader.paragraph_lender)
require("utils.extension").add("reader.paragraph_lender", { id = "jjwxc", label = require("moonsource_jjwxc._meta").name })
local function lazy(module)
return setmetatable({}, { __index = function(_, key) return require(module)[key] end })
end
require("moonsource_jjwxc.update").register()
return {
api = 1,
provides = {
source = true,
features = { setting = { entries = function(desktop) return require("moonsource_jjwxc.update").entries(desktop) end } },
},
meta = function() return require("moonsource_jjwxc.source").meta() end,
new = function() return require("moonsource_jjwxc.source").new() end,
setting = lazy("moonsource_jjwxc.setting"),
}