Plugin Source Data
Plugin Source Data
PluginManifest
Each plugin must define PluginManifest and mount it to PLUGIN.manifest,用于描述插件的静态信息。
Tip
推荐以插件 identifier 作为文件名,例如 sample.py 对应 identifier="sample"。
from app.plugins import PluginManifest, PluginKind
manifest = PluginManifest(
identifier="sample",
name="Sample Plugin",
version="0.1.0",
description="Demonstrates how to integrate Little Tree Wallpaper Next plugin API",
author="Your Name",
homepage="https://example.com",
permissions=("resource_data",), # Optional, declare when needing to access protected data
dependencies=("core>=1.0.0",), # Optional, supports simple version comparison operators
kind=PluginKind.FEATURE, # Optional, can be declared as PluginKind.LIBRARY
)Field descriptions:
| Field | Description |
|---|---|
identifier | Plugin unique identifier (用于存储目录、日志等),建议使用小写字母和下划线 |
name | Plugin display name |
version | Plugin version number,采用语义化版本 |
description | Optional, plugin brief description |
author | Optional, author information |
homepage | Optional, homepage or documentation link |
permissions | Optional, list permission identifiers that need to be granted before plugin startup |
dependencies | Optional, list identifiers of other plugins depended upon,可使用 core>=1.0.0、helper==0.2 这样的语法描述版本要求 |
kind | Optional, plugin type, default PluginKind.FEATURE,当插件仅提供 API/库能力时可设为 PluginKind.LIBRARY |
访问 manifest.short_label() 可获得 name + version 的组合字符串。