From 551e2a1865f01b043c7edf10a7583420d4563b5d Mon Sep 17 00:00:00 2001 From: feilong Date: Wed, 30 Mar 2022 21:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E6=88=90=E5=AD=A6=E4=B9=A0=E5=8C=85?= =?UTF-8?q?=E5=92=8C=E6=8A=80=E8=83=BD=E6=A0=91=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/index.json | 242 +++++++++++++++++++++++++++ data/package/job/algo.json | 16 +- data/package/job/android.json | 5 +- data/package/job/architecture.json | 24 ++- data/package/job/bi.json | 73 ++++---- data/package/job/big_data.json | 24 ++- data/package/job/cpp.json | 19 ++- data/package/job/crawler.json | 19 ++- data/package/job/devops.json | 19 ++- data/package/job/go_backend.json | 21 ++- data/package/job/ios.json | 19 ++- data/package/job/java_backend.json | 13 +- data/package/job/machine_vision.json | 23 ++- data/package/job/nlp.json | 20 ++- data/package/job/php.json | 25 ++- data/package/job/product.json | 10 +- data/package/job/search.json | 21 ++- data/package/job/test.json | 14 +- data/package/job/web.json | 3 +- main.py | 3 +- src/main/package.py | 37 ++++ 21 files changed, 539 insertions(+), 111 deletions(-) create mode 100644 data/index.json diff --git a/data/index.json b/data/index.json new file mode 100644 index 0000000..f1c7740 --- /dev/null +++ b/data/index.json @@ -0,0 +1,242 @@ +{ + "jobs": [ + { + "name": "C++工程师", + "level_name": "入门", + "router": "cpp_01" + }, + { + "name": "C++工程师", + "level_name": "进阶", + "router": "cpp_02" + }, + { + "name": "Java后端工程师", + "level_name": "入门", + "router": "javabf_01" + }, + { + "name": "Java后端工程师", + "level_name": "进阶", + "router": "javabf_02" + }, + { + "name": "Android工程师", + "level_name": "入门", + "router": "android_01" + }, + { + "name": "Android工程师", + "level_name": "进阶", + "router": "android_02" + }, + { + "name": "运维工程师", + "level_name": "入门", + "router": "devops_01" + }, + { + "name": "运维工程师", + "level_name": "进阶", + "router": "devops_02" + }, + { + "name": "搜索工程师", + "level_name": "入门", + "router": "search_01" + }, + { + "name": "搜索工程师", + "level_name": "进阶", + "router": "search_02" + }, + { + "name": "爬虫工程师", + "level_name": "入门", + "router": "crawler_01" + }, + { + "name": "爬虫工程师", + "level_name": "进阶", + "router": "crawler_02" + }, + { + "name": "Go后端工程师", + "level_name": "入门", + "router": "go_01" + }, + { + "name": "Go后端工程师", + "level_name": "进阶", + "router": "go_02" + }, + { + "name": "机器视觉工程师", + "level_name": "入门", + "router": "machinevision_01" + }, + { + "name": "机器视觉工程师", + "level_name": "进阶", + "router": "machinevision_02" + }, + { + "name": "测试工程师", + "level_name": "入门", + "router": "test_01" + }, + { + "name": "测试工程师", + "level_name": "进阶", + "router": "test_02" + }, + { + "name": "BI 工程师", + "level_name": "入门", + "router": "bi_01" + }, + { + "name": "BI 工程师", + "level_name": "进阶", + "router": "bi_02" + }, + { + "name": "PHP工程师", + "level_name": "入门", + "router": "php_01" + }, + { + "name": "PHP工程师", + "level_name": "进阶", + "router": "php_02" + }, + { + "name": "前端工程师", + "level_name": "入门", + "router": "web_01" + }, + { + "name": "前端工程师", + "level_name": "进阶", + "router": "web_02" + }, + { + "name": "iOS工程师", + "level_name": "入门", + "router": "ios_01" + }, + { + "name": "iOS工程师", + "level_name": "进阶", + "router": "ios_02" + }, + { + "name": "后端构架师", + "level_name": "入门", + "router": "archit_01" + }, + { + "name": "后端构架师", + "level_name": "进阶", + "router": "archit_02" + }, + { + "name": "产品", + "level_name": "入门", + "router": "product_01" + }, + { + "name": "产品", + "level_name": "进阶", + "router": "product_02" + }, + { + "name": "大数据工程师", + "level_name": "入门", + "router": "bigdata_01" + }, + { + "name": "大数据工程师", + "level_name": "进阶", + "router": "bigdata_02" + }, + { + "name": "自然语言处理工程师", + "level_name": "入门", + "router": "nlp_01" + }, + { + "name": "自然语言处理工程师", + "level_name": "进阶", + "router": "nlp_02" + }, + { + "name": "运营", + "level_name": "入门", + "router": "operations_01" + }, + { + "name": "运营", + "level_name": "进阶", + "router": "operations_02" + }, + { + "name": "算法工程师", + "level_name": "入门", + "router": "algo_01" + }, + { + "name": "算法工程师", + "level_name": "进阶", + "router": "algo_02" + } + ], + "trees": [ + "ai", + "algorithm", + "algorithm02", + "android", + "c", + "cassandra", + "cloud_native", + "cpp", + "devops", + "distrubute", + "flutter", + "gml", + "go", + "goplus", + "hadoop", + "java", + "k8s", + "kafka", + "mongodb", + "mq", + "mysql", + "neo4j", + "network", + "nginx", + "nlp", + "opencv", + "operation", + "operations", + "pg", + "php", + "product", + "python", + "python02", + "react", + "redis", + "rust", + "scala", + "search", + "spark", + "springboot", + "springcloud", + "swift", + "test", + "vue", + "web", + "weixin" + ] +} \ No newline at end of file diff --git a/data/package/job/algo.json b/data/package/job/algo.json index add9075..b254cf6 100644 --- a/data/package/job/algo.json +++ b/data/package/job/algo.json @@ -10,10 +10,17 @@ "level_id": "pkg-algo-level-1b8296e8c947421981ca1f4ea920878a", "skill_trees": [ "gml", + "c", "algorithm", - "c" + "python", + "mysql" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "c", + "algorithm", + "python" + ] }, { "level": "02", @@ -23,7 +30,10 @@ "python02", "ai" ], - "recommend_skill_trees": [], + "recommend_skill_trees": [ + "algorithm02", + "python02" + ], "level_id": "pkg-algo-level-0e0f4c2d372c4be6a4954c1e8e29a3bc" } ] diff --git a/data/package/job/android.json b/data/package/job/android.json index f8cee11..8223400 100644 --- a/data/package/job/android.json +++ b/data/package/job/android.json @@ -11,7 +11,8 @@ "skill_trees": [ "gml", "java", - "android" + "android", + "web" ], "recommend_skill_trees": [] }, @@ -19,7 +20,7 @@ "level": "02", "level_name": "进阶", "skill_trees": [ - "react", + "vue", "weixin", "flutter" ], diff --git a/data/package/job/architecture.json b/data/package/job/architecture.json index badc2b1..1857230 100644 --- a/data/package/job/architecture.json +++ b/data/package/job/architecture.json @@ -10,28 +10,36 @@ "level_id": "pkg-archit-level-634117d27ab1492db3d6e973e122f8c3", "skill_trees": [ "gml", - "algorithm", "network", - "java", + "devops", + "springboot", "nginx", - "devops" + "mysql", + "redis", + "mq" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "network", + "pg", + "cloud_native" + ] }, { "level": "02", "level_name": "进阶", "skill_trees": [ - "springboot", "springcloud", - "mysql", "pg", "mongodb", + "distrubute", "go", - "node.js", "cloud_native" ], - "recommend_skill_trees": [], + "recommend_skill_trees": [ + "pg", + "cloud_native" + ], "level_id": "pkg-archit-level-ce6121fa7a9c4a58aa9852da2bac850f" } ] diff --git a/data/package/job/bi.json b/data/package/job/bi.json index 673224e..ab70cc3 100644 --- a/data/package/job/bi.json +++ b/data/package/job/bi.json @@ -1,39 +1,38 @@ { - "type": "job", - "package": "bi", - "package_name": "BI 工程师", - "package_id": "pkg-bi-9a7a46b309f34c9bb6265a38201107fb", - "levels": [ - { - "level": "01", - "level_name": "入门", - "level_id": "pkg-bi-level-76c708906e844631a0083e4d8b8749ae", - "skill_trees": [ - "gml", - "python", - "algorithm", - "mysql" - ], - "recommend_skill_trees": [ - "python02", - "algorithm02", - "pg" - ] - }, - { - "level": "02", - "level_name": "进阶", - "skill_trees": [ - "gml", - "python", - "algorithm" - ], - "recommend_skill_trees": [ - "python02", - "algorithm02", - "pg" - ], - "level_id": "pkg-bi-level-0046fafee14640c7b5aa29cc97b17a8a" - } - ] + "type": "job", + "package": "bi", + "package_name": "BI 工程师", + "package_id": "pkg-bi-9a7a46b309f34c9bb6265a38201107fb", + "levels": [ + { + "level": "01", + "level_name": "入门", + "level_id": "pkg-bi-level-76c708906e844631a0083e4d8b8749ae", + "skill_trees": [ + "gml", + "python", + "mysql" + ], + "recommend_skill_trees": [ + "gml", + "python", + "pg" + ] + }, + { + "level": "02", + "level_name": "进阶", + "skill_trees": [ + "redis", + "pg", + "mongodb", + "hadoop", + "scala" + ], + "recommend_skill_trees": [ + "pg" + ], + "level_id": "pkg-bi-level-0046fafee14640c7b5aa29cc97b17a8a" + } + ] } \ No newline at end of file diff --git a/data/package/job/big_data.json b/data/package/job/big_data.json index c297a07..01bb0a9 100644 --- a/data/package/job/big_data.json +++ b/data/package/job/big_data.json @@ -10,16 +10,30 @@ "level_id": "pkg-bigdata-level-c208cec9d183455588265813fcdf56bd", "skill_trees": [ "gml", - "algorithm", - "java" + "python", + "mysql", + "redis", + "java", + "hadoop" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "python", + "java" + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "scala", + "spark", + "kafka", + "cassandra" + ], + "recommend_skill_trees": [ + "pg" + ], "level_id": "pkg-bigdata-level-8e2a8fb109424596a667bcc613db93c1" } ] diff --git a/data/package/job/cpp.json b/data/package/job/cpp.json index 21c060a..2165370 100644 --- a/data/package/job/cpp.json +++ b/data/package/job/cpp.json @@ -10,16 +10,29 @@ "level_id": "pkg-cpp-level-6205ebd891544d8cadab543433b3b951", "skill_trees": [ "gml", + "c", "algorithm", + "network", + "cpp" + ], + "recommend_skill_trees": [ + "gml", "c", + "algorithm", "network" - ], - "recommend_skill_trees": [] + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], + "skill_trees": [ + "rust", + "go", + "devops", + "mysql", + "pg", + "redis" + ], "recommend_skill_trees": [], "level_id": "pkg-cpp-level-0aef5db1bcca497789fbc1ab8863bd7d" } diff --git a/data/package/job/crawler.json b/data/package/job/crawler.json index 832d083..bba476e 100644 --- a/data/package/job/crawler.json +++ b/data/package/job/crawler.json @@ -10,12 +10,18 @@ "level_id": "pkg-crawler-level-2d99f3f4e3e3416092f46f8b901efae1", "skill_trees": [ "gml", - "python", "algorithm", + "python", "mysql", - "network" + "network", + "web" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "algorithm", + "python", + "network" + ] }, { "level": "02", @@ -23,10 +29,13 @@ "skill_trees": [ "python02", "algorithm02", - "web", + "mysql" + ], + "recommend_skill_trees": [ + "python02", + "algorithm02", "pg" ], - "recommend_skill_trees": [], "level_id": "pkg-crawler-level-6035cb39f6d14637810beaeb8fecb168" } ] diff --git a/data/package/job/devops.json b/data/package/job/devops.json index de28fb8..29e0235 100644 --- a/data/package/job/devops.json +++ b/data/package/job/devops.json @@ -11,21 +11,28 @@ "skill_trees": [ "gml", "python", - "mysql" + "network", + "mysql", + "devops" ], "recommend_skill_trees": [ - "devops", - "cloud_native", - "pg" + "gml", + "network" ] }, { "level": "02", "level_name": "进阶", "skill_trees": [ - "network02" + "pg", + "cloud_native", + "k8s" + ], + "recommend_skill_trees": [ + "cloud_native", + "pg", + "k8s" ], - "recommend_skill_trees": [], "level_id": "pkg-devops-level-5c902f5daeb44c96811e791e3bf1a90a" } ] diff --git a/data/package/job/go_backend.json b/data/package/job/go_backend.json index 6300e09..d63684e 100644 --- a/data/package/job/go_backend.json +++ b/data/package/job/go_backend.json @@ -11,15 +11,28 @@ "skill_trees": [ "gml", "algorithm", - "network" + "network", + "go" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "algorithm", + "network" + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "c", + "goplus", + "rust", + "cloud_native" + ], + "recommend_skill_trees": [ + "c", + "cloud_native" + ], "level_id": "pkg-go-level-d2faef92de2042e79f0cb16d3016c10c" } ] diff --git a/data/package/job/ios.json b/data/package/job/ios.json index b99906e..e1eea2d 100644 --- a/data/package/job/ios.json +++ b/data/package/job/ios.json @@ -8,14 +8,25 @@ "level": "01", "level_name": "入门", "level_id": "pkg-ios-level-dd40b98b3ede4f738ac67b72b985b8b5", - "skill_trees": [], - "recommend_skill_trees": [] + "skill_trees": [ + "web", + "swift" + ], + "recommend_skill_trees": [ + "java" + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "vue", + "weixin", + "flutter" + ], + "recommend_skill_trees": [ + "web" + ], "level_id": "pkg-ios-level-17042027e678450f95732320c7ed023d" } ] diff --git a/data/package/job/java_backend.json b/data/package/job/java_backend.json index c2168c7..b4e6d39 100644 --- a/data/package/job/java_backend.json +++ b/data/package/job/java_backend.json @@ -18,8 +18,7 @@ "recommend_skill_trees": [ "gml", "algorithm", - "java", - "springboot" + "java" ] }, { @@ -27,17 +26,13 @@ "level_name": "进阶", "level_id": "pkg-javabf-level-91f3e6a6f5624acfb422f3951177cb6e", "skill_trees": [ - "gml", - "algorithm", - "java", - "springboot", - "mysql" + "springcloud", + "pg" ], "recommend_skill_trees": [ "gml", "algorithm", - "java", - "springboot" + "java" ] } ] diff --git a/data/package/job/machine_vision.json b/data/package/job/machine_vision.json index 43d7674..3d3833e 100644 --- a/data/package/job/machine_vision.json +++ b/data/package/job/machine_vision.json @@ -11,15 +11,30 @@ "skill_trees": [ "gml", "algorithm", - "c" + "c", + "python", + "opencv" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "algorithm", + "c", + "python", + "opencv" + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "python02", + "nlp", + "neo4j" + ], + "recommend_skill_trees": [ + "python02", + "neo4j" + ], "level_id": "pkg-machinevision-level-bbcc2444f218474aa445df6ca08c5cfb" } ] diff --git a/data/package/job/nlp.json b/data/package/job/nlp.json index 7ca51fc..1acda2d 100644 --- a/data/package/job/nlp.json +++ b/data/package/job/nlp.json @@ -10,15 +10,29 @@ "level_id": "pkg-nlp-level-5317f0fbf4414d87b6d028e421d16396", "skill_trees": [ "gml", - "algorithm" + "algorithm", + "python", + "python02" ], "recommend_skill_trees": [] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "nlp", + "opencv", + "neo4j", + "spark", + "mysql", + "redis", + "pg" + ], + "recommend_skill_trees": [ + "opencv", + "neo4j", + "pg" + ], "level_id": "pkg-nlp-level-4f5c84c95f26440393a69a4181d03a65" } ] diff --git a/data/package/job/php.json b/data/package/job/php.json index e46b36e..8a4193d 100644 --- a/data/package/job/php.json +++ b/data/package/job/php.json @@ -8,14 +8,31 @@ "level": "01", "level_name": "入门", "level_id": "pkg-php-level-c8c35ceafdc447198f15f628a745699f", - "skill_trees": [], - "recommend_skill_trees": [] + "skill_trees": [ + "gml", + "web", + "php", + "mysql" + ], + "recommend_skill_trees": [ + "gml", + "pg" + ] }, { "level": "02", "level_name": "进阶", - "skill_trees": [], - "recommend_skill_trees": [], + "skill_trees": [ + "go", + "java", + "springboot", + "pg", + "mongodb" + ], + "recommend_skill_trees": [ + "java", + "pg" + ], "level_id": "pkg-php-level-3a99b53332c9429b8f32669e74ab9f35" } ] diff --git a/data/package/job/product.json b/data/package/job/product.json index 62c6234..2469a15 100644 --- a/data/package/job/product.json +++ b/data/package/job/product.json @@ -11,15 +11,19 @@ "skill_trees": [ "product" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "se" + ] }, { "level": "02", "level_name": "进阶", "skill_trees": [ - "se" + "operation" + ], + "recommend_skill_trees": [ + "se02" ], - "recommend_skill_trees": [], "level_id": "pkg-product-level-995424592df44bc99c88233f341bde94" } ] diff --git a/data/package/job/search.json b/data/package/job/search.json index 1cf86f4..0d22fcf 100644 --- a/data/package/job/search.json +++ b/data/package/job/search.json @@ -12,17 +12,30 @@ "gml", "algorithm", "java", - "search" + "search", + "python", + "mysql" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "algorithm", + "java", + "python" + ] }, { "level": "02", "level_name": "进阶", "skill_trees": [ - "elastic" + "python02", + "nlp", + "pg", + "redis" + ], + "recommend_skill_trees": [ + "python02", + "pg" ], - "recommend_skill_trees": [], "level_id": "pkg-search-level-e3ddce54bc304fc290a76a437fd4791c" } ] diff --git a/data/package/job/test.json b/data/package/job/test.json index 2401aa4..fcd17ba 100644 --- a/data/package/job/test.json +++ b/data/package/job/test.json @@ -10,20 +10,24 @@ "level_id": "pkg-test-level-8207808da42c4869b7235e0df8e88a72", "skill_trees": [ "gml", - "web", "python", - "gml" + "test" ], - "recommend_skill_trees": [] + "recommend_skill_trees": [ + "gml", + "python" + ] }, { "level": "02", "level_name": "进阶", "skill_trees": [ - "java" + "web", + "mysql", + "devops" ], "recommend_skill_trees": [ - "network02" + "pg" ], "level_id": "pkg-test-level-85e8c4269c4f4e23b6012ebc8d31e05f" } diff --git a/data/package/job/web.json b/data/package/job/web.json index 3546c46..d4034c3 100644 --- a/data/package/job/web.json +++ b/data/package/job/web.json @@ -19,8 +19,9 @@ "level": "02", "level_name": "进阶", "skill_trees": [ + "weixin", "react", - "weixin" + "flutter" ], "recommend_skill_trees": [], "level_id": "pkg-web-level-7d906e7132dd43438cd70216f697999e" diff --git a/main.py b/main.py index 9b1957c..93992d9 100644 --- a/main.py +++ b/main.py @@ -2,4 +2,5 @@ from src.main.package import Package if __name__ == '__main__': p = Package('data/package/') - p.walk() + # p.walk() + p.list() diff --git a/src/main/package.py b/src/main/package.py index 394122a..e223ab8 100644 --- a/src/main/package.py +++ b/src/main/package.py @@ -28,3 +28,40 @@ class Package: if level.get('level_id') is None or level.get('level_id') == '': level['level_id'] = f'pkg-{pacakge}-level-'+uuid.uuid4().hex dump_json(file_full_name, pkg, exist_ok=True, override=True) + + def list(self): + pkg_list = [] + tree_list = [] + for base, dirs, files in os.walk(self.root): + for file_name in files: + file_full_name = os.path.join(base, file_name) + _, ext = os.path.splitext(file_name) + if ext == '.json': + print(file_full_name) + pkg = load_json(file_full_name) + if pkg.get('type') == 'job': + self.list_package(file_full_name, pkg, + pkg_list, tree_list) + out = { + 'jobs': pkg_list, + 'trees': sorted(list(set(tree_list))) + } + dump_json('data/index.json', out, exist_ok=True, override=True) + + def list_package(self, file_full_name, pkg, pkg_list, tree_list): + package = pkg['package'] + package_name = pkg['package_name'] + levels = pkg['levels'] + for level in levels: + level_en = level['level'] + level_name = level['level_name'] + skill_trees = level['skill_trees'] + + package_level = f'{package}_{level_en}' + pkg_list.append({ + 'name': package_name, + 'level_name': level_name, + 'router': package_level + }) + for skill_tree in skill_trees: + tree_list.append(skill_tree) -- GitLab