[PR #80] [CLOSED] feat(bookstack): support syncing pages from a specific book #101

Closed
opened 2026-10-18 21:14:21 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/oikb/pull/80
Author: @hexsm
Created: 7/14/2026
Status: ❌ Closed

Base: main ← Head: feature/bookstack-book-ids


📝 Commits (3)

  • 7707808 feat(bookstack): support filtering pages by book ID
  • 8436cd1 test(bookstack): cover book ID source parsing
  • 3dc74af docs: add changelog entry for BookStack book filtering

📊 Changes

6 files changed (+119 additions, -5 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 README.md (+1 -0)
📝 docs/guide.md (+11 -0)
📝 src/oikb/cli.py (+3 -2)
📝 src/oikb/connectors/bookstack.py (+19 -3)
➕ tests/test_bookstack.py (+79 -0)

📄 Description

Summary

Adds optional BookStack page filtering by numeric book ID.

BookStack sources now support:

oikb sync bookstack: --kb-id <kb>     # all visible pages, unchanged behavior
oikb sync bookstack:12 --kb-id <kb>   # pages from BookStack book ID 12

Why

The BookStack connector previously synced all visible pages from the instance. This change allows syncing a specific BookStack book without relying on slugs, which can change over time.

Changes

  • Parse an optional numeric book ID from bookstack: sources.
  • Pass book_id into BookStackConnector.
  • Apply BookStack's filter[book_id] parameter when listing pages.
  • Keep bookstack: behavior unchanged for syncing all visible pages.
  • Reject invalid BookStack source values like bookstack:abc.
  • Document BookStack usage in README.md and docs/guide.md.
  • Add BookStack parser and request tests.

Validation

  • python -m pytest
    • 7 passed
  • python -m compileall -f src/oikb/connectors/bookstack.py src/oikb/cli.py tests/test_bookstack.py
  • Live BookStack check using local credentials:
  • bookstack: listed all visible pages.
  • bookstack:1 listed only pages from book ID 1.
  • Verified the BookStack API filter returns only pages matching the selected book_id.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/oikb/pull/80 **Author:** [@hexsm](https://github.com/hexsm) **Created:** 7/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/bookstack-book-ids` --- ### 📝 Commits (3) - [`7707808`](https://github.com/open-webui/oikb/commit/7707808e50968468a76d0ad661771ae697a7f761) feat(bookstack): support filtering pages by book ID - [`8436cd1`](https://github.com/open-webui/oikb/commit/8436cd1fb581098f5ebda8e43087b127881fcf19) test(bookstack): cover book ID source parsing - [`3dc74af`](https://github.com/open-webui/oikb/commit/3dc74affab7776ba0e06338e224ca2e85375b577) docs: add changelog entry for BookStack book filtering ### 📊 Changes **6 files changed** (+119 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `README.md` (+1 -0) 📝 `docs/guide.md` (+11 -0) 📝 `src/oikb/cli.py` (+3 -2) 📝 `src/oikb/connectors/bookstack.py` (+19 -3) ➕ `tests/test_bookstack.py` (+79 -0) </details> ### 📄 Description ## Summary Adds optional BookStack page filtering by numeric book ID. BookStack sources now support: ```bash oikb sync bookstack: --kb-id <kb> # all visible pages, unchanged behavior oikb sync bookstack:12 --kb-id <kb> # pages from BookStack book ID 12 ``` ## Why The BookStack connector previously synced all visible pages from the instance. This change allows syncing a specific BookStack book without relying on slugs, which can change over time. ## Changes - Parse an optional numeric book ID from `bookstack:` sources. - Pass `book_id` into `BookStackConnector`. - Apply BookStack's `filter[book_id]` parameter when listing pages. - Keep `bookstack:` behavior unchanged for syncing all visible pages. - Reject invalid BookStack source values like `bookstack:abc`. - Document BookStack usage in `README.md` and `docs/guide.md`. - Add BookStack parser and request tests. ## Validation - `python -m pytest` - `7 passed` - `python -m compileall -f src/oikb/connectors/bookstack.py src/oikb/cli.py tests/test_bookstack.py` - Live BookStack check using local credentials: - `bookstack:` listed all visible pages. - `bookstack:1` listed only pages from book ID `1`. - Verified the BookStack API filter returns only pages matching the selected `book_id`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:14:21 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/oikb#101
No description provided.