# Knowledge base sync (ticketack.com)

Source of truth for selected KB sections lives in `docs/kb/sections/`.
Publish to the Heroic KB article on [ticketack.com](https://ticketack.com/knowledge-base/integration-avec-le-module-wordpress/) via REST.

## Auth

- User: `kb-bot` (Application Password)
- File: `~/kb-bot-application-password` (one line, 6×4 groups; mode `0600`)
- Or env: `KB_BOT_PASSWORD` / `KB_BOT_PASSWORD_FILE`

## Usage

```bash
# Preview (writes /tmp/ht-kb-*.preview.html)
python3 scripts/sync-kb-article.py --section tkt_program --lang fr

# Publish
python3 scripts/sync-kb-article.py --section tkt_program --lang fr --push
```

Section files must wrap content with:

```html
<!-- TKT_KB_SECTION:tkt_program -->
…
<!-- /TKT_KB_SECTION:tkt_program -->
```

On first push, the script can still locate the FR `tkt_program` block by heading
and inject those markers.
