Skip to content

refactor: per-plugin subdirectory layout#2

Merged
Aybook merged 1 commit into
masterfrom
refactor/per-plugin-layout
May 6, 2026
Merged

refactor: per-plugin subdirectory layout#2
Aybook merged 1 commit into
masterfrom
refactor/per-plugin-layout

Conversation

@Aybook
Copy link
Copy Markdown
Contributor

@Aybook Aybook commented May 6, 2026

Moves each plugin imported in #1 into its own folder under `scripts/`. Internal structure mirrors the hub's `scripts/` tree so a recursive copy of the plugin folder still lands every file at the correct hub-relative path.

Before vs after

Before (PR #1):
```
scripts/
bot_advanced_chat.lua
etc_blackboard.lua
etc_mainecho.lua
...
lang/ <- shared across plugins
data/ <- shared across plugins
etc_blackboard/ <- script-named state dir
etc_wunschbrett/ <- script-named state dir
```

After:
```
scripts/
bot_advanced_chat/
bot_advanced_chat.lua
lang/bot_advanced_chat.lang.{en,de}
data/bot_advanced_chat_{history,members}.tbl
etc_blackboard/
etc_blackboard.lua
lang/etc_blackboard.lang.{en,de}
etc_blackboard/{t_blackboard,t_blackboardnicks}.tbl
...
```

Why

Browsing per-plugin is now one folder per plugin. Removing or updating a single plugin is a single `rm -rf` / `git rm` against one path. Future plugin folders can carry per-plugin docs, tests, or version-history files without polluting the top of the repo.

Operator install

Changes from wholesale `cp -r repo/scripts/* hub/scripts/` to per-plugin:

```sh
cp -r repo/scripts//* /opt/luadch/scripts/
```

The plugin folder's internal structure makes this drop straight into the hub's `scripts/` tree.

What this PR contains

  • 22 file renames (`git mv`, no content edits to any `.lua` / `.lang` / `.tbl` file).
  • README rewritten under "Layout" and "Installing a plugin" to describe the new model.

No script content changed. The hub install behaviour is unchanged: same files at the same hub-side paths after a fresh deploy.

Moves each imported plugin into its own folder under scripts/, with
the folder's internal structure mirroring the hub's scripts/ tree so
a recursive copy of the plugin folder lands every file at the right
path.

Before: flat scripts/ with siblings lang/, data/, plus per-plugin
state dirs (etc_blackboard/, etc_wunschbrett/) at the top.

After: scripts/<plugin>/ holds <plugin>.lua plus its own lang/, data/,
or script-named state subdir.

Operator install changes from "cp -r repo/scripts/* hub/scripts/" to
the per-plugin "cp -r repo/scripts/<plugin>/* hub/scripts/". README
updated.

Pure rename + README update; no script content changed. Hub install
behaviour unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant