From 2d06b50148bf4574d0833e48a0773d0ead9709d2 Mon Sep 17 00:00:00 2001 From: Utku Bilen Demir <84389167+UtkuBilenDemir@users.noreply.github.com> Date: Wed, 23 Sep 2026 10:39:35 +0200 Subject: [PATCH] Kanzi 0.6.10: unique single-letter colours, bracket stripped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - src/kindle_zotero_importer/import_plan.py: grey=[e] #8a8a8a, red=[r] #ff6666 (unique single letters y/o/r/e/g/b/p/m), all 8 colours have single + full name, bracket stripped from highlight text and note comment (so [o] hello → hello, [r] note → note) - plugin/manager.html: update colourDefaults and desc to All codes are single letters (y,o,r,e,g,b,p,m) — e.g. [o] orange, [r] red, [e] grey, reset text grey=[e] - README.md: colours tip with unique letters, bracket stripped - Bump to 0.6.10 --- README.md | 6 +++--- plugin/manager.html | 8 ++++---- plugin/manifest.json | 2 +- src/kindle_zotero_importer/import_plan.py | 5 +++-- updates.json | 9 +++++++++ 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fb7c87a..a004f84 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ Import Kindle `My Clippings.txt` highlights into Zotero as native annotations; d ## Install (30 seconds) -1. Download `kindle-zotero-importer.xpi` from [Releases](../../releases) (latest `0.6.9`, or `0.6.8-beta` for preview). +1. Download `kindle-zotero-importer.xpi` from [Releases](../../releases) (latest `0.6.10`, or `0.6.9-beta` for preview). 2. In Zotero: `Tools → Plugins → gear → Install Plugin From File…` → pick the `.xpi` → restart Zotero. 3. `Tools → Kanzi…` (or `Kindle Zotero Importer…`) to open the manager. -Works with Zotero 7–10; macOS/Windows/Linux; PDF and EPUB. Colours via bracket: `[o] orange`, `[r] grey` (per request), `[red]` red, `[y]` yellow, etc. — editable in `Settings → Highlight colours`. +Works with Zotero 7–10; macOS/Windows/Linux; PDF and EPUB. Colours via bracket: `[o] orange`, `[r] red`, `[e] grey`, `[y]` yellow, etc. — all single letters unique, editable in `Settings → Highlight colours`. ## Use @@ -32,7 +32,7 @@ Your choices are saved in `match-overrides.json` in the project folder; back it - Keep `My Clippings.txt` cumulative (do not clear it on the Kindle); the importer remembers what is already integrated via `kindle-id:` tags, so re-imports are incremental. - If a highlight is positioned in the wrong place, check that the Zotero item has the correct PDF/EPUB attached (not a link); `Matched-title-no-attachment` in `Conflicts` means that. - `Full re-import` is only needed if you changed many mappings at once or want to rebuild from scratch. -- Colours: start a highlight with `[o]`, `[r]` (grey, per request), `[red]`, `[y]`, `[g]`, `[b]`, `[p]`, `[m]` — e.g. `[o] This is orange` → orange. Full names (`[orange]`, `[grey]` etc.) also work. Change mappings in `Settings → Highlight colours` (British spelling). +- Colours: start a highlight or note with `[o]`, `[r]` red, `[e]` grey, `[y]` yellow, `[g]` green, `[b]` blue, `[p]` purple, `[m]` magenta — e.g. `[o] This is orange` → orange, bracket stripped. Full names (`[orange]`, `[red]`, `[grey]` etc.) also work. Change mappings in `Settings → Highlight colours` (British spelling). ## For developers / CLI diff --git a/plugin/manager.html b/plugin/manager.html index 72760d8..e3dd914 100644 --- a/plugin/manager.html +++ b/plugin/manager.html @@ -1131,7 +1131,7 @@ const colDesc = document.createElement('div'); colDesc.className = 'muted'; colDesc.style.marginBottom = '8px'; - colDesc.textContent = 'Use [code] at the start of a highlight to set its colour. Grey is [r] per request — red is [red]. Edit codes or hexes below. Example: [o] This will be orange → orange highlight, text becomes “This will be orange”.'; + colDesc.textContent = 'Use [code] at the start of a highlight to set its colour. All codes are single letters (y, o, r, e, g, b, p, m) — e.g. [o] orange, [r] red, [e] grey. Full names ([orange], [red], [grey]) also work and the bracket is stripped. Example: [o] This will be orange → orange highlight.'; colourSection.appendChild(colDesc); const colourTable = document.createElement('table'); colourTable.style.marginBottom = '8px'; @@ -1145,8 +1145,8 @@ const colourDefaults = { y: '#ffd400', yellow: '#ffd400', o: '#ff8c00', orange: '#ff8c00', - r: '#8a8a8a', grey: '#8a8a8a', gray: '#8a8a8a', - red: '#ff6666', + r: '#ff6666', red: '#ff6666', + e: '#8a8a8a', grey: '#8a8a8a', gray: '#8a8a8a', g: '#5fb236', green: '#5fb236', b: '#2ea8e5', blue: '#2ea8e5', p: '#a28ae5', purple: '#a28ae5', @@ -1262,7 +1262,7 @@ resetBtn.style.cursor = 'pointer'; resetBtn.style.fontSize = '11px'; resetBtn.addEventListener('click', async () => { - if (!confirm('Reset colours to defaults (grey = [r])?')) return; + if (!confirm('Reset colours to defaults (grey = [e], red = [r])?')) return; cTbody.textContent = ''; for (const k of Object.keys(colourDefaults).sort()) { const tr = document.createElement('tr'); diff --git a/plugin/manifest.json b/plugin/manifest.json index 8937a1b..80335f9 100644 --- a/plugin/manifest.json +++ b/plugin/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Kanzi", - "version": "0.6.9", + "version": "0.6.10", "description": "Kindle annotations to Zotero — My Clippings.txt → native annotations.", "homepage_url": "https://github.com/UtkuBilenDemir/kindle-zotero_importer", "author": "Utku Bilen Demir", diff --git a/src/kindle_zotero_importer/import_plan.py b/src/kindle_zotero_importer/import_plan.py index 6360d26..d937728 100644 --- a/src/kindle_zotero_importer/import_plan.py +++ b/src/kindle_zotero_importer/import_plan.py @@ -13,10 +13,11 @@ DEFAULT_COLOUR_MAP: dict[str, str] = { "yellow": "#ffd400", "o": "#ff8c00", "orange": "#ff8c00", - "r": "#8a8a8a", + "r": "#ff6666", + "red": "#ff6666", + "e": "#8a8a8a", "grey": "#8a8a8a", "gray": "#8a8a8a", - "red": "#ff6666", "g": "#5fb236", "green": "#5fb236", "b": "#2ea8e5", diff --git a/updates.json b/updates.json index e7ae6c6..b621b89 100644 --- a/updates.json +++ b/updates.json @@ -2,6 +2,15 @@ "addons": { "kindlezoteroimporter@utkubilen.de": { "updates": [ + { + "version": "0.6.10", + "update_link": "https://github.com/UtkuBilenDemir/kindle-zotero_importer/releases/download/v0.6.10/kindle-zotero-importer.xpi", + "applications": { + "zotero": { + "strict_min_version": "6.999" + } + } + }, { "version": "0.6.9", "update_link": "https://github.com/UtkuBilenDemir/kindle-zotero_importer/releases/download/v0.6.9/kindle-zotero-importer.xpi",