From 6b2febf66f51796aa2b1bb6269fb31c044d1918a Mon Sep 17 00:00:00 2001 From: luxin Date: Mon, 27 Dec 2021 18:22:49 +0800 Subject: [PATCH] add keywords_must and keywords_forbid --- .../config.json" | 12 +- .../config.json" | 8 +- .../config.json" | 6 +- .../4.IO\344\270\216GUI/config.json" | 15 +- .../config.json" | 4 +- .../1.\351\230\210\345\200\274/config.json" | 6 +- .../config.json" | 7 +- .../config.json" | 7 +- .../config.json" | 6 +- .../5.\350\275\256\345\273\223/config.json" | 6 +- .../config.json" | 4 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 6 +- .../4.\346\242\257\345\272\246/config.json" | 6 +- .../config.json" | 4 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 7 +- .../config.json" | 6 +- .../config.json" | 4 +- .../config.json" | 6 +- .../config.json" | 7 +- .../config.json" | 4 +- .../1.\345\205\211\346\265\201/config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 4 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 6 +- .../config.json" | 4 +- .../config.json" | 4 +- .../config.json" | 4 +- .../config.json" | 4 +- data/config.json | 4 +- data/tree.json | 211 ++++++++++++++---- src/tree.py | 44 ++-- 39 files changed, 378 insertions(+), 98 deletions(-) diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/config.json" index 3817b65..63a61a7 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/1.OpenCV\347\256\200\344\273\213/config.json" @@ -10,7 +10,11 @@ ], "children": [], "node_id": "opencv-626bf6e70ba04d18b1147571c08d85bc", - "title": "OpenCV的起源" + "title": "OpenCV的起源", + "keywords_must": [ + "起源" + ], + "keywords_forbid": [] } } ], @@ -18,5 +22,9 @@ "helloworld.json" ], "node_id": "opencv-77f629e4593845b0bf97e74ca8ec95ae", - "title": "OpenCV简介" + "title": "OpenCV简介", + "keywords_must": [ + "简介" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/2.OpenCV\345\256\211\350\243\205/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/2.OpenCV\345\256\211\350\243\205/config.json" index 32cec89..6103c77 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/2.OpenCV\345\256\211\350\243\205/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/2.OpenCV\345\256\211\350\243\205/config.json" @@ -4,6 +4,10 @@ "node_id": "opencv-662dbd65c89d4ddb9e392f44ffe16e1a", "title": "OpenCV安装", "export": [ - "install.json" - ] + "install.json" + ], + "keywords_must": [ + "安装" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/config.json" index 04e7547..ed426be 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/3.\345\233\276\345\203\217\347\232\204\345\237\272\346\234\254\346\223\215\344\275\234/config.json" @@ -8,5 +8,9 @@ "pixel.json", "hack.json", "ball.json" - ] + ], + "keywords_must": [ + "基本操作" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/config.json" index 5b97461..995ed57 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/4.IO\344\270\216GUI/config.json" @@ -3,9 +3,14 @@ "keywords": [], "children": [], "export": [ - "img_read_write.json", - "video_read_write.json", - "img_buffer_convert.json", - "doodle.json" - ] + "img_read_write.json", + "video_read_write.json", + "img_buffer_convert.json", + "doodle.json" + ], + "keywords_must": [ + "IO", + "GUI" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/config.json" index b7fdf61..e72a12a 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/1.OpenCV\345\237\272\347\241\200/config.json" @@ -1,5 +1,7 @@ { "keywords": [], "node_id": "opencv-f7ecf411195447b3897ff2324f7aa11b", - "title": "OpenCV基础" + "title": "OpenCV基础", + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/1.\351\230\210\345\200\274/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/1.\351\230\210\345\200\274/config.json" index 1c67bff..b86940d 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/1.\351\230\210\345\200\274/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/1.\351\230\210\345\200\274/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "Grayscale.json" - ] + ], + "keywords_must": [ + "阈值" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/config.json" index 2c7075a..f454a38 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/2.\350\205\220\350\232\200\344\270\216\350\206\250\350\203\200/config.json" @@ -4,5 +4,10 @@ "children": [], "export": [ "erosion_dilation.json" - ] + ], + "keywords_must": [ + "腐蚀", + "膨胀" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/config.json" index cac7211..d68bb0d 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/3.\345\274\200\350\277\220\347\256\227\344\270\216\351\227\255\350\277\220\347\256\227/config.json" @@ -5,5 +5,10 @@ "export": [ "open.json", "close.json" - ] + ], + "keywords_must": [ + "开运算", + "闭运算" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/config.json" index fc8fb9e..85f01a6 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/4.\350\277\236\351\200\232\345\214\272\345\237\237\345\210\206\346\236\220/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "connect.json" - ] + ], + "keywords_must": [ + "连通区域分析" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/config.json" index 17385b2..058de7b 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/5.\350\275\256\345\273\223/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "Contours.json" - ] + ], + "keywords_must": [ + "轮廓" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/config.json" index 9c07f63..8fca549 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/2.\344\272\214\345\200\274\345\233\276\345\203\217\345\244\204\347\220\206/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-c761ca9b99984b2d8633855c527ab10a", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/config.json" index 175bb57..8735f2a 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/1.\345\275\251\350\211\262\347\251\272\351\227\264/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "flower.json" - ] + ], + "keywords_must": [ + "彩色空间" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/config.json" index c267260..706468d 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/2.\347\233\264\346\226\271\345\233\276\345\235\207\350\241\241\345\214\226/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "fish.json" - ] + ], + "keywords_must": [ + "均衡化" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/3.\345\233\276\345\203\217\346\273\244\346\263\242/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/3.\345\233\276\345\203\217\346\273\244\346\263\242/config.json" index 18ec2d6..dc5b1f9 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/3.\345\233\276\345\203\217\346\273\244\346\263\242/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/3.\345\233\276\345\203\217\346\273\244\346\263\242/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "BoxFilter.json" - ] + ], + "keywords_must": [ + "图像滤波" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/config.json" index c703cfb..006e7c7 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/4.\346\242\257\345\272\246/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "Gradient.json" - ] + ], + "keywords_must": [ + "梯度" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/config.json" index 4e38056..3ac2fc9 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/3.\345\233\276\345\203\217\345\242\236\345\274\272\345\222\214\346\273\244\346\263\242/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-88ba9fbf01cc42af9561dc99151b351a", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/config.json" index ed38ffc..41374f4 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/1.\344\273\277\345\260\204\345\217\230\346\215\242/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "Affine1.json" - ] + ], + "keywords_must": [ + "仿射变换" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/config.json" index aa9d072..1b13daa 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/2.\345\215\225\345\272\224\346\200\247\345\217\230\346\215\242/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "rust_face.json" - ] + ], + "keywords_must": [ + "单应性" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/config.json" index 1f485e4..5b27fed 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/3.\345\233\276\345\203\217\347\211\271\345\276\201\344\270\216\347\211\271\345\276\201\346\217\220\345\217\226/config.json" @@ -4,5 +4,10 @@ "children": [], "export": [ "harris.json" - ] + ], + "keywords_must": [ + "图像特征", + "特征提取" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/config.json" index 4aa24f5..6dd0331 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/4.\347\211\271\345\276\201\345\214\271\351\205\215/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "match.json" - ] + ], + "keywords_must": [ + "特征匹配" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/config.json" index 37855aa..f4f3341 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/4.\345\207\240\344\275\225\345\217\230\346\215\242\345\222\214\345\233\276\345\203\217\347\211\271\345\276\201/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-ec67edb4eecb44e396d7e7f7163fedb7", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/config.json" index c666b0b..8aeae4f 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/1.\344\272\272\350\204\270\350\257\206\345\210\253/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "face_detect.json" - ] + ], + "keywords_must": [ + "人脸识别" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/config.json" index 1490927..aeb2ad5 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/2.\351\270\237\345\233\276\350\257\206\345\210\253/config.json" @@ -4,5 +4,10 @@ "children": [], "export": [ "detect_bird.json" - ] + ], + "keywords_must": [ + "鸟类", + "鸟图" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/config.json" index 4200546..aae5b6d 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/5.\345\233\276\345\203\217\350\257\206\345\210\253/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-6794162341944f869fcefa767cba00c7", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/config.json" index f36bf84..8e62a3a 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/1.\345\205\211\346\265\201/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "flow.json" - ] + ], + "keywords_must": [ + "光流" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/config.json" index d54cd34..1bbc0b9 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/2.\347\233\256\346\240\207\350\267\237\350\270\252/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "obj_tracker.json" - ] + ], + "keywords_must": [ + "目标跟踪" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/config.json" index 0ea6905..8bf8880 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/6.\350\247\206\351\242\221\345\210\206\346\236\220/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-6bd1f503ebb6418da84be85f4766aa83", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/config.json" index 88e8124..fa6fef6 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/1.\345\233\276\345\203\217\345\210\206\347\261\273/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "classification.json" - ] + ], + "keywords_must": [ + "图像分类" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/2.\347\233\256\346\240\207\346\243\200\346\265\213/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/2.\347\233\256\346\240\207\346\243\200\346\265\213/config.json" index bf3ffbc..e8f9a14 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/2.\347\233\256\346\240\207\346\243\200\346\265\213/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/2.\347\233\256\346\240\207\346\243\200\346\265\213/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "deep_learning_object_detection.json" - ] + ], + "keywords_must": [ + "目标检测" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/3.\344\272\272\350\204\270\346\243\200\346\265\213/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/3.\344\272\272\350\204\270\346\243\200\346\265\213/config.json" index 8efef23..75d3835 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/3.\344\272\272\350\204\270\346\243\200\346\265\213/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/3.\344\272\272\350\204\270\346\243\200\346\265\213/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "detect_faces.json" - ] + ], + "keywords_must": [ + "人脸检测" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/4.\345\247\277\346\200\201\344\274\260\350\256\241/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/4.\345\247\277\346\200\201\344\274\260\350\256\241/config.json" index 87f0caa..19867dd 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/4.\345\247\277\346\200\201\344\274\260\350\256\241/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/4.\345\247\277\346\200\201\344\274\260\350\256\241/config.json" @@ -4,5 +4,9 @@ "children": [], "export": [ "attitude_estimation.json" - ] + ], + "keywords_must": [ + "姿态估计" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/config.json" index c08b59e..a40f0c3 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/5.\350\275\246\350\276\206\346\243\200\346\265\213/config.json" @@ -4,5 +4,9 @@ "export": [ "opencv-yolo-inference-vehicle.json" ], - "node_id": "opencv-d3ca3567cef647b9bb960d7216361351" + "node_id": "opencv-d3ca3567cef647b9bb960d7216361351", + "keywords_must": [ + "车辆检测" + ], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/config.json" index ad8029b..6abb241 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/7.OpenCV\344\270\255\347\232\204\346\267\261\345\272\246\345\255\246\344\271\240/config.json" @@ -1,4 +1,6 @@ { "node_id": "opencv-81b455e5341a4d26863ee2519c9b2d70", - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/1.OpenCV\345\210\235\351\230\266/config.json" "b/data/1.OpenCV\345\210\235\351\230\266/config.json" index f87da78..46f2d18 100644 --- "a/data/1.OpenCV\345\210\235\351\230\266/config.json" +++ "b/data/1.OpenCV\345\210\235\351\230\266/config.json" @@ -2,5 +2,7 @@ "export": [], "node_id": "opencv-b943de85e3ad494885f0b4b529053c5a", "title": "OpenCV初阶", - "keywords":[] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/2.OpenCV\344\270\255\351\230\266/config.json" "b/data/2.OpenCV\344\270\255\351\230\266/config.json" index c16af78..b377982 100644 --- "a/data/2.OpenCV\344\270\255\351\230\266/config.json" +++ "b/data/2.OpenCV\344\270\255\351\230\266/config.json" @@ -2,5 +2,7 @@ "export": [], "keywords": [], "node_id": "opencv-e92c03e7b84c4c4ea7d23a2c32b88932", - "title": "OpenCV中阶" + "title": "OpenCV中阶", + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git "a/data/3.OpenCV\351\253\230\351\230\266/config.json" "b/data/3.OpenCV\351\253\230\351\230\266/config.json" index 315932b..0880b9b 100644 --- "a/data/3.OpenCV\351\253\230\351\230\266/config.json" +++ "b/data/3.OpenCV\351\253\230\351\230\266/config.json" @@ -2,5 +2,7 @@ "export": [], "keywords": [], "node_id": "opencv-f27da6fd72924d1fbd05c6aff0fed4b7", - "title": "OpenCV高阶" + "title": "OpenCV高阶", + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git a/data/config.json b/data/config.json index be1e62f..59b92a3 100644 --- a/data/config.json +++ b/data/config.json @@ -2,5 +2,7 @@ "tree_name": "opencv", "keywords": [], "title": "OpenCV", - "node_id": "opencv-22ad85b4166044c897cd32f625d21001" + "node_id": "opencv-22ad85b4166044c897cd32f625d21001", + "keywords_must": [], + "keywords_forbid": [] } \ No newline at end of file diff --git a/data/tree.json b/data/tree.json index 888cddd..85f7a0d 100644 --- a/data/tree.json +++ b/data/tree.json @@ -27,17 +27,29 @@ ], "children": [], "node_id": "opencv-626bf6e70ba04d18b1147571c08d85bc", - "title": "OpenCV的起源" + "title": "OpenCV的起源", + "keywords_must": [ + "起源" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [ + "简介" + ], + "keywords_forbid": [] } }, { "OpenCV安装": { "node_id": "opencv-662dbd65c89d4ddb9e392f44ffe16e1a", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "安装" + ], + "keywords_forbid": [] } }, { @@ -46,17 +58,28 @@ "keywords": [ "OpenCV颜色空间" ], - "children": [] + "children": [], + "keywords_must": [ + "基本操作" + ], + "keywords_forbid": [] } }, { "IO与GUI": { "node_id": "opencv-04cf975c42894174bd5619ed44ea5e87", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "IO", + "GUI" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -68,38 +91,62 @@ "阈值": { "node_id": "opencv-b77391c3fa5648f4bb92e990d6cf1922", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "阈值" + ], + "keywords_forbid": [] } }, { "腐蚀与膨胀": { "node_id": "opencv-43cb627865154bb69eaad017845e8944", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "腐蚀", + "膨胀" + ], + "keywords_forbid": [] } }, { "开运算与闭运算": { "node_id": "opencv-50c11401b1e8431c964f0771cfe7941b", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "开运算", + "闭运算" + ], + "keywords_forbid": [] } }, { "连通区域分析": { "node_id": "opencv-4fa8c9dee0b04714b3a9ac7ba402be5b", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "连通区域分析" + ], + "keywords_forbid": [] } }, { "轮廓": { "node_id": "opencv-9f13f163a994474a9edafc12adcfe529", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "轮廓" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -111,31 +158,49 @@ "彩色空间": { "node_id": "opencv-996898f197114cd3b4195cc6de7edc42", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "彩色空间" + ], + "keywords_forbid": [] } }, { "直方图均衡化": { "node_id": "opencv-42497d66251142e58892ffdd81a59d5a", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "均衡化" + ], + "keywords_forbid": [] } }, { "图像滤波": { "node_id": "opencv-ff01e231d0234005b8167d63652c827b", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "图像滤波" + ], + "keywords_forbid": [] } }, { "梯度": { "node_id": "opencv-bc6db682e6744c048c801360db22b182", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "梯度" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -147,31 +212,50 @@ "仿射变换": { "node_id": "opencv-2ee9206f0d84472cb0458b4c5fd695cc", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "仿射变换" + ], + "keywords_forbid": [] } }, { "单应性变换": { "node_id": "opencv-39059ce222a240309afeb5b18dfe528e", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "单应性" + ], + "keywords_forbid": [] } }, { "图像特征与特征提取": { "node_id": "opencv-fde1c160abc94e49bb7811fa6b90b9a7", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "图像特征", + "特征提取" + ], + "keywords_forbid": [] } }, { "特征匹配": { "node_id": "opencv-47d476b32cc94ce48346eebaf03a61ae", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "特征匹配" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -183,17 +267,28 @@ "人脸识别": { "node_id": "opencv-cc6f5f3a5c2d494c8574a55c8e43c237", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "人脸识别" + ], + "keywords_forbid": [] } }, { "鸟图识别": { "node_id": "opencv-c20cf8a094924526931da798e2642418", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "鸟类", + "鸟图" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -205,17 +300,27 @@ "光流": { "node_id": "opencv-e7cb65bb329040e98c85d2888f18d8bb", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "光流" + ], + "keywords_forbid": [] } }, { "目标跟踪": { "node_id": "opencv-2959bd73f3894090b4a65be4fe8faff6", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "目标跟踪" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { @@ -227,57 +332,87 @@ "图像分类": { "node_id": "opencv-a181ede3b8c7487fbcc212796c27ce77", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "图像分类" + ], + "keywords_forbid": [] } }, { "目标检测": { "node_id": "opencv-92964722395c4b9f989694211b07df44", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "目标检测" + ], + "keywords_forbid": [] } }, { "人脸检测": { "node_id": "opencv-a05295f5c1b94fdcaa370a45621cd5a5", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "人脸检测" + ], + "keywords_forbid": [] } }, { "姿态估计": { "node_id": "opencv-8bcc98575f3b4325b84fcb623916e3d2", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "姿态估计" + ], + "keywords_forbid": [] } }, { "车辆检测": { "node_id": "opencv-d3ca3567cef647b9bb960d7216361351", "keywords": [], - "children": [] + "children": [], + "keywords_must": [ + "车辆检测" + ], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } }, { "OpenCV中阶": { "node_id": "opencv-e92c03e7b84c4c4ea7d23a2c32b88932", "keywords": [], - "children": [] + "children": [], + "keywords_must": [], + "keywords_forbid": [] } }, { "OpenCV高阶": { "node_id": "opencv-f27da6fd72924d1fbd05c6aff0fed4b7", "keywords": [], - "children": [] + "children": [], + "keywords_must": [], + "keywords_forbid": [] } } - ] + ], + "keywords_must": [], + "keywords_forbid": [] } } \ No newline at end of file diff --git a/src/tree.py b/src/tree.py index 3891238..99a6936 100644 --- a/src/tree.py +++ b/src/tree.py @@ -109,7 +109,9 @@ class TreeWalker: root_node = { "node_id": root["node_id"], "keywords": root["keywords"], - "children": [] + "children": [], + "keywords_must": root["keywords_must"], + "keywords_forbid": root["keywords_forbid"] } self.tree[root["tree_name"]] = root_node self.load_levels(root_node) @@ -164,6 +166,8 @@ class TreeWalker: "node_id": config["node_id"], "keywords": config["keywords"], "children": [], + "keywords_must": config["keywords_must"], + "keywords_forbid": config["keywords_forbid"] } } @@ -215,6 +219,8 @@ class TreeWalker: "tree_name": self.name, "keywords": [], "node_id": self.gen_node_id(), + "keywords_must": [], + "keywords_forbid": [] } dump_json(config_path, config, exist_ok=True, override=True) else: @@ -244,7 +250,9 @@ class TreeWalker: if not os.path.exists(config_path): config = { "node_id": self.gen_node_id(), - "keywords": [] + "keywords": [], + "keywords_must": [], + "keywords_forbid": [] } dump_json(config_path, config, exist_ok=True, override=True) else: @@ -310,6 +318,8 @@ class TreeWalker: "node_id": config["node_id"], "keywords": config["keywords"], "children": [], + "keywords_must": config["keywords_must"], + "keywords_forbid": config["keywords_forbid"] } } return num, result @@ -321,7 +331,9 @@ class TreeWalker: name: { "node_id": config["node_id"], "keywords": config["keywords"], - "children": config.get("children", []) + "children": config.get("children", []), + "keywords_must": config["keywords_must"], + "keywords_forbid": config["keywords_forbid"] } } # if "children" in config: @@ -367,20 +379,18 @@ class TreeWalker: with open(meta_path) as f: content = f.read() if content: - try: - meta = json.loads(content) - if "exercise_id" not in meta: - meta["exercise_id"] = uuid.uuid4().hex - if "notebook_enable" not in meta: - meta["notebook_enable"] = self.default_notebook() - if "source" not in meta: - meta["source"] = source - if "author" not in meta: - meta["author"] = user_name(md_file, self.authors) - if "type" not in meta: - meta["type"] = "code_options" - except: - pass + meta = json.loads(content) + if "exercise_id" not in meta: + meta["exercise_id"] = uuid.uuid4().hex + if "notebook_enable" not in meta: + meta["notebook_enable"] = self.default_notebook() + if "source" not in meta: + meta["source"] = source + if "author" not in meta: + meta["author"] = user_name(md_file, self.authors) + if "type" not in meta: + meta["type"] = "code_options" + if meta is None: meta = { "type": "code_options", -- GitLab