使用plantuml生成mindmap 以及数据结构图

更新了,貌似还是这样子。

块引用 Debugger entered–Lisp error: (wrong-type-argument integer-or-marker-p nil) buffer-substring(nil nil) (substring-no-properties (buffer-substring text-begin text-end)) (string-trim (substring-no-properties (buffer-substring text-begin text-end)) “\n” “\n”) (let* ((stars) (paragraph (org-element-map headline 'paragraph #'identity nil 'first-match ‘no-recursion)) (text-begin (org-element-property :contents-begin paragraph)) (text-end (org-element-property :contents-end paragraph)) (text (string-trim (substring-no-properties (buffer-substring text-begin text-end)) “\n” “\n”))) (let ((–dotimes-limit-- (org-element-property :level headline)) (–dotimes-counter-- 0)) (while (< --dotimes-counter-- --dotimes-limit–) (let ((i --dotimes-counter–)) (setq stars (concat stars “*”))) (setq --dotimes-counter-- (1+ --dotimes-counter–)))) (concat stars (if plantuml-mindmap-contains-org-content (progn “:”)) " " (if plantuml-org-headline-bold (progn “”)) (if plantuml-add-index-number (progn (concat (number-to-string (car (org-num–current-numbering … nil))) ". "))) (org-element-property :raw-value headline) (if plantuml-org-headline-bold (progn “”)) (if plantuml-mindmap-contains-org-content (progn (concat “:\n\n” text “;”))))) plantuml–headline-txt((headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #1))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #39))) :parent (org-data nil #39)) #1 (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 …)) :parent #39)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 …)) :parent #39) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #44) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #47) #(“看看\n” 0 3 …)))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 …)) :parent #39) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #45) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #48) #(“看1\n看2\n看3\n” 0 9 …)))))))) (closure (t) (x) (plantuml–headline-txt x))((headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #1))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #39))) :parent (org-data nil #39)) #1 (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 …)) :parent #39)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 …)) :parent #39) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #44) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #47) #(“看看\n” 0 3 …)))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 …)) :parent #39) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #45) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #48) #(“看1\n看2\n看3\n” 0 9 …)))))))) #f(compiled-function (–data) #<bytecode 0x157a929020a9>)((headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #1))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #39))) :parent (org-data nil #39)) #1 (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 …)) :parent #39)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 …)) :parent #39) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #44) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #47) #(“看看\n” 0 3 …)))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 …)) :parent #39) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #45) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #48) #(“看1\n看2\n看3\n” 0 9 …)))))))) mapc(#f(compiled-function (–data) #<bytecode 0x157a929020a9>) ((headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #3))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 …)) :parent (org-data nil #41)) . #2))) (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 (:parent #4))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 …)) :parent (org-data nil #42)) . #2))) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 (:parent #5))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 …)) :parent (org-data nil #43)) . #2)) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #5) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #8) #(“看看\n” 0 3 (:parent #11))))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 (:parent #6))) :parent (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 …)) :parent (org-data nil #44)) . #2)) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #6) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #9) #(“看1\n看2\n看3\n” 0 9 (:parent #12))))))) #f(compiled-function (–data) #<bytecode 0x157a929020a9>)((headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #1))) :parent (org-data nil #1)) (headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #4))) :parent #1)) (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 (:parent #5))) :parent #1)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 (:parent #6))) :parent #1) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #6) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #9) #(“看看\n” 0 3 (:parent #12))))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 (:parent #7))) :parent #1) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #7) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #10) #(“看1\n看2\n看3\n” 0 9 (:parent #13))))))) mapc(#f(compiled-function (–data) #<bytecode 0x157a929020a9>) ((headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #3))) :parent (org-data nil . #2)) (headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #6))) :parent #3)) (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 (:parent #7))) :parent #3)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 (:parent #8))) :parent #3) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #8) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #11) #(“看看\n” 0 3 (:parent #14))))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 (:parent #9))) :parent #3) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #9) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #12) #(“看1\n看2\n看3\n” 0 9 (:parent #15)))))))) #f(compiled-function (–data) #<bytecode 0x157a929020a9>)((org-data nil (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #4))) :parent #1) (headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #7))) :parent #4)) (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 (:parent #8))) :parent #4)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 (:parent #9))) :parent #4) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #9) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #12) #(“看看\n” 0 3 (:parent #15))))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 (:parent #10))) :parent #4) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #10) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #13) #(“看1\n看2\n看3\n” 0 9 (:parent #16)))))))) org-element-map((org-data nil (headline (:raw-value “测试” :begin 1 :end 49 :pre-blank 0 :contents-begin 6 :contents-end 49 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 1 :title (#(“测试” 0 2 (:parent #4))) :parent #1) (headline (:raw-value “test” :begin 6 :end 14 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 6 :title (#(“test” 0 4 (:parent #7))) :parent #4)) (headline (:raw-value “测试一下” :begin 14 :end 22 :pre-blank 0 :contents-begin nil :contents-end nil :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 14 :title (#(“测试一下” 0 4 (:parent #8))) :parent #4)) (headline (:raw-value “更新了” :begin 22 :end 32 :pre-blank 0 :contents-begin 29 :contents-end 32 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 22 :title (#(“更新了” 0 3 (:parent #9))) :parent #4) (section (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #9) (paragraph (:begin 29 :end 32 :contents-begin 29 :contents-end 32 :post-blank 0 :post-affiliated 29 :parent #12) #(“看看\n” 0 3 (:parent #15))))) (headline (:raw-value “效果如何” :begin 32 :end 49 :pre-blank 0 :contents-begin 40 :contents-end 49 :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :post-affiliated 32 :title (#(“效果如何” 0 4 (:parent #10))) :parent #4) (section (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #10) (paragraph (:begin 40 :end 49 :contents-begin 40 :contents-end 49 :post-blank 0 :post-affiliated 40 :parent #13) #(“看1\n看2\n看3\n” 0 9 (:parent #16))))))) headline (closure (t) (x) (plantuml–headline-txt x))) (seq-reduce #’(lambda (a b) (concat a “\n” b)) (org-element-map (org-element-parse-buffer) ‘headline #’(lambda (x) (plantuml–headline-txt x))) nil) plantuml–parse-headlines() (plantuml–run-command “mindmap” (plantuml–parse-headlines)) plantuml-org-to-mindmap() funcall-interactively(plantuml-org-to-mindmap) call-interactively(plantuml-org-to-mindmap record nil) command-execute(plantuml-org-to-mindmap record) execute-extended-command(nil “plantuml-org-to-mindmap” “plantuml-min”) funcall-interactively(execute-extended-command nil “plantuml-org-to-mindmap” “plantuml-min”) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)

看错误信息,应该是你那边没有更新成功吧。github 上这里已经变化了。

cat <<EOF | java -jar ~/.emacs.d/lisp/plantuml.jar -tsvg -pipe > /Users/didi/notes/content-org/images/20221024172206.svg 
@startmindmap 
!theme plain 
skinparam defaultFontName somefont

*: <b>1. hhhh</b>:

jdifdjfi;
**: <b>1. ffjdif</b>:

fdjiffj;
*: <b>2. hfdifhdif</b>:

fjdif;
@endmindmap
EOF

试试看在 shell 中运行这段代码。我这边测试好像没有什么问题。

好的,重新下载就可以了。但还有个疑问,如下图,第二层级的内容怎么跑到第一层级标题下面去了?

Screenshot from 2022-10-24 18-25-59

目前会去寻找当前层级下第一次出现的段落,作为当前层级的描述。没有考虑到这个“第一次出现”是不是在子段落里。

我研究一下,这个好不好改。

解决了 原来是没有装java 感谢

还注意到一个问题,在多项内容前加 - 符号,形成的mindmap只有一项。

这个逻辑是正常。

这里计划的是只展示headline下第一段内容作为关键摘要展示。(一个 org 文件内容可能非常多,全部展示不适合作为mindMap)

加了 - 符号,内容变成了 list,那么第一行就是第一段。 而不加 -,内容是普通的语句,按照空行分段,第一个空行前的内容作为一段摘要。

理解了,因为我只是随手弄了一个简单的文档,就忽视了大文档的复杂度这一问题

这个 package 的初衷其实是,当你在编写复杂的 org 文档时,能够少量修改已有文档的情况下快速的导出 MindMap 用于分享或是自我复习,减少文档、MindMap的重复工作。(当然,实际情况是比较困难的,很难保持长文档编写过程中能够满足 MindMap 的结构化)

实际上,如果针对性的编写相对简单的 MindMap,或许直接使用 plantuml 语言编写更合适。

如果需要实现复杂的 MindMap,那么一个专用的MindMap工具会更合适。

1 个赞

借大佬的楼汇报一下,今天突然想到,应该可以抄 ob-plantuml 搞一个处理 json 的,这样就可以在 org-mode 里面处理 json,然后成功了。

图片

layers/my-config/local/ob-json/ob-json.el

1 个赞

非IT人士:

各命令 都可以正常生成 svg, 但 如用这种带 “open” 的命令时

plantuml-org-to-mindmap-open

不明白, 是在那打开, messages 缓冲区 提示

/bin/bash: line 1: open: command not found

想知道 怎么生成后, 即时 用看图软件打开 Ristretto 看图软件, 是archlinux xfce 自带的

还想再问个, 可以指定 某一级大纲 单独导出吗, 就像 org-mode 收窄到子树显示, 我试了 收窄到 子树到是可以, 但是 文件名 并不是 指定的 当前大纲标题, 还是当前的 文件名 :grinning:

由于我自己使用的是 Mac 系统。因此,这里打开 svg 用的是 open 命令。如果要用其他系统自动的命令。需要知道有没有什么命令行启动该应用。

好, 我猜的, 可能与 linux 中的 “xdg-open” 相同, 我去看看

大佬,除了 josn 和 yaml 之外,支持其他语言的源文件生成数据结构图么?

应该没有了。目前 plantuml 只支持 json 喝 yaml 生成数据结构图。

你可以看看你想要的语法,有没有现成的工具可以转为为 json 或者 yaml。