xmind

command
v0.0.0-...-278de0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 10 Imported by: 0

README

命令行工具

执行命令./main config.json,将按照配置文件进行各种转换工作

指定具体xmind文件保存为custom自定义json格式

{
  "from": "file:../example/content.json.xmind",
  "fromType": "xmind",
  "fromCustom": {},
  "to": "../convert/out",
  "toType": "custom",
  "toCustom": {
    "Id": "id",
    "Title": "title",
    "ParentId": "parentId",
    "IsRoot": "isRoot",
    "Labels": "labels",
    "Notes": "notes"
  },
  "toMarkdown": {}
}

指定具体xmind文件保存为markdown文件

{
  "from": "file:../example/content.json.xmind",
  "fromType": "xmind",
  "fromCustom": {},
  "to": "../convert/out",
  "toType": "markdown",
  "toCustom": {},
  "toMarkdown": {
    "default": "{{Repeat \"#\" .Deep}} {{.Title}}\n\n{{range $i,$v := .Labels}}> {{$v}}\n\n{{end}}{{range $i,$v := (SplitLines .Notes \"\\n\\r\")}}> {{$v}}\n\n{{end}}"
  }
}

设置通配符匹配xmind文件保存为markdown文件

{
  "from": "dir:../example/*.xmind",
  "fromType": "xmind",
  "fromCustom": {},
  "to": "../convert/out",
  "toType": "markdown",
  "toCustom": {},
  "toMarkdown": {
    "default": "{{Repeat \"#\" .Deep}} {{.Title}}\n\n{{range $i,$v := .Labels}}> {{$v}}\n\n{{end}}{{range $i,$v := (SplitLines .Notes \"\\n\\r\")}}> {{$v}}\n\n{{end}}"
  }
}

递归通配符匹配xmind文件保存为markdown文件

{
  "from": "recursive:../example/*.xmind",
  "fromType": "xmind",
  "fromCustom": {},
  "to": "../convert/out",
  "toType": "markdown",
  "toCustom": {},
  "toMarkdown": {
    "default": "{{Repeat \"#\" .Deep}} {{.Title}}\n\n{{range $i,$v := .Labels}}> {{$v}}\n\n{{end}}{{range $i,$v := (SplitLines .Notes \"\\n\\r\")}}> {{$v}}\n\n{{end}}"
  }
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL