提交 87229d3c 编写于 作者: F feilong

更新组合包id生成

上级 efd587cd
{ {
"type": "job", "type": "job",
"package": "algo", "package": "algo",
"package_name": "算法工程师", "package_name": "算法工程师",
"package_id": "", "package_id": "pkg-algo-476f1b7fa31c4ca58e50e44281852e5c",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-algo1969d3626d424421ba53a4c127446fda",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"c" "c"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "algorithm02",
"skill_trees":[ "python02",
"algorithm02", "ai"
"python02", ],
"ai" "recommend_skill_trees": [],
], "level_id": "pkg-level-algoaec1a934e09c4abcb53d1a12dd776495"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "android", "package": "android",
"package_name": "Android工程师", "package_name": "Android工程师",
"package_id": "", "package_id": "pkg-android-a6402a80627f4e10991289ccdc07909c",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-androidb9d62e2044804aec93d6c3fb608b544a",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"java", "java",
"android" "android"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "react",
"skill_trees":[ "weixin",
"react", "flutter"
"weixin", ],
"flutter" "recommend_skill_trees": [],
], "level_id": "pkg-level-android2212e1098905439ba31affb6f72a3227"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "archit", "package": "archit",
"package_name": "后端构架师", "package_name": "后端构架师",
"package_id": "", "package_id": "pkg-archit-138581c50caa404289dc079be72c22ed",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-archit13df7015de654696b77b931d54e2d1f6",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"network", "network",
"java", "java",
"nginx", "nginx",
"devops" "devops"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "springboot",
"skill_trees":[ "springcloud",
"springboot", "mysql",
"springcloud", "pg",
"mysql", "mongodb",
"pg", "go",
"mongodb", "node.js",
"go", "cloud_native"
"node.js", ],
"cloud_native" "recommend_skill_trees": [],
], "level_id": "pkg-level-architce38b4dba45a4da59cee8bd22ce7013d"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "bi", "package": "bi",
"package_name": "BI 工程师", "package_name": "BI 工程师",
"package_id": "", "package_id": "pkg-bi-6c94aba2fbf94dff9b88706abdd22ddf",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-bi64bf299c82ad4e7782e680d1212009da",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"python", "python",
"algorithm", "algorithm",
"mysql" "mysql"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [
"python02", "python02",
"algorithm02", "algorithm02",
"pg" "pg"
] ]
}, },
{ {
"level": "02", "level": "02",
"level_name": "进阶", "level_name": "进阶",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"python", "python",
"algorithm" "algorithm"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [
"python02", "python02",
"algorithm02", "algorithm02",
"pg" "pg"
] ],
} "level_id": "pkg-level-bi5347c34e5a9d442bb53f4d1154dfe411"
] }
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "bigdata", "package": "bigdata",
"package_name": "大数据工程师", "package_name": "大数据工程师",
"package_id": "", "package_id": "pkg-bigdata-921ab2260f434034a4d18a331b3fc059",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-bigdatad962c038bacf466ba967b9225392cfe3",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java" "java"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [],
"level_name": "进阶", "recommend_skill_trees": [],
"skill_trees":[ "level_id": "pkg-level-bigdataffd2144d3ac54d59884ce3a7c32eb0e6"
}
], ]
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "cpp", "package": "cpp",
"package_name": "C++工程师", "package_name": "C++工程师",
"package_id": "", "package_id": "pkg-cpp-868b91324e654aa4a319eaa3a2003e7d",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-cpp6e4874e7341e4b7a9645a386062f480b",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"c", "c",
"network" "network"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [],
"level_name": "进阶", "recommend_skill_trees": [],
"skill_trees":[ "level_id": "pkg-level-cpp8e2ced7c86844357962b3043a62ba077"
}
], ]
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "crawler", "package": "crawler",
"package_name": "爬虫工程师", "package_name": "爬虫工程师",
"package_id": "", "package_id": "pkg-crawler-84a0ac8e3a714889bd1f21f0dc2428b6",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-crawler4166e2a389fb4cf9874b3d28bb2a40a4",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"python", "python",
"algorithm", "algorithm",
"mysql", "mysql",
"network" "network"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "python02",
"skill_trees":[ "algorithm02",
"python02", "web",
"algorithm02", "pg"
"web", ],
"pg" "recommend_skill_trees": [],
], "level_id": "pkg-level-crawler5479517a143c4efd95dacede75865bdf"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "devops", "package": "devops",
"package_name": "运维工程师", "package_name": "运维工程师",
"package_id": "", "package_id": "pkg-devops-7e9a2a5a32184799b0f9c63ac9a29ce6",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-devopsfdc5d030c32e4a50b4fe41033962d74b",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"python", "python",
"mysql" "mysql"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [
"devops", "devops",
"cloud_native", "cloud_native",
"pg" "pg"
] ]
}, },
{ {
"level": "02", "level": "02",
"level_name": "进阶", "level_name": "进阶",
"skill_trees":[ "skill_trees": [
"network02" "network02"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [],
"level_id": "pkg-level-devopsf65659b5246740fda922e8620486b8bb"
] }
} ]
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "go", "package": "go",
"package_name": "Go后端工程师", "package_name": "Go后端工程师",
"package_id": "", "package_id": "pkg-go-d68c5efcb5534fb289026397725982dd",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-go8c7b0d54a71f4860b7c9a7dc81b5fcc8",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"network" "network"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [],
"level_name": "进阶", "recommend_skill_trees": [],
"skill_trees":[ "level_id": "pkg-level-gof011dbf31d4644998f252e63e22f96cc"
}
], ]
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "ios", "package": "ios",
"package_name": "iOS工程师", "package_name": "iOS工程师",
"package_id": "", "package_id": "pkg-ios-a8bc050c0ace490d82f7bc9c56cec415",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-ios17b7cd3f2d944e9ca3bbadbb51550836",
"skill_trees":[ "skill_trees": [],
"recommend_skill_trees": []
], },
"recommend_skill_trees":[ {
"level": "02",
] "level_name": "进阶",
}, "skill_trees": [],
{ "recommend_skill_trees": [],
"level": "02", "level_id": "pkg-level-ios2f46dce2ddd94152804cd8412c4ac1fd"
"level_name": "进阶", }
"skill_trees":[ ]
],
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
...@@ -2,43 +2,43 @@ ...@@ -2,43 +2,43 @@
"type": "job", "type": "job",
"package": "javabf", "package": "javabf",
"package_name": "Java后端工程师", "package_name": "Java后端工程师",
"package_id": "pkg-javabf-4ee897f9c6ef49f78d906cd46b813208", "package_id": "pkg-javabf-0b33bfcfa5cf4a1c87063fd33dea58f3",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "pkg-level-javabf-4ee897f9c6ef49f78d906cd46b813208", "level_id": "pkg-level-javabf2a9747cbeeb24ce38d3cc814fded8e26",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java", "java",
"springboot", "springboot",
"mysql" "mysql"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java", "java",
"springboot" "springboot"
] ]
}, },
{ {
"level": "02", "level": "02",
"level_name": "进阶", "level_name": "进阶",
"level_id": "pkg-level-javabf-4ee897f9c6ef49f78d906cd46b813208", "level_id": "pkg-level-javabf2e57541d020d4a58b9682295b591d2e9",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java", "java",
"springboot", "springboot",
"mysql" "mysql"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java", "java",
"springboot" "springboot"
] ]
} }
] ]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "machinevision", "package": "machinevision",
"package_name": "机器视觉工程师", "package_name": "机器视觉工程师",
"package_id": "", "package_id": "pkg-machinevision-f51bfb0f9aba4539a3cc3040aad0692a",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-machinevision07c362bf9ef444edb206988cc97b0b43",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"c" "c"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [],
"level_name": "进阶", "recommend_skill_trees": [],
"skill_trees":[ "level_id": "pkg-level-machinevision73c4e9518e19431baf7f3ba6c06c7f90"
}
], ]
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "nlp", "package": "nlp",
"package_name": "自然语言处理工程师", "package_name": "自然语言处理工程师",
"package_id": "", "package_id": "pkg-nlp-d387287227cf41fba9e1b6962cc7349b",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-nlp04dc421437604b86ae9d1a656e97ecab",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm" "algorithm"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [],
"level_name": "进阶", "recommend_skill_trees": [],
"skill_trees":[ "level_id": "pkg-level-nlpfa09a020afb24414ae67b7bc0d9eab7c"
}
], ]
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "operations", "package": "operations",
"package_name": "运营", "package_name": "运营",
"package_id": "", "package_id": "pkg-operations-b57b08eed7f9464e852983c60940a1cf",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-operations25c6b09f4eef4f2fa164ff9b83645618",
"skill_trees":[ "skill_trees": [
"operations" "operations"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "product"
"skill_trees":[ ],
"product" "recommend_skill_trees": [],
], "level_id": "pkg-level-operations3818aa9b0ebe408582a986b408df657e"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "php", "package": "php",
"package_name": "PHP工程师", "package_name": "PHP工程师",
"package_id": "", "package_id": "pkg-php-7f873c5ea851486c92759712c2e2b739",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-php52ba2421ff9c4e4daa7ef5e9611dca59",
"skill_trees":[ "skill_trees": [],
"recommend_skill_trees": []
], },
"recommend_skill_trees":[ {
"level": "02",
] "level_name": "进阶",
}, "skill_trees": [],
{ "recommend_skill_trees": [],
"level": "02", "level_id": "pkg-level-php31acef3d5c304145aa78a06932c62ed2"
"level_name": "进阶", }
"skill_trees":[ ]
],
"recommend_skill_trees":[
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "product", "package": "product",
"package_name": "产品", "package_name": "产品",
"package_id": "", "package_id": "pkg-product-8c9a13638bb94afd9627221ba919428e",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-product4d3b2b82c2e040a69f3d5fe1fb399f3b",
"skill_trees":[ "skill_trees": [
"product" "product"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "se"
"skill_trees":[ ],
"se" "recommend_skill_trees": [],
], "level_id": "pkg-level-product1c2f243703014f66b0627ec0a7f9fd18"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "search", "package": "search",
"package_name": "搜索工程师", "package_name": "搜索工程师",
"package_id": "", "package_id": "pkg-search-9e90f446279e45dd8a92daaf2d4c2109",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-search521a8e6980314a56b6bcc04901797bb3",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"algorithm", "algorithm",
"java", "java",
"search" "search"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "elastic"
"skill_trees":[ ],
"elastic" "recommend_skill_trees": [],
], "level_id": "pkg-level-searchac4b075bbcca4238aae94467384e12ef"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "test", "package": "test",
"package_name": "测试工程师", "package_name": "测试工程师",
"package_id": "", "package_id": "pkg-test-2978b290ee1b4ab9b0dc352186023b69",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-test65afea81d7a4435da2f2a1555c775dbc",
"skill_trees":[ "skill_trees": [
"gml", "gml",
"web", "web",
"python", "python",
"gml" "gml"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "java"
"skill_trees":[ ],
"java" "recommend_skill_trees": [
], "network02"
"recommend_skill_trees":[ ],
"network02" "level_id": "pkg-level-test29a22f2d2c724f158bfe1725f148515e"
] }
} ]
]
} }
\ No newline at end of file
{ {
"type": "job", "type": "job",
"package": "web", "package": "web",
"package_name": "前端工程师", "package_name": "前端工程师",
"package_id": "", "package_id": "pkg-web-1a26665bfe384137afd539bb7de5f3f0",
"levels":[ "levels": [
{ {
"level": "01", "level": "01",
"level_name": "入门", "level_name": "入门",
"level_id": "", "level_id": "pkg-level-webb6aae28fbf0a4dc38e6f2f1d01727517",
"skill_trees":[ "skill_trees": [
"web", "web",
"vue", "vue",
"network" "network"
], ],
"recommend_skill_trees":[ "recommend_skill_trees": []
},
] {
}, "level": "02",
{ "level_name": "进阶",
"level": "02", "skill_trees": [
"level_name": "进阶", "react",
"skill_trees":[ "weixin"
"react", ],
"weixin" "recommend_skill_trees": [],
], "level_id": "pkg-level-web1b6cb1042e27446d976cb10b6791fb7f"
"recommend_skill_trees":[ }
]
]
}
]
} }
\ No newline at end of file
from src.main.package import Package from src.main.package import Package
if __name__ == '__main__': if __name__ == '__main__':
p = Package('data/') p = Package('data/package/')
p.walk() p.walk()
...@@ -15,9 +15,15 @@ class Package: ...@@ -15,9 +15,15 @@ class Package:
_, ext = os.path.splitext(file_name) _, ext = os.path.splitext(file_name)
if ext == '.json': if ext == '.json':
pkg = load_json(file_full_name) pkg = load_json(file_full_name)
if pkg.get('type') == 'career': if pkg.get('type') == 'job':
self.visit_package(file_full_name, pkg) self.visit_package(file_full_name, pkg)
def visit_package(self, file_full_name, pkg): def visit_package(self, file_full_name, pkg):
pkg['package_id'] = 'career-'+uuid.uuid4().hex pacakge = pkg['package']
levels = pkg['levels']
if pkg.get('package_id') is None or pkg.get('package_id').strip() == '':
pkg['package_id'] = f'pkg-{pacakge}-'+uuid.uuid4().hex
for level in levels:
if level.get('level_id') is None or level.get('level_id') == '':
level['level_id'] = f'pkg-level-{pacakge}'+uuid.uuid4().hex
dump_json(file_full_name, pkg, exist_ok=True, override=True) dump_json(file_full_name, pkg, exist_ok=True, override=True)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册