Kanzi 0.6.10: unique single-letter colours, bracket stripped

- 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
This commit is contained in:
Utku Bilen Demir 2026-09-23 10:39:35 +02:00
parent 0cc49d3bac
commit 633445d82d
5 changed files with 20 additions and 10 deletions

View file

@ -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:<hash>` 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

View file

@ -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');

View file

@ -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",

View file

@ -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",

View file

@ -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",