Hi all,
Thanks for the support of the project.
I work in a company where we use Trac to manage our knowledge system. We started integrating Trac within our system to mention tickets in mattermost and planning to integrate it more. I have made some plugins in Trac to help us navigate it easier (more details below).
Instead of adding those plugins to our version of Trac, I suggest contributing to the original project if the maintainers will agree. I did contribute in Trac before with a
small bug I found.
One of the plugins I have made for the company's Trac is for "automatic backlink updates when renaming wiki pages".
## How It Works
```
User clicks "Rename page" on a wiki page
│
▼
┌─────────────────────────────────────────────┐
│ plugin.py (controller) │
│ Intercepts requests where action=rename │
│ and the handler is WikiModule │
└──────────────────┬──────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Render wiki_backlink_rename.html │
│ • Input: new page name │
│ • Option: create redirect on old name │
│ • Button: "Preview backlinks" │
└──────────────────┬──────────────────────────┘
│ POST preview_backlinks
▼
┌─────────────────────────────────────────────┐
│ service.plan_rename(env, old_name, new_name)│
│ • Uses repositories for wiki/ticket lookup │
│ • Rewrites links using rewriter module │
│ • Produces typed RenamePlan │
└──────────────────┬──────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ preview.build_preview(plan) │
│ • Converts RenamePlan to template data │
│ • Builds snippets for the preview UI │
└──────────────────┬──────────────────────────┘
│ POST confirm_backlink_updates
▼
┌─────────────────────────────────────────────┐
│ service.apply_rename(...) │
│ 1. Revalidates the preview manifest │
│ 2. Renames the wiki page │
│ 3. Creates redirect page (optional) │
│ 4. Updates wiki pages and tickets │
│ 5. Returns outcome for notices/warnings │
└─────────────────────────────────────────────┘
```
Ahmed Mahfouz