使用SQL文件自动生成markdown格式的数据库文档。
-
使用git克隆该项目
-
从数据库中导出sql文件,请尽量导出只有表结构无表数据的sql文件
-
在项目目录下运行:
python build.py sql_dir
其中sql_dir为您的sql文件路径 -
生成成功的md文件,在项目的md文件夹中,文件名同您的sql文件名
使用SQL文件自动生成markdown格式的数据库文档。
使用SQL文件自动生成markdown格式的数据库文档。
使用git克隆该项目
从数据库中导出sql文件,请尽量导出只有表结构无表数据的sql文件
在项目目录下运行:
python build.py sql_dir
其中sql_dir为您的sql文件路径
生成成功的md文件,在项目的md文件夹中,文件名同您的sql文件名
如题,可否增加一个DEMO样式可供便捷查看
建议将 md 文件夹加入 git, 或者将结果目录作为参数传入。
$ python build.py ../zerg201806121023.sql
File "build.py", line 19
except IOError, e:
^
SyntaxError: invalid syntax
D:\AutoBuildDocFromDB>python build.py golems.sql
Traceback (most recent call last):
File "build.py", line 38, in
text = markdown_build.buildMarkdown(table_data)
File "D:\AutoBuildDocFromDB\MarkdownBuildClass.py", line 13, in buildMarkdown
text = text + '## ' + table[0][0] + '琛?' + table[0][1] + ')\n'
IndexError: list index out of range
建议使用|:---:|:---:|:---:|
替换 |:--:|:--:|:--:|
,即增加一个短横。
多谢楼主
/*
Navicat MySQL Data Transfer
Source Server : 120.25.106.228_3306
Source Server Version : 50616
Source Host : 120.25.106.228:3306
Source Database : ggly-province-v5
Target Server Type : MYSQL
Target Server Version : 50616
File Encoding : 65001
Date: 2017-08-03 08:44:11
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `t_1`
-- ----------------------------
DROP TABLE IF EXISTS `t_1`;
CREATE TABLE `t_1` (
`id` int(11) NOT NULL ,
`code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`playurl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci;
手动把parserColumn中的
column_type = tmp_list[1]
改成column_type = tmp_list[2]
即可
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.