mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Rocket.Chat: "Download my data" as JSON (channels.json and a message file per room, with its assets), one room's .json, and the .zip Rocket.Chat's CSV importer reads are imported for Board View / Chat - a room is a card, its messages the comments. A board exports as that CSV importer .zip: users.csv, channels.csv and a messages.csv per card. Fizzy (37signals): its account export (data/<table>/<id>.json and storage/) and personal data export (<number>.json per card) are imported - boards become swimlanes, columns lists between Maybe?, Not now and Done, with tags, assignees, steps, comments, golden and files. A board exports as the account export Fizzy's account import reads, every row with every column its import requires, ids as base36 UUIDv7. Both formats are read and written from their projects' source code, with tests, documentation and the import instruction in every language. Low confidence translations include chr, ay, bm, bua, bo, cv, csb, ak, bi, ace, ba, gn, gv, iu, kl, ig, kok, nah, qu, kw, lld, nap, rm, om, ks, tlh, tig, rup, sah, se, ss, sm, to, tpi, dz, ee, ff, fj, fo, uz-AR, ve, ve-PP, vo, wal, wa, wo, zgh, ve-CC, wa-RR, wuu-Hans, yi, xh and yo. Thanks to xet7 !
50 lines
2.7 KiB
JavaScript
50 lines
2.7 KiB
JavaScript
'use strict';
|
|
// The groups the Import page and the Export menu show the other tools under
|
|
// (2026-11-20: asked so a list of some sixty tools reads by kind, the way
|
|
// docs/Features/Board-Sidebar/Board-Settings/Import-Export/External-Tools.md
|
|
// groups them). One table for both sides, so a tool is in the same group
|
|
// whether it is read or written. Pure CommonJS: tests/toolGroups.test.cjs.
|
|
|
|
const TOOL_GROUPS = [
|
|
{ group: 'wekan', labelKey: null }, // WeKan's own: headed by the product name
|
|
{ group: 'kanban', labelKey: 'tool-group-kanban' },
|
|
{ group: 'issues', labelKey: 'tool-group-issues' },
|
|
{ group: 'tasks', labelKey: 'tool-group-tasks' },
|
|
{ group: 'spreadsheets', labelKey: 'tool-group-spreadsheets' },
|
|
{ group: 'text', labelKey: 'tool-group-text' },
|
|
{ group: 'messages', labelKey: 'tool-group-messages' },
|
|
{ group: 'api', labelKey: 'tool-group-api' },
|
|
];
|
|
|
|
const MEMBERS = {
|
|
wekan: ['wekan', 'json', 'json-no-attachments', 'zip'],
|
|
kanban: ['trello', 'trello-api', 'trellozip', 'kanboard', 'deck', 'openproject', 'asana', 'zenkit', 'planner', 'monday', 'wrike',
|
|
'wrikeworkflow', 'teamwork', 'businessmap', 'clickup', 'notion', 'plane', 'fizzy', 'taiga', 'focalboard', 'nullboard', 'kanri',
|
|
'obsidian', 'meistertask', 'quire'],
|
|
issues: ['jira', 'github', 'gitlab', 'gitea', 'forgejo', 'redmine', 'linear', 'pivotal'],
|
|
tasks: ['todoist', 'ticktick', 'tasksorg', 'superproductivity', 'todotxt', 'taskwarrior', 'vikunja'],
|
|
spreadsheets: ['csv', 'excel'],
|
|
text: ['markdown', 'leo', 'opml', 'orgmode'],
|
|
messages: ['mail', 'mbox', 'ical', 'googletakeout', 'slack', 'mattermost', 'telegram', 'whatsapp', 'discord', 'rocketchat', 'evernote', 'enex'],
|
|
api: ['planka', 'mstodo', 'kanbanflow', 'basecamp', 'googletasks', 'googlekeep'],
|
|
};
|
|
const GROUP_OF = new Map(Object.entries(MEMBERS).flatMap(([group, keys]) => keys.map(key => [key, group])));
|
|
const INDEX = new Map(TOOL_GROUPS.map((g, i) => [g.group, i]));
|
|
|
|
// The group of a tool key; a key no group names is in Kanban and project tools.
|
|
const toolGroupOf = key => GROUP_OF.get(key) || 'kanban';
|
|
|
|
// items (each with `key`) grouped in TOOL_GROUPS order, their own order kept
|
|
// inside a group; the first of each group carries `groupLabelKey` (null for
|
|
// WeKan's own, whose heading is the product name) and `groupStart: true`.
|
|
function groupTools(items) {
|
|
const sorted = (items || []).map((item, i) => ({ item, i, g: INDEX.get(toolGroupOf(item.key)) }))
|
|
.sort((a, b) => (a.g - b.g) || (a.i - b.i));
|
|
return sorted.map(({ item, g }, n) => {
|
|
const start = n === 0 || sorted[n - 1].g !== g;
|
|
return { ...item, group: TOOL_GROUPS[g].group, groupStart: start, groupLabelKey: start ? TOOL_GROUPS[g].labelKey : null };
|
|
});
|
|
}
|
|
|
|
module.exports = { TOOL_GROUPS, MEMBERS, toolGroupOf, groupTools };
|