step 10: plugins system (Lua + templates) + DokuWiki as optional plugin
Plugin Manager: - Discover plugins from .verstak/plugins/<name>/plugin.json - Enable/disable per plugin - Template definitions (JSON) → pre-filled node trees - SQL migrations from plugins - Built-in templates loaded from internal/core/plugins/builtin/templates/ Lua Runtime: - Stub (gopher-lua placeholder) — ready for real implementation - When dep added: hooks (on_init, on_vault_open, on_node_create), sandbox (no io/os.execute), Plugin API GUI: - Template selector in create node modal - POST /api/nodes/from-template creates tree from template - Built-in "Клиент" template: Overview note + Документы/Переписка/Скриншоты CLI: - verstak plugin list/enable/disable/templates DokuWiki Importer: - Moved to contrib/plugins/importer-dokuwiki/ (optional plugin) - plugin.json + migration + README DokuWiki removed from MVP core — now an opt-in plugin. Acceptance: go build ./... pass, go test ./... pass (all packages).
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# DokuWiki Importer
|
||||
|
||||
Import your DokuWiki pages and namespaces into Verstak.
|
||||
|
||||
Place this directory in `.verstak/plugins/importer-dokuwiki/` inside your vault,
|
||||
then run `verstak plugin enable importer-dokuwiki`.
|
||||
|
||||
## Usage
|
||||
|
||||
verstak import-dokuwiki --pages /path/to/data/pages --media /path/to/data/media
|
||||
|
||||
## What it does
|
||||
|
||||
- namespaces → nodes tree
|
||||
- pages → md notes inside the tree
|
||||
- originals saved in `.verstak/originals/dokuwiki/`
|
||||
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE IF NOT EXISTS dokuwiki_originals (
|
||||
id TEXT PRIMARY KEY,
|
||||
node_id TEXT NOT NULL REFERENCES nodes(id),
|
||||
source_path TEXT NULL,
|
||||
source_type TEXT NOT NULL,
|
||||
imported_at TEXT NOT NULL
|
||||
);
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "importer-dokuwiki",
|
||||
"version": "0.1.0",
|
||||
"description": "Import pages and media from DokuWiki into Verstak",
|
||||
"author": "Verstak contributors",
|
||||
"hooks": {
|
||||
"on_init": "on_init"
|
||||
},
|
||||
"node_types": ["dokuwiki_page", "dokuwiki_ns"],
|
||||
"migrations": ["001_create_originals.sql"]
|
||||
}
|
||||
Reference in New Issue
Block a user