openmd-cli 0.1.0__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.
- openmd/__init__.py +3 -0
- openmd/__main__.py +5 -0
- openmd/adapters/__init__.py +1 -0
- openmd/adapters/base.py +95 -0
- openmd/adapters/bilibili/__init__.py +11 -0
- openmd/adapters/bilibili/adapter.py +104 -0
- openmd/adapters/bilibili/discovery.py +33 -0
- openmd/adapters/douyin/__init__.py +11 -0
- openmd/adapters/douyin/adapter.py +117 -0
- openmd/adapters/douyin/discovery.py +36 -0
- openmd/adapters/douyin/sidecar.py +77 -0
- openmd/adapters/generic_media/__init__.py +14 -0
- openmd/adapters/high_privacy.py +77 -0
- openmd/adapters/local_audio/__init__.py +14 -0
- openmd/adapters/local_audio/adapter.py +169 -0
- openmd/adapters/local_audio/asr.py +58 -0
- openmd/adapters/local_audio/backends/__init__.py +1 -0
- openmd/adapters/local_audio/backends/auto.py +177 -0
- openmd/adapters/local_audio/backends/faster_whisper.py +285 -0
- openmd/adapters/local_audio/backends/funasr_sense_voice.py +14 -0
- openmd/adapters/local_audio/backends/qwen3_asr.py +254 -0
- openmd/adapters/opencli.py +770 -0
- openmd/adapters/pdf/__init__.py +11 -0
- openmd/adapters/pdf/adapter.py +153 -0
- openmd/adapters/pdf/backends/__init__.py +1 -0
- openmd/adapters/pdf/backends/markitdown.py +165 -0
- openmd/adapters/pdf/parser.py +56 -0
- openmd/adapters/qq_group/__init__.py +11 -0
- openmd/adapters/qq_group/adapter.py +289 -0
- openmd/adapters/qq_group/parsers/__init__.py +1 -0
- openmd/adapters/qq_group/parsers/html.py +60 -0
- openmd/adapters/qq_group/parsers/json.py +71 -0
- openmd/adapters/registry.py +149 -0
- openmd/adapters/screenshot/__init__.py +11 -0
- openmd/adapters/screenshot/adapter.py +154 -0
- openmd/adapters/screenshot/backends/__init__.py +1 -0
- openmd/adapters/screenshot/backends/paddle.py +15 -0
- openmd/adapters/screenshot/backends/rapidocr.py +176 -0
- openmd/adapters/screenshot/backends/tesseract.py +15 -0
- openmd/adapters/screenshot/ocr.py +84 -0
- openmd/adapters/wechat_group/__init__.py +11 -0
- openmd/adapters/wechat_group/adapter.py +160 -0
- openmd/adapters/wechat_group/wx_cli.py +268 -0
- openmd/adapters/wechat_moments/__init__.py +11 -0
- openmd/adapters/wechat_moments/adapter.py +167 -0
- openmd/adapters/wechat_moments/wx_cli.py +265 -0
- openmd/adapters/weixin/__init__.py +11 -0
- openmd/adapters/weixin/adapter.py +148 -0
- openmd/adapters/weixin/discovery.py +510 -0
- openmd/adapters/weixin/report.py +278 -0
- openmd/adapters/xiaohongshu.py +158 -0
- openmd/backends/__init__.py +1 -0
- openmd/backends/base.py +204 -0
- openmd/backends/bilibili.py +1480 -0
- openmd/backends/bilibili_wbi.py +277 -0
- openmd/backends/discourse.py +426 -0
- openmd/backends/douyin.py +868 -0
- openmd/backends/douyin_detail.py +124 -0
- openmd/backends/douyin_providers.py +602 -0
- openmd/backends/executor.py +546 -0
- openmd/backends/feishu.py +861 -0
- openmd/backends/generic_media.py +77 -0
- openmd/backends/interactive.py +60 -0
- openmd/backends/ocr.py +41 -0
- openmd/backends/opencli.py +82 -0
- openmd/backends/pdf.py +122 -0
- openmd/backends/registry.py +234 -0
- openmd/backends/screenshot.py +79 -0
- openmd/backends/video_metadata.py +167 -0
- openmd/backends/web_article.py +363 -0
- openmd/backends/wechat_group.py +35 -0
- openmd/backends/wechat_moments.py +35 -0
- openmd/backends/weixin.py +767 -0
- openmd/backends/x.py +455 -0
- openmd/backends/xiaoe.py +940 -0
- openmd/backends/xiaohongshu.py +911 -0
- openmd/backends/xiaohongshu_providers.py +876 -0
- openmd/backends/xiaoyuzhou.py +1017 -0
- openmd/backends/youtube.py +280 -0
- openmd/backends/youtube_discovery.py +1245 -0
- openmd/backends/youtube_transcript.py +213 -0
- openmd/browser_extension/background.js +231 -0
- openmd/browser_extension/icons/icon-128.png +0 -0
- openmd/browser_extension/icons/icon-16.png +0 -0
- openmd/browser_extension/icons/icon-32.png +0 -0
- openmd/browser_extension/icons/icon-48.png +0 -0
- openmd/browser_extension/icons/icon-512.png +0 -0
- openmd/browser_extension/idle.html +6 -0
- openmd/browser_extension/manifest.json +43 -0
- openmd/browser_extension/options.html +42 -0
- openmd/browser_extension/options.js +117 -0
- openmd/browser_extension/popup.css +71 -0
- openmd/browser_extension/popup.html +17 -0
- openmd/browser_extension/popup.js +59 -0
- openmd/browser_extension/vendor/opencli-bridge/LICENSE +190 -0
- openmd/browser_extension/vendor/opencli-bridge/VENDOR.md +31 -0
- openmd/browser_extension/vendor/opencli-bridge/background.js +2742 -0
- openmd/browser_host.py +503 -0
- openmd/browser_setup.py +106 -0
- openmd/cli.py +2012 -0
- openmd/console.py +32 -0
- openmd/core/__init__.py +1 -0
- openmd/core/capabilities.py +162 -0
- openmd/core/content_validation.py +323 -0
- openmd/core/coverage.py +163 -0
- openmd/core/detector.py +247 -0
- openmd/core/doctor.py +104 -0
- openmd/core/execution_policy.py +164 -0
- openmd/core/filename.py +64 -0
- openmd/core/input_validation.py +91 -0
- openmd/core/local_config.py +96 -0
- openmd/core/manifest.py +156 -0
- openmd/core/models.py +168 -0
- openmd/core/opencli_output.py +34 -0
- openmd/core/operation_contract.py +60 -0
- openmd/core/output.py +194 -0
- openmd/core/package_contract.py +335 -0
- openmd/core/package_validator.py +489 -0
- openmd/core/package_writer.py +666 -0
- openmd/core/planner.py +345 -0
- openmd/core/preferences.py +61 -0
- openmd/core/readable.py +129 -0
- openmd/core/receipt.py +285 -0
- openmd/core/renderer.py +185 -0
- openmd/core/runlog.py +208 -0
- openmd/core/secrets.py +313 -0
- openmd/doctor_view.py +68 -0
- openmd/interactive.py +453 -0
- openmd/ocr/__init__.py +1 -0
- openmd/ocr/breakers.py +84 -0
- openmd/ocr/config.py +54 -0
- openmd/ocr/documents.py +522 -0
- openmd/ocr/endpoint.py +72 -0
- openmd/ocr/layout.py +92 -0
- openmd/ocr/layout_filter.py +118 -0
- openmd/ocr/layout_worker.py +89 -0
- openmd/ocr/native_math.py +220 -0
- openmd/ocr/office.py +305 -0
- openmd/ocr/ollama.py +200 -0
- openmd/ocr/otsl.py +51 -0
- openmd/ocr/ovis-prompt.txt +1 -0
- openmd/ocr/pipeline.py +384 -0
- openmd/ocr/settings.json +25 -0
- openmd/ocr/tiling.py +631 -0
- openmd/post_video.py +154 -0
- openmd/probe.py +397 -0
- openmd/routing/__init__.py +1 -0
- openmd/routing/cards/builtin.json +620 -0
- openmd/routing/cards/defuddle.json +70 -0
- openmd/routing/cards/x-tweet-fetcher.json +71 -0
- openmd/routing/cards/xyz-dl.json +60 -0
- openmd/routing/cards/yutto.json +68 -0
- openmd/routing/entry_shim.py +71 -0
- openmd/routing/lifecycle.py +459 -0
- openmd/routing/loader.py +138 -0
- openmd/routing/providers.py +158 -0
- openmd/routing/readers.py +108 -0
- openmd/routing/routes.json +504 -0
- openmd/routing/runner.py +192 -0
- openmd/routing/view.py +40 -0
- openmd/runtime/__init__.py +1 -0
- openmd/runtime/_windows_job.py +234 -0
- openmd/runtime/asr.py +217 -0
- openmd/runtime/asr_worker.py +119 -0
- openmd/runtime/gpu_lock.py +81 -0
- openmd/runtime/gpu_quarantine.py +85 -0
- openmd/runtime/interpreters.py +407 -0
- openmd/runtime/managed_tools.py +204 -0
- openmd/runtime/models.py +202 -0
- openmd/runtime/services.py +175 -0
- openmd/runtime/tempdirs.py +227 -0
- openmd_cli-0.1.0.dist-info/METADATA +168 -0
- openmd_cli-0.1.0.dist-info/RECORD +177 -0
- openmd_cli-0.1.0.dist-info/WHEEL +5 -0
- openmd_cli-0.1.0.dist-info/entry_points.txt +2 -0
- openmd_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
- openmd_cli-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "openmd.tool-card/v1",
|
|
3
|
+
"installation": {
|
|
4
|
+
"mode": "isolated_existing",
|
|
5
|
+
"sha256": "e00f35735b2408bd3f28bdcb933531a2a138db951d108407d1f5cb6d7a19c166",
|
|
6
|
+
"verification": "SHA256 of the installed entry file; dependency tree is isolated, not attested"
|
|
7
|
+
},
|
|
8
|
+
"evidence": [
|
|
9
|
+
{
|
|
10
|
+
"date": "2026-11-07",
|
|
11
|
+
"ledger": "docs/benchmarks/routes/trials-backup.jsonl",
|
|
12
|
+
"scope": "one real sample; does not establish platform-wide completeness"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "x-tweet-fetcher",
|
|
16
|
+
"kind": "python_entry",
|
|
17
|
+
"version": "3.1.0",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"homepage": "https://github.com/ythx-101/x-tweet-fetcher",
|
|
20
|
+
"launcher": {
|
|
21
|
+
"entry": "xtf.cli:main",
|
|
22
|
+
"which": [
|
|
23
|
+
"xtf"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"capabilities": [
|
|
27
|
+
{
|
|
28
|
+
"status_policy": "verified_if_valid_else_failed",
|
|
29
|
+
"requires_login": false,
|
|
30
|
+
"cost_class": "none",
|
|
31
|
+
"id": "x-tweet-fetcher.x.content",
|
|
32
|
+
"sources": [
|
|
33
|
+
"x"
|
|
34
|
+
],
|
|
35
|
+
"capability": "content",
|
|
36
|
+
"url_hosts": [
|
|
37
|
+
"x.com",
|
|
38
|
+
"twitter.com",
|
|
39
|
+
"www.x.com",
|
|
40
|
+
"www.twitter.com"
|
|
41
|
+
],
|
|
42
|
+
"url_path_pattern": "^/[^/]+/status/[0-9]+/?$",
|
|
43
|
+
"argv": [
|
|
44
|
+
"--url",
|
|
45
|
+
"{url}"
|
|
46
|
+
],
|
|
47
|
+
"reader": {
|
|
48
|
+
"type": "json_stdout",
|
|
49
|
+
"title_from_first_line": true,
|
|
50
|
+
"fields": {
|
|
51
|
+
"text": [
|
|
52
|
+
"tweet.article.full_text",
|
|
53
|
+
"tweet.text"
|
|
54
|
+
],
|
|
55
|
+
"title": "tweet.article.title",
|
|
56
|
+
"author": "tweet.author",
|
|
57
|
+
"published_at": "tweet.created_at"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"gates": [
|
|
61
|
+
"network"
|
|
62
|
+
],
|
|
63
|
+
"source_level": "third_party_extractor",
|
|
64
|
+
"timeout_s": 90,
|
|
65
|
+
"validation": {
|
|
66
|
+
"min_chars": 1
|
|
67
|
+
},
|
|
68
|
+
"coverage_note": "Single post only; this extractor does not establish full thread coverage."
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "openmd.tool-card/v1",
|
|
3
|
+
"installation": {
|
|
4
|
+
"mode": "isolated_existing",
|
|
5
|
+
"sha256": "d5676a016f220f4a6a7c2944ccfb77dd92cf33863500f5ac18b986f34c97aa02",
|
|
6
|
+
"verification": "SHA256 of the installed entry file; dependency tree is isolated, not attested"
|
|
7
|
+
},
|
|
8
|
+
"evidence": [
|
|
9
|
+
{
|
|
10
|
+
"date": "2026-11-07",
|
|
11
|
+
"ledger": "docs/benchmarks/routes/trials-backup.jsonl",
|
|
12
|
+
"scope": "one real sample; does not establish platform-wide completeness"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "xyz-dl",
|
|
16
|
+
"kind": "python_script",
|
|
17
|
+
"version": "sha256:d5676a016f220f4a6a7c2944ccfb77dd92cf33863500f5ac18b986f34c97aa02",
|
|
18
|
+
"license": "AGPL-3.0",
|
|
19
|
+
"homepage": "",
|
|
20
|
+
"launcher": {
|
|
21
|
+
"script": "main.py"
|
|
22
|
+
},
|
|
23
|
+
"capabilities": [
|
|
24
|
+
{
|
|
25
|
+
"status_policy": "verified_if_valid_else_failed",
|
|
26
|
+
"requires_login": false,
|
|
27
|
+
"cost_class": "local_compute",
|
|
28
|
+
"id": "xyz-dl.xiaoyuzhou.media-asr",
|
|
29
|
+
"sources": [
|
|
30
|
+
"xiaoyuzhou"
|
|
31
|
+
],
|
|
32
|
+
"capability": "media",
|
|
33
|
+
"url_hosts": [
|
|
34
|
+
"www.xiaoyuzhoufm.com",
|
|
35
|
+
"xiaoyuzhoufm.com"
|
|
36
|
+
],
|
|
37
|
+
"url_path_pattern": "^/episode/[a-f0-9]{24}/?$",
|
|
38
|
+
"argv": [
|
|
39
|
+
"{url}",
|
|
40
|
+
"--output",
|
|
41
|
+
"{workdir}",
|
|
42
|
+
"--no-metadata"
|
|
43
|
+
],
|
|
44
|
+
"reader": {
|
|
45
|
+
"type": "media_dir"
|
|
46
|
+
},
|
|
47
|
+
"then": "asr.auto",
|
|
48
|
+
"gates": [
|
|
49
|
+
"network",
|
|
50
|
+
"media_download",
|
|
51
|
+
"asr"
|
|
52
|
+
],
|
|
53
|
+
"source_level": "media_asr",
|
|
54
|
+
"timeout_s": 300,
|
|
55
|
+
"validation": {
|
|
56
|
+
"min_chars": 1
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "openmd.tool-card/v1",
|
|
3
|
+
"installation": {
|
|
4
|
+
"mode": "isolated_existing",
|
|
5
|
+
"sha256": "5ac46c79fcca8f1ad80d9fc39df1ab8720d1fa8ba6f561f93cb03a7d50bb4c17",
|
|
6
|
+
"verification": "SHA256 of the installed entry file; dependency tree is isolated, not attested"
|
|
7
|
+
},
|
|
8
|
+
"evidence": [
|
|
9
|
+
{
|
|
10
|
+
"date": "2026-11-07",
|
|
11
|
+
"ledger": "docs/benchmarks/routes/trials-backup.jsonl",
|
|
12
|
+
"scope": "one real sample; does not establish platform-wide completeness"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"id": "yutto",
|
|
16
|
+
"kind": "python_entry",
|
|
17
|
+
"version": "2.3.1",
|
|
18
|
+
"license": "GPL-3.0",
|
|
19
|
+
"homepage": "https://github.com/yutto-dev/yutto",
|
|
20
|
+
"launcher": {
|
|
21
|
+
"entry": "yutto.__main__:main",
|
|
22
|
+
"which": [
|
|
23
|
+
"yutto"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"capabilities": [
|
|
27
|
+
{
|
|
28
|
+
"status_policy": "verified_if_valid_else_failed",
|
|
29
|
+
"requires_login": false,
|
|
30
|
+
"cost_class": "local_compute",
|
|
31
|
+
"id": "yutto.bilibili.media-asr",
|
|
32
|
+
"sources": [
|
|
33
|
+
"bilibili"
|
|
34
|
+
],
|
|
35
|
+
"capability": "media",
|
|
36
|
+
"url_hosts": [
|
|
37
|
+
"www.bilibili.com",
|
|
38
|
+
"bilibili.com"
|
|
39
|
+
],
|
|
40
|
+
"argv": [
|
|
41
|
+
"{url}",
|
|
42
|
+
"--audio-only",
|
|
43
|
+
"--no-danmaku",
|
|
44
|
+
"--no-subtitle",
|
|
45
|
+
"--no-cover",
|
|
46
|
+
"--auth-file",
|
|
47
|
+
"{workdir}/no-auth.toml",
|
|
48
|
+
"-d",
|
|
49
|
+
"{workdir}"
|
|
50
|
+
],
|
|
51
|
+
"reader": {
|
|
52
|
+
"type": "media_dir"
|
|
53
|
+
},
|
|
54
|
+
"then": "asr.auto",
|
|
55
|
+
"gates": [
|
|
56
|
+
"network",
|
|
57
|
+
"media_download",
|
|
58
|
+
"asr"
|
|
59
|
+
],
|
|
60
|
+
"source_level": "media_asr",
|
|
61
|
+
"timeout_s": 300,
|
|
62
|
+
"validation": {
|
|
63
|
+
"min_chars": 1
|
|
64
|
+
},
|
|
65
|
+
"url_path_pattern": "^/video/BV[A-Za-z0-9]+/?$"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Execute isolated Python entry points with credential and TLS boundaries."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import argparse
|
|
6
|
+
import importlib
|
|
7
|
+
import runpy
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _require_tls_verification() -> None:
|
|
13
|
+
try:
|
|
14
|
+
import requests
|
|
15
|
+
except ImportError:
|
|
16
|
+
return
|
|
17
|
+
original = requests.sessions.Session.send
|
|
18
|
+
|
|
19
|
+
def verified_send(self, request, **kwargs):
|
|
20
|
+
# Some downloaders set Session.verify=False internally. Never inherit it.
|
|
21
|
+
kwargs["verify"] = True
|
|
22
|
+
return original(self, request, **kwargs)
|
|
23
|
+
|
|
24
|
+
requests.sessions.Session.send = verified_send
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _require_yutto_tls_verification() -> None:
|
|
28
|
+
"""Yutto's native session is independent of requests and defaults to insecure."""
|
|
29
|
+
fetcher = importlib.import_module("yutto.utils.fetcher")
|
|
30
|
+
original = fetcher.create_client
|
|
31
|
+
|
|
32
|
+
def verified_client(*args, **kwargs):
|
|
33
|
+
kwargs["verify"] = True
|
|
34
|
+
return original(*args, **kwargs)
|
|
35
|
+
|
|
36
|
+
fetcher.create_client = verified_client
|
|
37
|
+
# Cover aliases imported before shim initialization as well as future imports.
|
|
38
|
+
for name, module in tuple(sys.modules.items()):
|
|
39
|
+
if name.startswith("yutto.") and getattr(module, "create_client", None) is original:
|
|
40
|
+
module.create_client = verified_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def main(argv: list[str] | None = None) -> int:
|
|
44
|
+
parser = argparse.ArgumentParser()
|
|
45
|
+
parser.add_argument("--path", action="append", default=[])
|
|
46
|
+
parser.add_argument("--entry")
|
|
47
|
+
parser.add_argument("--script")
|
|
48
|
+
parser.add_argument("arguments", nargs=argparse.REMAINDER)
|
|
49
|
+
args = parser.parse_args(argv)
|
|
50
|
+
for path in reversed(args.path):
|
|
51
|
+
sys.path.insert(0, str(Path(path).resolve()))
|
|
52
|
+
if bool(args.entry) == bool(args.script):
|
|
53
|
+
raise ValueError("entry_shim_requires_one_entry")
|
|
54
|
+
arguments = args.arguments[1:] if args.arguments[:1] == ["--"] else args.arguments
|
|
55
|
+
_require_tls_verification()
|
|
56
|
+
if args.entry and args.entry.split(":", 1)[0].split(".", 1)[0] == "yutto":
|
|
57
|
+
_require_yutto_tls_verification()
|
|
58
|
+
if args.entry:
|
|
59
|
+
module, name = args.entry.split(":", 1)
|
|
60
|
+
sys.argv = [module, *arguments]
|
|
61
|
+
result = getattr(importlib.import_module(module), name)()
|
|
62
|
+
return result if isinstance(result, int) else 0
|
|
63
|
+
script = Path(args.script).resolve()
|
|
64
|
+
sys.path.insert(0, str(script.parent))
|
|
65
|
+
sys.argv = [str(script), *arguments]
|
|
66
|
+
runpy.run_path(str(script), run_name="__main__")
|
|
67
|
+
return 0
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
raise SystemExit(main())
|