MySQL 表结构生成 Markdown 文档 | 工具篇

2021-12-31 14:09:22 +08:00
 AlicFeng

mysql_markdown

It can generate markdown structure documents of MySQL succinctly~


背景

在实施软件工程的时候,当要将某一版本归档时,需要汇总的文档要求还是比较高的、各类文档齐全,包括项目架构、项目安装、接口等文档,而数据库表结构说明文档亦属于其一。记得很早之前想找一个可以导出 MySQL 数据库表结构说明文档的工具,生态上的这种工具是有的、只不过并没有一个使我比较满足的。当然、看个人所需,我需要一个可以导出 markdown 文档的。

于是 mysql_markdown 就出现了、应用而生。它是一款基于 go 语言编写的一个命令行工具,适用于 LinuxMacWindows等平台。**那么它可以做什么?他只有一个功能、就是生成数据库表结构说明文档,格式为markdown**。

安装

releases download

使用

# 帮助函数
➜  mysql_markdown -h
flag needs an argument: -h
Usage: mysql_markdown [options...]
--help  This help text
-h      host.     default 127.0.0.1
-u      username. default root
-p      password. default root
-d      database. default mysql
-P      port.     default 3306
-c      charset.  default utf8
-o      output.   default current location
-t      tables.   default all table and support ',' separator for filter, every item can use regexp

# 简单使用
➜ mysql_markdown -p samego -d samego
mysql connected ...
1/8 the demo table is making ...
2/8 the failed_jobs table is making ...
3/8 the migrations table is making ...
4/8 the password_resets table is making ...
5/8 the roles table is making ...
6/8 the user table is making ...
7/8 the userinfo table is making ...
8/8 the users table is making ...
mysql_markdown finished ...

md2anyDoc

md 转其它类型的文档推荐使用 typora 工具 它支持如下转换格式

文档页面效果

生成的 MD 文件

MD 文件转 PDF

人工智能 视觉算法 数据标注 AI 时间量子 领航数据 SameGo

1076 次点击
所在节点    开源软件
4 条回复
darksheep9527
2022-01-01 20:36:10 +08:00
感谢,毕业设计写文档用的上
AlicFeng
2022-01-01 20:52:51 +08:00
@darksheep9527 客气了😄价值源于技术、技术源于分享
guisheng
2022-04-06 16:31:26 +08:00
win 不可用吗?我都已经源码编译了
guisheng
2022-04-06 16:47:26 +08:00
@guisheng 好吧 可以了。。。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/825503

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX