LLI Wiki — My Digital Knowledge Base

Migrating about 1,000 Joplin notes to a Wiki.js wiki with AI agents: lessons learned

Local anonymisation before any model, parallel writer agents, a leak scanner, bilingual FR/EN, reviewed and blurred screenshots, publishing without overwriting.

I had about a thousand personal technical notes in Joplin, accumulated over many years: commands, procedures, troubleshooting memos. I wanted them in a public bilingual Wiki.js wiki. Doing it by hand was out of the question, and sending raw notes to an AI model was out of the question too, because years of notes contain hostnames, logins, passwords and names of former employers and clients. This is how I did it with AI agents, and what I learned.

The pipeline

flowchart LR
    A["Joplin database : read-only"] --> B["Exclusion lock : private notebooks"]
    B --> C["Local anonymiser : no model"]
    C --> D["Parallel writer agents : FR and EN"]
    D --> E["Leak scanner"]
    E -->|clean| F["Publisher : create only"]
    E -->|hit| G["Blocked report"]
    G --> H["Rewrite or discard"]
    H --> E
    F --> I["Read-back check"]
    I --> J["Category indexes"]
    K["Screenshots : review and blur"] --> F

Step 1: local anonymisation before any model

The first rule: no raw note ever reaches a model. A local Python script opens the Joplin database read-only, filters out the excluded notebooks in the SQL query itself (so their text is never even loaded into memory), and writes only redacted text. It replaces hostnames, addresses, e-mails, identifiers, key-like strings and a deny-list of company, client and people names with neutral placeholders (SERVER01, 192.0.2.x, <PASSWORD>).

A deny-list is not enough, and the script made mistakes. It once turned -p tcp into a password placeholder, changed a configuration file name into a fake domain, and renamed database columns into server names. I compared every published page with its source to find that damage, and the agents had mostly restored the right values. Lesson: an automatic anonymiser is a safety net, not a rewrite; test it against the text it can break.

Step 2: parallel writer agents

Notes are grouped into batches of about five thousand words, similar notes together. One writer agent per batch turns each note into a French and an English article with a title, slug, category, tags and description, then a JSON file. Rules for the agents:

Cheaper models handled short routine notes and stronger models the long ones. A separate security re-read per batch turned out not to be worth its cost once the scanner existed, so I dropped it.

Step 3: a leak scanner before publishing

An independent script scans every article and reports only file names and categories of hits, never the matching text: deny-listed names, IP addresses outside documentation ranges, GUIDs, e-mails, password or token assignments, key and private-key headers, internal domains. Anything flagged goes to a blocked report instead of the wiki. A third of the flagged notes were false alarms, verified by hand. Notes that were blocked because they were about a company were not discarded: a dedicated pass rewrote them to keep the technique and replace everything specific with generic names.

Step 4: screenshots

Screenshots often make a note understandable, but they leak the most. I extracted them to a review folder and examined each one. The decision per image is keep, mask or drop. Masking pixelates and blurs the sensitive rectangles strongly enough that the text cannot be read back, and the masked file is reviewed again. Of 232 images, 83 were kept and the rest dropped for visible user, server or domain names. Kept images are shrunk, converted to WebP, uploaded as files and referenced from the right section with a caption, in both languages. Not embedding them as text blobs keeps pages light.

Step 5: publishing without damage

The publisher talks to the Wiki.js API and never overwrites: if a page already exists at a path, it is skipped. Each created page is read back and compared with what was sent. A journal records every action so a stopped run resumes. Category index pages are regenerated after each publication. In the end 656 notes became 1,312 pages (French and English), while the rest were rejected as too short, duplicated, internal or already covered.

Lessons learned

Mastodon LLIMastodon SocialFosstodon