Import many boards: on the import page of every source, several export files, or one .zip holding them, each become their own board through the same path a single import of that file takes, and the page lists what each file became (models/lib/importManyFiles.js). A .zip that is itself one export (Vikunja, Notion, Plane, WeKan with attachments) stays one board. One board per project: for the generalized importer, each swimlane the import would make - a project, folder or list of the tool - becomes its own board (models/lib/importSplit.js), so an export of a whole app imports as many boards, as a Trello .zip does. Kanri's all-data export now reads every board, not only the first, so it splits into one board per Kanri board. Export all boards: All Boards sidebar, or Multi-Selection for the selected boards, downloads every board the user may export in one format, each checked as its own export is. Excel is one workbook with a sheet per board, named after the board; every other format is a .zip with one file per board (server/routes/exportAllBoards.js). The per-format bytes are made in one place, server/lib/renderExternalExport.js, for the board route and this. A WeKan .zip export imports as a new board from All Boards, unpacked on the server with its attachments (it was refused in the browser). api.py gains importboardsfrom and exportallboards, sends every source in the shape the import page sends, and fetches Excel, PDF, CSV and TSV exports from their own routes and writes them as bytes. Fixed while documenting: a Trello Butler rule's list name kept its case, so the rule fires; the HTML export fetches the board JSON by URL instead of a link the export popup no longer has; Tasks.org exports time spent; Nextcloud Deck's done flag marks the due date done. docs/Features/ImportExport has a directory per format with the steps to import and export it, one board and many, and its details, moved from Format-Coverage.md, which is now the index and the shared contract. tests/importExportDocsCoverage.test.cjs fails when a format has no page. Thanks to xet7 !
7.7 KiB
Nullboard
WeKan imports and exports a board as a Nullboard
board file (.nbx). Despite the extension, the file is plain JSON. Nullboard
has lists of notes and nothing more: a note is free text, so its first line
becomes the card title and the rest the description. A raw note gets the
label raw.
How to import
- In Nullboard, open the board, open the menu in the top right corner and choose Export this board.... With no board open, Export all boards... saves every board in one file.
- In WeKan, go to All Boards → New → Import → Nullboard.
- Open the
.nbxfile in a text editor, copy all of it and paste it into the text box. - Click Import.
- Read the loss report on the import page. It is also kept in Admin Panel → Problems → Recovery.
A file with several boards imports its first board, and reports the others. To import each of them, use Import many boards with one file per board.
How to import many boards at once
- On the import page, choose Nullboard, then under Import many boards
choose several
.nbxfiles, or one.zipthat holds them. - Each file becomes its own board. The boards are imported without member mapping; members can be mapped later.
Nullboard is imported through the generalized importer
(models/kanboardCreator.js via EXTERNAL_PARSERS in
models/lib/externalParsers.js), so the page also has a checkbox One board
per project: each swimlane the import would create becomes its own board,
named after that swimlane. A Nullboard import puts every card in the swimlane
Default, so for Nullboard the option makes no difference. An Export all
boards... file still imports only its first board; the other boards are
reported, not made into swimlanes.
Links between cards that end up on different boards are reported in the loss report rather than kept. Nullboard has no links between notes.
From a script:
python3 api.py importboardsfrom nullboard FILE_OR_DIR ...
Each argument is a file, a directory of files, or a .zip file.
How to export
- In WeKan, open the board, then Board Settings → Export.
- Choose what to include, then under JSON choose Nullboard. The board
downloads as
<board>.nbx. - In Nullboard, open the menu in the top right corner and choose Import boards..., then choose the file.
The id of the exported board is the WeKan board's creation time, the way Nullboard makes its own ids, so exporting the same board again is offered in Nullboard as an overwrite of the earlier import.
The Nullboard entry is offered for a whole board only, not for a swimlane or a list.
How to export all boards at once
- In WeKan, go to All Boards, open the sidebar and choose Export all boards, then Nullboard.
- One
.zipdownloads, with one file per board you can export: boards you are a member of that are not archived and not templates.
To export only some boards, use Multi-Selection in the All Boards sidebar, select the boards, then Export.
From a script:
python3 api.py exportallboards nullboard boards.zip
Format details
The format is a Nullboard board file as Export this board... or Export all boards... writes it: plain JSON despite the extension. It holds one board
{format, id, revision, title, lists: [{title, notes: [{text, raw, min}]}]}
or an array of them. As in Nullboard's own importer, every board needs those
five keys, a non-empty id and revision, and format 20190412; anything else
is refused.
What the import must cover:
- lists as lists: a repeated title gets a number, and an empty one is called "Untitled list";
- notes as cards: a note is free text, so its first non-blank line is the card title and the remaining lines the description;
- a raw note (drawn as a heading inside the list) gets the label
raw; - the board title as the board title.
Reported: collapsed notes (min, Nullboard's view state; they are imported
expanded), empty notes, and every board after the first in an array, since one
import creates one board.
The export writes one board that Nullboard imports (format 20190412, the
board's creation time as id, revision 1): the title and description as the
note text, each checklist after them as a title line and [ ] / [x] item
lines, and a card labelled raw as a raw note. Nullboard notes are text only,
so other labels, dates, members, comments, custom fields and attachments are
not exported, and checklists come back as description text.
What the current code does (models/lib/nullboardFormat.js) agrees with the
above. In addition:
- A repeated list title becomes
<title> (2),<title> (3)and so on, and that is reported. - A note without text is reported and not imported.
- Without a board title, the board is called "Imported Nullboard".
- Every card goes to the swimlane Default.
- In the export, a blank line separates the description and each checklist in the note text. A card whose list is not exported goes to a list of its own list's name.
- Archived cards and archived lists are not exported.
What is kept
| Nullboard | WeKan |
|---|---|
Board title |
Board title |
List title |
List |
Note text, first non-blank line |
Card title |
Note text, the remaining lines |
Card description |
raw: true |
Label raw |
What is not kept
The import reports these on the loss report:
- collapsed notes (
min: true): they are imported expanded, because a WeKan card has no collapsed state; - empty notes and notes without text;
- a second list with the same title (it is imported under a numbered title);
notesthat is not an array;- every board after the first in an Export all boards... file.
A file that fails Nullboard's own checks (missing keys, an empty id or
revision, or another format) is refused, and no board is created.
The Nullboard export writes no labels other than raw, and no dates,
members, comments, custom fields, swimlanes, card colors or attachments.
Checklists are written into the note text, so they come back as description
text when imported again.
REST API
python3 api.py importboardfrom nullboard board.nbx # POST /api/boards/import/nullboard
python3 api.py importboardsfrom nullboard FILE_OR_DIR ... # several boards
python3 api.py exportboardformat BOARDID nullboard board.nbx
python3 api.py exportallboards nullboard boards.zip
The HTTP routes:
POST /api/boards/import/nullboardwith the file's text asboard;GET /api/boards/:boardId/export/nullboard?authToken=…returns the file asapplication/json;GET /api/export-all-boards/nullboard?authToken=…returns the.zip; add&boardIds=ID1,ID2for only those boards.
How it is built and tested
models/lib/nullboardFormat.jsreads and writes the board file.models/import.jssends the text to the parser, andmodels/kanboardCreator.jscreates the board.tests/nullboardFormat.test.cjsis the unit test of the round trip.tests/importLossReport.test.cjscovers the loss report andtests/boardExportScope.test.cjsthe export menu entry.- The Playwright cases are in
tests/playwright/specs/import-export-format-audit.e2e.js: "Nullboard: a .nbx board imports with its lists, notes and raw note", and the export menu link for every format.
Sources
- Nullboard: the app
- nullboard.html:
the board format, its importer's checks (
checkImport), and the menu items Export this board..., Export all boards... and Import boards...
See also: format coverage, all formats.