mirror of
https://github.com/open-webui/oikb.git
synced 2026-07-09 16:00:53 +00:00
fix: align .oikb.yaml key to kb-id (v0.1.3)
This commit is contained in:
parent
2fd9319ca5
commit
3ed5eade84
5 changed files with 14 additions and 8 deletions
|
|
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
|
||||
## [0.1.3] - 2025-05-20
|
||||
|
||||
### Changed
|
||||
|
||||
- Renamed `.oikb.yaml` config key from `kb` to `kb-id` to align with the CLI flag.
|
||||
|
||||
## [0.1.2] - 2025-05-20
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ Define multiple sources in a single config file:
|
|||
```yaml
|
||||
sync:
|
||||
- source: ./docs
|
||||
kb: project-docs
|
||||
kb-id: project-docs
|
||||
- source: github:owner/wiki
|
||||
kb: team-wiki
|
||||
kb-id: team-wiki
|
||||
branch: main
|
||||
- source: confluence:ENG
|
||||
kb: eng-handbook
|
||||
kb-id: eng-handbook
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "oikb"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
description = "Sync anything to Open WebUI Knowledge Bases"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
"""oikb — Open WebUI Knowledge Base CLI."""
|
||||
|
||||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ def _load_oikb_yaml() -> list[dict] | None:
|
|||
@click.option("--path", "source_path", default=None, help="Subdirectory within the source.")
|
||||
@click.option("--dry-run", is_flag=True, help="Preview changes without uploading.")
|
||||
@click.option("-v", "--verbose", is_flag=True, help="Show detailed progress.")
|
||||
@click.option("--name", default=None, help="Target a specific entry in .oikb.yaml by name/kb.")
|
||||
@click.option("--name", default=None, help="Target a specific entry in .oikb.yaml by name/kb-id.")
|
||||
@click.pass_context
|
||||
def sync(
|
||||
ctx: click.Context,
|
||||
|
|
@ -255,7 +255,7 @@ def sync(
|
|||
|
||||
# Filter by --name if specified.
|
||||
if name:
|
||||
entries = [e for e in entries if e.get("kb") == name or e.get("source") == name]
|
||||
entries = [e for e in entries if e.get("kb-id") == name or e.get("source") == name]
|
||||
if not entries:
|
||||
click.echo(click.style(f"No entry matching '{name}' in .oikb.yaml", fg="red"), err=True)
|
||||
sys.exit(1)
|
||||
|
|
@ -263,7 +263,7 @@ def sync(
|
|||
has_errors = False
|
||||
for entry in entries:
|
||||
entry_source = entry.get("source")
|
||||
entry_kb = entry.get("kb")
|
||||
entry_kb = entry.get("kb-id")
|
||||
entry_branch = entry.get("branch")
|
||||
entry_path = entry.get("path")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue