cnhkmcp 1.4.6__py3-none-any.whl → 1.4.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cnhkmcp/__init__.py +1 -1
- cnhkmcp/untracked/mcp/321/206/320/246/320/227/321/204/342/225/227/342/225/242/321/210/320/276/342/225/221/321/205/320/255/320/253/321/207/320/231/320/2302_/321/205/320/266/320/222/321/206/320/256/320/254/321/205/320/236/320/257/321/207/320/231/320/230/321/205/320/240/320/277/321/205/320/232/320/270/321/204/342/225/225/320/235/321/204/342/225/221/320/226/321/206/342/225/241/320/237/321/210/320/267/320/230/321/205/320/251/320/270/321/205/342/226/221/342/226/222/321/210/320/277/320/245/321/210/342/224/220/320/251/321/204/342/225/225/320/272//321/210/320/276/320/271AI/321/210/320/277/342/225/227/321/210/342/224/220/320/251/321/204/342/225/225/320/272/321/206/320/246/320/227/321/206/320/261/320/263/321/206/320/255/320/265/321/205/320/275/320/266/321/204/342/225/235/320/252/321/204/342/225/225/320/233/321/210/342/225/234/342/225/234/321/206/342/225/241/320/237/321/210/320/267/320/230/321/205/320/251/320/270.md +8 -0
- cnhkmcp/untracked/mcp/321/206/320/246/320/227/321/204/342/225/227/342/225/242/321/210/320/276/342/225/221/321/205/320/255/320/253/321/207/320/231/320/2302_/321/205/320/266/320/222/321/206/320/256/320/254/321/205/320/236/320/257/321/207/320/231/320/230/321/205/320/240/320/277/321/205/320/232/320/270/321/204/342/225/225/320/235/321/204/342/225/221/320/226/321/206/342/225/241/320/237/321/210/320/267/320/230/321/205/320/251/320/270/321/205/342/226/221/342/226/222/321/210/320/277/320/245/321/210/342/224/220/320/251/321/204/342/225/225/320/272//321/211/320/225/320/235/321/207/342/225/234/320/276/321/205/320/231/320/235/321/210/342/224/220/320/240/321/210/320/261/320/234/321/206/320/230/320/241_/321/205/320/276/320/231/321/210/320/263/320/225/321/205/342/224/220/320/225/321/210/320/266/320/221/321/204/342/225/233/320/255/321/210/342/225/241/320/246/321/205/320/234/320/225.py +30 -5
- cnhkmcp/untracked//321/211/320/225/320/235/321/207/342/225/234/320/276/321/205/320/231/320/235/321/210/342/224/220/320/240/321/210/320/261/320/234/321/206/320/230/320/241_/321/205/320/276/320/231/321/210/320/263/320/225/321/205/342/224/220/320/225/321/210/320/266/320/221/321/204/342/225/233/320/255/321/210/342/225/241/320/246/321/205/320/234/320/225.py +30 -5
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/METADATA +1 -1
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/RECORD +10 -10
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/WHEEL +0 -0
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/entry_points.txt +0 -0
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/licenses/LICENSE +0 -0
- {cnhkmcp-1.4.6.dist-info → cnhkmcp-1.4.7.dist-info}/top_level.txt +0 -0
cnhkmcp/__init__.py
CHANGED
|
@@ -16,6 +16,14 @@ This means Playwright cannot find the Chrome browser executable in its default s
|
|
|
16
16
|
|
|
17
17
|
The solution is to download the Chrome `.deb` package, extract the executable, and then point your Playwright script to it.
|
|
18
18
|
|
|
19
|
+
### Step 0: pip install playwright
|
|
20
|
+
|
|
21
|
+
Before you begin, make sure you have Playwright installed. You can install it using pip:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install playwright
|
|
25
|
+
```
|
|
26
|
+
|
|
19
27
|
### Step 1: Download the Chrome `.deb` Package
|
|
20
28
|
|
|
21
29
|
You can download the latest stable version of Google Chrome for Debian/Ubuntu-based systems using `wget`:
|
|
@@ -75,12 +75,24 @@ def is_version_sufficient(installed: str, required: str) -> bool:
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def install_package(spec: str) -> Tuple[bool, str]:
|
|
78
|
-
"""Install a package spec using pip.
|
|
79
|
-
|
|
78
|
+
"""Install a package spec using pip. Streams output live and returns (success, output)."""
|
|
79
|
+
# Use -v for verbose pip output; capture stdout/stderr while streaming to console
|
|
80
|
+
cmd = [sys.executable, "-m", "pip", "install", "-v", spec]
|
|
80
81
|
try:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
|
83
|
+
output_lines = []
|
|
84
|
+
if proc.stdout:
|
|
85
|
+
for line in proc.stdout:
|
|
86
|
+
output_lines.append(line)
|
|
87
|
+
# print each pip line as it arrives for visibility
|
|
88
|
+
try:
|
|
89
|
+
print(line.rstrip())
|
|
90
|
+
except Exception:
|
|
91
|
+
# fallback: print raw line
|
|
92
|
+
print(line)
|
|
93
|
+
proc.wait()
|
|
94
|
+
out = "".join(output_lines)
|
|
95
|
+
success = proc.returncode == 0
|
|
84
96
|
return success, out
|
|
85
97
|
except Exception as e:
|
|
86
98
|
return False, str(e)
|
|
@@ -113,10 +125,21 @@ def main():
|
|
|
113
125
|
if needs_install:
|
|
114
126
|
print(f"-> {name}: {action} via pip ({spec})")
|
|
115
127
|
success, output = install_package(spec)
|
|
128
|
+
# Attempt to read installed version after install
|
|
129
|
+
installed_after = None
|
|
130
|
+
if success:
|
|
131
|
+
try:
|
|
132
|
+
installed_after = importlib.metadata.version(name)
|
|
133
|
+
except Exception:
|
|
134
|
+
installed_after = None
|
|
135
|
+
if installed_after:
|
|
136
|
+
print(f" -> {name} now installed as: {installed_after}")
|
|
137
|
+
|
|
116
138
|
results.append({
|
|
117
139
|
"name": name,
|
|
118
140
|
"spec": spec,
|
|
119
141
|
"installed_version_before": installed_ver,
|
|
142
|
+
"installed_version_after": installed_after,
|
|
120
143
|
"action": action,
|
|
121
144
|
"success": success,
|
|
122
145
|
"output": output
|
|
@@ -152,6 +175,8 @@ def main():
|
|
|
152
175
|
print("-----")
|
|
153
176
|
print(f"Package: {f['name']}")
|
|
154
177
|
print(f"Spec: {f['spec']}")
|
|
178
|
+
print(f"Installed before: {f.get('installed_version_before')}")
|
|
179
|
+
print(f"Installed after: {f.get('installed_version_after')}")
|
|
155
180
|
print("Output:")
|
|
156
181
|
print(f.get("output", "(no output)"))
|
|
157
182
|
|
|
@@ -75,12 +75,24 @@ def is_version_sufficient(installed: str, required: str) -> bool:
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def install_package(spec: str) -> Tuple[bool, str]:
|
|
78
|
-
"""Install a package spec using pip.
|
|
79
|
-
|
|
78
|
+
"""Install a package spec using pip. Streams output live and returns (success, output)."""
|
|
79
|
+
# Use -v for verbose pip output; capture stdout/stderr while streaming to console
|
|
80
|
+
cmd = [sys.executable, "-m", "pip", "install", "-v", spec]
|
|
80
81
|
try:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
|
83
|
+
output_lines = []
|
|
84
|
+
if proc.stdout:
|
|
85
|
+
for line in proc.stdout:
|
|
86
|
+
output_lines.append(line)
|
|
87
|
+
# print each pip line as it arrives for visibility
|
|
88
|
+
try:
|
|
89
|
+
print(line.rstrip())
|
|
90
|
+
except Exception:
|
|
91
|
+
# fallback: print raw line
|
|
92
|
+
print(line)
|
|
93
|
+
proc.wait()
|
|
94
|
+
out = "".join(output_lines)
|
|
95
|
+
success = proc.returncode == 0
|
|
84
96
|
return success, out
|
|
85
97
|
except Exception as e:
|
|
86
98
|
return False, str(e)
|
|
@@ -113,10 +125,21 @@ def main():
|
|
|
113
125
|
if needs_install:
|
|
114
126
|
print(f"-> {name}: {action} via pip ({spec})")
|
|
115
127
|
success, output = install_package(spec)
|
|
128
|
+
# Attempt to read installed version after install
|
|
129
|
+
installed_after = None
|
|
130
|
+
if success:
|
|
131
|
+
try:
|
|
132
|
+
installed_after = importlib.metadata.version(name)
|
|
133
|
+
except Exception:
|
|
134
|
+
installed_after = None
|
|
135
|
+
if installed_after:
|
|
136
|
+
print(f" -> {name} now installed as: {installed_after}")
|
|
137
|
+
|
|
116
138
|
results.append({
|
|
117
139
|
"name": name,
|
|
118
140
|
"spec": spec,
|
|
119
141
|
"installed_version_before": installed_ver,
|
|
142
|
+
"installed_version_after": installed_after,
|
|
120
143
|
"action": action,
|
|
121
144
|
"success": success,
|
|
122
145
|
"output": output
|
|
@@ -152,6 +175,8 @@ def main():
|
|
|
152
175
|
print("-----")
|
|
153
176
|
print(f"Package: {f['name']}")
|
|
154
177
|
print(f"Spec: {f['spec']}")
|
|
178
|
+
print(f"Installed before: {f.get('installed_version_before')}")
|
|
179
|
+
print(f"Installed after: {f.get('installed_version_after')}")
|
|
155
180
|
print("Output:")
|
|
156
181
|
print(f.get("output", "(no output)"))
|
|
157
182
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cnhkmcp/__init__.py,sha256=
|
|
1
|
+
cnhkmcp/__init__.py,sha256=kF8DMV9SQTNEph3bXo5avYCzQk7rzTMRSRCzqY3uhJA,2758
|
|
2
2
|
cnhkmcp/untracked/arXiv_API_Tool_Manual.md,sha256=I3hvI5mpmIjBuWptufoVSWFnuhyUc67oCGHEuR0p_xs,13552
|
|
3
3
|
cnhkmcp/untracked/arxiv_api.py,sha256=-E-Ub9K-DXAYaCjrbobyfQ9H97gaZBc7pL6xPEyVHec,9020
|
|
4
4
|
cnhkmcp/untracked/forum_functions.py,sha256=QW-CplAsqDkw-Wcwq-1tuZBq48dEO-vXZ8xw7X65EuE,42303
|
|
@@ -11,7 +11,7 @@ cnhkmcp/untracked/示例工作流_BRAIN_6_Tips_Datafield_Exploration_Guide.md,sh
|
|
|
11
11
|
cnhkmcp/untracked/示例工作流_BRAIN_Alpha_Improvement_Workflow.md,sha256=XlWYREd_qXe1skdXIhkiGY05oDr_6KiBs1WkerY4S8U,5092
|
|
12
12
|
cnhkmcp/untracked/示例工作流_Dataset_Exploration_Expert_Manual.md,sha256=-C4fWdaBe9UzA5BDZz0Do2z8RaPWLslb6D0nTz6fqk4,24403
|
|
13
13
|
cnhkmcp/untracked/示例工作流_daily_report_workflow.md,sha256=6aNmPqWRn09XdQMRxoVTka9IYVOUv5LcWparHu16EfQ,9460
|
|
14
|
-
cnhkmcp/untracked/配置前运行我_安装必要依赖包.py,sha256=
|
|
14
|
+
cnhkmcp/untracked/配置前运行我_安装必要依赖包.py,sha256=BnUyL5g6PaC62yEuS-8vcDSJ0oKu3k6jqQxi2jginuQ,6612
|
|
15
15
|
cnhkmcp/untracked/APP/.gitignore,sha256=oPCoVTNo82bhkN0c671LdjCpOTVpVhZI5NR75ztcg48,317
|
|
16
16
|
cnhkmcp/untracked/APP/MODULAR_STRUCTURE.md,sha256=Ji4VeRZjeMWRX6cvEHxyR_gmoorIEEdqwsXTCVIr5_0,4331
|
|
17
17
|
cnhkmcp/untracked/APP/README.md,sha256=vb7hmQX0sH5aFNBmDCN5szMSDHm1_h2VKY4UKCt0aMk,11676
|
|
@@ -64,11 +64,11 @@ cnhkmcp/untracked/__pycache__/forum_functions.cpython-313.pyc,sha256=agARlP2x36s
|
|
|
64
64
|
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/forum_functions.py,sha256=sm2Vqi7Dq0plbXNvMC2_Y0qOFAR3jBhQ4KDLJfMDH6s,19026
|
|
65
65
|
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/platform_functions.py,sha256=aa5jCRjCORFars8CVahqwbk5ni0mLYWu9yND7Z4TGUM,99159
|
|
66
66
|
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/user_config.json,sha256=_INn1X1qIsITrmEno-BRlQOAGm9wnNCw-6B333DEvnk,695
|
|
67
|
-
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/让AI读这个文档来学会下载浏览器.md,sha256=
|
|
68
|
-
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/配置前运行我_安装必要依赖包.py,sha256=
|
|
69
|
-
cnhkmcp-1.4.
|
|
70
|
-
cnhkmcp-1.4.
|
|
71
|
-
cnhkmcp-1.4.
|
|
72
|
-
cnhkmcp-1.4.
|
|
73
|
-
cnhkmcp-1.4.
|
|
74
|
-
cnhkmcp-1.4.
|
|
67
|
+
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/让AI读这个文档来学会下载浏览器.md,sha256=v5QPSMjRDh52ZjgC4h8QjImnaqlVRLjTHGxmGjTo36g,3396
|
|
68
|
+
cnhkmcp/untracked/mcp文件论坛版2_如果原版启动不了浏览器就试这个/配置前运行我_安装必要依赖包.py,sha256=BnUyL5g6PaC62yEuS-8vcDSJ0oKu3k6jqQxi2jginuQ,6612
|
|
69
|
+
cnhkmcp-1.4.7.dist-info/licenses/LICENSE,sha256=QLxO2eNMnJQEdI_R1UV2AOD-IvuA8zVrkHWA4D9gtoc,1081
|
|
70
|
+
cnhkmcp-1.4.7.dist-info/METADATA,sha256=G6CyJd-XaK7HKX1hdNC88dfP5b6ZuRpUVF58JSu43Mg,5171
|
|
71
|
+
cnhkmcp-1.4.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
72
|
+
cnhkmcp-1.4.7.dist-info/entry_points.txt,sha256=lTQieVyIvjhSMK4fT-XwnccY-JBC1H4vVQ3V9dDM-Pc,70
|
|
73
|
+
cnhkmcp-1.4.7.dist-info/top_level.txt,sha256=x--ibUcSgOS9Z_RWK2Qc-vfs7DaXQN-WMaaxEETJ1Bw,8
|
|
74
|
+
cnhkmcp-1.4.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|