Skip to content

Commit cbdedcf

Browse files
committed
feat: 更新法律法规
1 parent 9692a67 commit cbdedcf

File tree

45 files changed

+7968
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7968
-19
lines changed

db.sqlite3

0 Bytes
Binary file not shown.

scripts/auto_organize.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import re
2+
from collections import defaultdict
3+
from pathlib import Path
4+
5+
input_folder = Path("./__cache__/out/法律")
6+
LOOKUP_FOLDER = Path("../")
7+
8+
name_regxp = re.compile(r"(.*)\((\d{4}-\d{2}-\d{2})\).md")
9+
def find_all():
10+
# find all md files in LOOKUP_FOLDER,
11+
# file name pattern 专利法(2020-10-17).md
12+
# extract title and publish date
13+
result = defaultdict(set)
14+
for file_path in LOOKUP_FOLDER.glob("**/*.md"):
15+
# ignore if in 'scripts'
16+
if "scripts" in file_path.parts:
17+
continue
18+
m = name_regxp.search(file_path.name)
19+
# folder_name is the folder path relative to LOOKUP_FOLDER
20+
folder_name = file_path.relative_to(LOOKUP_FOLDER).parent
21+
if not m:
22+
continue
23+
title = m.group(1)
24+
result[title].add(folder_name)
25+
return result
26+
27+
def main():
28+
laws_map = find_all()
29+
for file_path in input_folder.glob("*.md"):
30+
m = name_regxp.search(file_path.name)
31+
if not m:
32+
continue
33+
title = m.group(1)
34+
if title not in laws_map:
35+
print("not found", title)
36+
continue
37+
folders = laws_map[title]
38+
if len(folders) > 1:
39+
print("duplicate", title, folders)
40+
continue
41+
folder = list(folders)[0]
42+
print("move", file_path, "to", LOOKUP_FOLDER / folder / file_path.name)
43+
file_path.rename(LOOKUP_FOLDER / folder / file_path.name)
44+
45+
if __name__ == "__main__":
46+
main()

scripts/request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def main():
185185
# ("xlwj", ["02", "03", "04", "05", "06", "07", "08"]), # 法律法规
186186
# ("xlwj", ["07"]),
187187
# ("fgbt", "消防法"),
188-
("fgxlwj", "xzfg"), # 行政法规
188+
# ("fgxlwj", "xzfg"), # 行政法规
189189
# ('type', 'sfjs'),
190190
# ("zdjg", "4028814858a4d78b0158a50f344e0048&4028814858a4d78b0158a50fa2ba004c"), #北京
191191
# ("zdjg", "4028814858b9b8e50158bed591680061&4028814858b9b8e50158bed64efb0065"), #河南

宪法相关法/全国人民代表大会和地方各级人民代表大会代表法(2025-03-11).md

Lines changed: 313 additions & 0 deletions
Large diffs are not rendered by default.

宪法相关法/各级人民代表大会常务委员会监督法(2024-11-08).md

Lines changed: 285 additions & 0 deletions
Large diffs are not rendered by default.

宪法相关法/国务院组织法(2024-03-11).md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
<!-- INFO END -->
88

9-
中华人民共和国国务院组织法
10-
119
第一条 为了健全国务院的组织和工作制度,保障和规范国务院行使职权,根据宪法,制定本法。
1210

1311
第二条 中华人民共和国国务院,即中央人民政府,是最高国家权力机关的执行机关,是最高国家行政机关。

宪法相关法/监察法(2024-12-25).md

Lines changed: 425 additions & 0 deletions
Large diffs are not rendered by default.

社会法/农村集体经济组织法(2024-06-28).md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<!-- INFO END -->
66

7-
中华人民共和国农村集体经济组织法
8-
97
## 第一章 总 则
108

119
第一条 为了维护农村集体经济组织及其成员的合法权益,规范农村集体经济组织及其运行管理,促进新型农村集体经济高质量发展,巩固和完善农村基本经营制度和社会主义基本经济制度,推进乡村全面振兴,加快建设农业强国,促进共同富裕,根据宪法,制定本法。

社会法/学位法(2024-04-26).md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<!-- INFO END -->
66

7-
中华人民共和国学位法
8-
97
## 第一章 总 则
108

119
第一条 为了规范学位授予工作,保护学位申请人的合法权益,保障学位质量,培养担当民族复兴大任的时代新人,建设教育强国、科技强国、人才强国,服务全面建设社会主义现代化国家,根据宪法,制定本法。

社会法/未成年人保护法(2024-04-26).md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
<!-- INFO END -->
1414

15-
中华人民共和国未成年人保护法
16-
1715
1816

1917
## 第一章 总 则

0 commit comments

Comments
 (0)