Legacy Synergetics Dictionary sync from elib-synergetics-dictionary
Legacy notes for the old Wiki.js deployment, kept for reference after the wiki migration to llm-wiki/.
Source and script
- Source repo:
elib-synergetics-dictionary(e.g.~/Projects/elib-synergetics-dictionary) - Source content:
output/generated/markdown/cards/<letter>/C#####.md(generated in that repo) - Sync script:
scripts/sync_cards_to_buckyverse.exsin the source repo
The script used to push each card to Wiki.js via the GraphQL API (create or update by path). Links between cards were rewritten to Wiki.js paths (synergetics-dictionary/<letter>/C#####).
Running the sync
From the elib-synergetics-dictionary repo:
cd /path/to/elib-synergetics-dictionary
# Required: API token from Wiki.js (Administration → API Access)
export WIKIJS_API_TOKEN="your-token"
# Optional
export WIKIJS_URL="https://www.buckyverse.org" # default
export WIKIJS_BASE_PATH="synergetics-dictionary" # default
# Full sync (uses 5 s delay per card for production to avoid overloading Wiki.js)
elixir scripts/sync_cards_to_buckyverse.exs
# Local dev (shorter delay)
elixir scripts/sync_cards_to_buckyverse.exs --local
# Dry run
elixir scripts/sync_cards_to_buckyverse.exs --dry-run
# Limit or filter
elixir scripts/sync_cards_to_buckyverse.exs --limit 100
elixir scripts/sync_cards_to_buckyverse.exs --letter a
elixir scripts/sync_cards_to_buckyverse.exs --card C01234
elixir scripts/sync_cards_to_buckyverse.exs --range C00001..C00100
You can use a .env in the source repo (see the script’s header) to set WIKIJS_API_TOKEN and optional vars.
Performance
The script used a 5 second delay per card when targeting production and 100 ms with --local. This throttling helped avoid overloading Wiki.js (see wikijs-graphql-performance.md). For large syncs, prefer running against local Wiki.js first (--local) if you still need to do legacy imports.
Timeouts after many cards: As the page tree grows (e.g. after 200–300 cards), each Wiki.js response can take longer. The sync script uses a 3 minute HTTP receive timeout so slow responses don’t fail the run. If you still see Req.TransportError timeout, increase receive_timeout in the script (default 180_000 ms) or restart the wiki container mid-sync and resume from the next card.
Skip unchanged: The script fetches existing page content when a page exists and skips the update when it's identical (trimmed). Re-runs only trigger Wiki.js page-tree rebuilds for new or changed cards; unchanged cards show SKIP (unchanged) and no write is sent.
Summary
| Item | Value |
|---|---|
| Source repo | elib-synergetics-dictionary |
| Script | scripts/sync_cards_to_buckyverse.exs |
| Reads | output/generated/markdown/cards/<letter>/C#####.md |
| Writes to | Wiki.js at WIKIJS_URL (buckyverse.org or localhost) |
| Wiki path prefix | synergetics-dictionary (e.g. synergetics-dictionary/a/C00001) |
| Env | WIKIJS_API_TOKEN required; WIKIJS_URL, WIKIJS_BASE_PATH optional |