From d9f3d52f1f15a273dfc8e7a28d50b3fbcbc09540 Mon Sep 17 00:00:00 2001 From: Mars Liu Date: Tue, 11 Jan 2022 20:58:06 +0800 Subject: [PATCH] add hook and uniform parser --- .pre-commit-config.yaml | 2 +- .../1.rust\347\256\200\344\273\213/config.json" | 2 +- main.py | 5 +---- requirement.txt | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fcecf4..6ab3bc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: git@codechina.csdn.net:csdn/skill_tree_hook.git - rev: c1fbfe8805a7754a9d5c85bcf0b112ddad086075 + rev: 450097b0e3d8b23d98a9ecc61bb104bb9124876b hooks: - id: pre-commit verbose: true \ No newline at end of file diff --git "a/data/1.rust\345\210\235\351\230\266/1.\351\242\204\345\244\207\347\237\245\350\257\206/1.rust\347\256\200\344\273\213/config.json" "b/data/1.rust\345\210\235\351\230\266/1.\351\242\204\345\244\207\347\237\245\350\257\206/1.rust\347\256\200\344\273\213/config.json" index 16b2921..780849e 100644 --- "a/data/1.rust\345\210\235\351\230\266/1.\351\242\204\345\244\207\347\237\245\350\257\206/1.rust\347\256\200\344\273\213/config.json" +++ "b/data/1.rust\345\210\235\351\230\266/1.\351\242\204\345\244\207\347\237\245\350\257\206/1.rust\347\256\200\344\273\213/config.json" @@ -1,6 +1,6 @@ { "node_id": "rust-7c394f164d8f44519521f03db08a1321", - "keywords": [], + "keywords": ["rust", "基本语法", "hello"], "children": [ { "Rust的起源": { diff --git a/main.py b/main.py index de17f65..a549b47 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- -from json import load -from src.tree import TreeWalker, load_json, dump_json +from skill_tree.tree import TreeWalker -import os -import re if __name__ == '__main__': walker = TreeWalker("data", "rust", "rust") diff --git a/requirement.txt b/requirement.txt index f060081..0f13d4d 100644 --- a/requirement.txt +++ b/requirement.txt @@ -1,2 +1,3 @@ pre_commit~=2.16.0 -GitPython~=3.1.24 \ No newline at end of file +GitPython~=3.1.24 +skill-tree-parser~=0.0.3 \ No newline at end of file -- GitLab