~ $
~ $
![在这里插入图片描述](https://img-blog.csdnimg.cn/b59cbb49c3e14a3bbec5675164a14009.png)
#!/bin/bash
# 创建一个新的空白XMind文件
xmind_dir=
(
m
k
t
e
m
p
−
d
)
x
m
i
n
d
f
i
l
e
n
a
m
e
=
′
t
e
s
t
.
x
m
i
n
d
′
x
m
i
n
d
p
a
t
h
=
"
(mktemp -d) xmind_filename='test.xmind' xmind_path="
(mktemp−d)xmindfilename=′test.xmind′xmindpath="{xmind_dir}/
x
m
i
n
d
f
i
l
e
n
a
m
e
"
x
m
i
n
d
2
>
/
d
e
v
/
n
u
l
l
"
{xmind_filename}" xmind 2>/dev/null "
xmindfilename"xmind2>/dev/null"{xmind_path}"
添加主题
xmind2testng 2>/dev/null “${xmind_path}” “新主题” “”
绘制连接线
xmind2testng 2>/dev/null “${xmind_path}” “–>” “”
绘制子主题
xmind2testng 2>/dev/null “ x m i n d p a t h " " 子 主 题 1 " " 新 主 题 " x m i n d 2 t e s t n g 2 > / d e v / n u l l " {xmind_path}" "子主题1" "新主题" xmind2testng 2>/dev/null " xmindpath""子主题1""新主题"xmind2testng2>/dev/null"{xmind_path}” “子主题2” “新主题”
将XMind文件转换成PNG图片
output_dir=’/storage/emulated/0/print/图片/’
output_filename=‘test.png’ output_path="
o
u
t
p
u
t
d
i
r
/
{output_dir}/
outputdir/{output_filename}"
xmind2image -f '/storage/emulated/0/字体/黑体.ttrm -rf "${xmind_dir}“文件)t_path}”
xmind2image: command not found
~ $ sudo pip install xmind2image
No superuser binary detected.
Are you rooted?
~ $
~ $
~ $
~ $
~ $
pip install xmind2image
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
ERROR: Could not find a version that satisfies the requirement xmind2image (from versions: none)
ERROR: No matching distribution found for xmind2image
~ $ pip install --user xmind2image
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
ERROR: Could not find a version that satisfies the requirement xmind2image (from versions: none)
ERROR: No matching distribution found for xmind2image
~ $
~ $
~ $
~ $ pip install git+https://github.com/zhuifengshen/xmind2image.git
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting git+https://github.com/zhuifengshen/xmind2image.git
Cloning https://github.com/zhuifengshen/xmind2image.git to /data/data/com.termux/files/usr/tmp/pip-req-build-lwso54so
ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
~ $
~ $ ~ $
~ $ pip install xmind2image xmind
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
ERROR: Could not find a version that satisfies the requirement xmind2image (from versions: none)
ERROR: No matching distribution found for xmind2image ~ $
~ $
~ $ pip install xmind2image
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/ ERROR: Could not find a version that satisfies the requirement xmind2image (from versions: none)
ERROR: No matching distribution found for xmind2image
~ $ pip install xmind2image Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
ERROR: Could not find a version that satisfies the requirement xmind2image (from versions: none)
ERROR: No matching distribution found for xmind2image
~ $
~ $
~ $
~ $
代码
pip install xmind2testcase
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting xmind2testcase
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d8/a1/64be37a8212c65cc07c4427c729d3636c3d400cbbe817dc8cb48ff672b35/xmind2testcase-1.5.0-py2.py3-none-any.whl (5.8 MB)
━━━━━━━━━━━ 5.8/5.8 MB 1.3 MB/s eta 0:00:00Requirement already satisfied: xmind in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from xmind2testcase) (1.2.0)
Requirement already satisfied: flask in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from xmind2testcase) (3.0.0)
Collecting arrow (from xmind2testcase)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f8/ed/e97229a566617f2ae958a6b13e7cc0f585470eac730a73e9e82c32a3cdd2/arrow-1.3.0-py3-none-any.whl (66 kB)
━━━━━━━━━━ 66.4/66.4 1.9 MB/s eta 0:00:00
kB
Requirement already satisfied: python-dateutil>=2.7.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from arrow->xmind2testcase) (2.8.2)
Collecting types-python-dateutil>=2.8.10 (from arrow->xmind2testcase)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c7/1b/af4f4c4f3f7339a4b7eb3c0ab13416db98f8ac09de3399129ee5fdfa282b/types_python_dateutil-2.9.0.20240316-py3-none-any.whl (9.7 kB)
Requirement already satisfied: Werkzeug>=3.0.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from flask->xmind2testcase) (3.0.0)
Requirement already satisfied: Jinja2>=3.1.2 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from flask->xmind2testcase) (3.1.2) Requirement already satisfied: itsdangerous>=2.1.2 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from flask->xmind2testcase) (2.1.2)
Requirement already satisfied: click>=8.1.3 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from flask->xmind2testcase) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from flask->xmind2testcase) (1.6.3)
Requirement already satisfied: MarkupSafe>=2.0 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from Jinja2>=3.1.2->flask->xmind2testcase) (2.1.3)
Requirement already satisfied: six>=1.5 in /data/data/com.termux/files/usr/lib/python3.11/site-packages (from python-dateutil>=2.7.0->arrow->xmind2testcase) (1.16.0)
Installing collected packages: types-python-dateutil, arrow, xmind2testcase
Successfully installed arrow-1.3.0 types-python-dateutil-2.9.0.20240316 xmind2testcase-1.5.0 ~ $