diff --git a/Doc/markmap-0.15.0/安装/安装办法.txt b/Doc/markmap-0.15.0/安装/安装办法.txt index 0fd9460c..831f9f16 100644 --- a/Doc/markmap-0.15.0/安装/安装办法.txt +++ b/Doc/markmap-0.15.0/安装/安装办法.txt @@ -5,7 +5,7 @@ https://markmap.js.org/repl https://nodejs.org/en/download (1) windows 直接下载最新版本安装即可 -(2) linux下 +(2) linux下 # 安装 wget https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz @@ -21,9 +21,10 @@ npm i markmap-common -g npm i markmap-lib -g npm i markmap-view -g npm install markmap-cli -g +npm i -g markmap-cli 3、检查是不是安装成功 markmap -V 4、转换 -markmap example.md -o out.html --no-open \ No newline at end of file +markmap example.md -o out.html --no-open diff --git a/src/main/java/UnitTest/Image/Rectangle.png b/src/main/java/UnitTest/Image/Rectangle.png deleted file mode 100644 index 8f775358..00000000 Binary files a/src/main/java/UnitTest/Image/Rectangle.png and /dev/null differ diff --git a/src/main/java/UnitTest/Swdt.html b/src/main/java/UnitTest/Swdt.html new file mode 100644 index 00000000..1544a448 --- /dev/null +++ b/src/main/java/UnitTest/Swdt.html @@ -0,0 +1,41 @@ + + + + + + +Markmap + + + + + + + + diff --git a/src/main/java/UnitTest/Swdt.java b/src/main/java/UnitTest/Swdt.java index 75e9696c..18f86e46 100644 --- a/src/main/java/UnitTest/Swdt.java +++ b/src/main/java/UnitTest/Swdt.java @@ -1,19 +1,25 @@ package UnitTest; import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.RuntimeUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import java.io.File; +/* +https://markmap.js.org/repl +https://github.com/markmap/markmap +*/ public class Swdt { public static void main(String[] args) { - String workingPath = "D:\\dsWork\\QingLong\\src\\main\\java\\UnitTest"; + String workingPath = "D:\\dsWork\\QingLong\\src\\main\\java\\UnitTest\\"; String km = "初中物理八年级上(人教版)"; String sourceJson = "Swdt.json"; String targetMd = "Swdt.md"; + String targetHtml = "Swdt.html"; - String json = FileUtil.readUtf8String(new File(workingPath + "\\" + sourceJson)); + String json = FileUtil.readUtf8String(new File(workingPath + sourceJson)); JSONObject jsonObject = JSONObject.parseObject(json); JSONArray jTree = jsonObject.getJSONObject("data").getJSONArray("tree"); String res = "# " + km + "\n"; @@ -33,6 +39,15 @@ public class Swdt { res += "\n"; } //写入md文件 - FileUtil.writeUtf8String(res, workingPath + "\\" + targetMd); + FileUtil.writeUtf8String(res, workingPath + targetMd); + + //markmap Swdt.md -o Swdt.html --no-open + String osName = System.getProperty("os.name"); + String cmd = "markmap " + workingPath + targetMd + " -o " + workingPath + targetHtml + " --no-open"; + if (osName.startsWith("Windows")) { + cmd = "cmd /c " + cmd; + } + String str = RuntimeUtil.execForStr(cmd); + System.out.println(str); } } diff --git a/src/main/java/UnitTest/脑图/内容.txt b/src/main/java/UnitTest/脑图/内容.txt deleted file mode 100644 index 5eb50113..00000000 --- a/src/main/java/UnitTest/脑图/内容.txt +++ /dev/null @@ -1,45 +0,0 @@ ---- -markmap: - colorFreezeLevel: 2 ---- - -# markmap - -## 第一章 ![](https://www.adobe.com/content/dam/cc/icons/adobe-firefly-logo-1.svg) - -- [Website](https://markmap.js.org/) -- [GitHub](https://github.com/gera2ld/markmap) - -## Related Projects - -- [coc-markmap](https://github.com/gera2ld/coc-markmap) for Neovim -- [markmap-vscode](https://marketplace.visualstudio.com/items?itemName=gera2ld.markmap-vscode) for VSCode -- [eaf-markmap](https://github.com/emacs-eaf/eaf-markmap) for Emacs - -## Features - -Note that if blocks and lists appear at the same level, the lists will be ignored. - -### Lists - -- **strong** ~~del~~ *italic* ==highlight== -- `inline code` -- [x] checkbox -- Katex: $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ - - [More Katex Examples](#?d=gist:af76a4c245b302206b16aec503dbe07b:katex.md) -- Now we can wrap very very very very long text based on `maxWidth` option - -### Blocks - -```js -console('hello, JavaScript') -``` - -| Products | Price | -|-|-| -| Apple | 4 | -| Banana | 2 | - -![](/favicon.png) - - diff --git a/src/main/java/UnitTest/脑图/实验地址.txt b/src/main/java/UnitTest/脑图/实验地址.txt deleted file mode 100644 index b359dfde..00000000 --- a/src/main/java/UnitTest/脑图/实验地址.txt +++ /dev/null @@ -1,3 +0,0 @@ -https://markmap.js.org/repl - -https://github.com/markmap/markmap \ No newline at end of file