mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
OPML is what Workflowy, Dynalist, OmniOutliner, Logseq and most other outliners export and import. Top-level outlines become lists and their children cards, with the outliners' _note as the description and a completed item (Workflowy's _complete, Dynalist's complete) as the done tag. Deeper outlines become checklists with their descendants as items, and the head title becomes the board title. A list's note and url/htmlUrl/xmlUrl links are reported in the loss report. Export writes the same with Workflowy's attribute names; line breaks and tabs in notes are written as character references so that they survive the XML parser. Like the Leo outline, the XML is parsed on the server only, with htmlparser2 in XML mode: DTDs and external entities are never resolved, and size and node counts are bounded. tests/opmlOutline.test.cjs covers a Workflowy/Dynalist file, the round trip and the negatives (an external entity, a node bomb). A Playwright case imports an outline through the page, and the export audit fetches the new format. New instruction text is in English, pending Transifex. Thanks to xet7 !
4 lines
199 B
JavaScript
4 lines
199 B
JavaScript
// Server-only entry to the OPML parser: models/import.js requires this inside
|
|
// its server branch so htmlparser2 is not bundled for the client.
|
|
export { parseOpml } from '/models/lib/opmlOutline';
|