SuperAPI AI 工具集

matlab-sharing

通用与其它

查看项目

更新于 10-16 06:45

技能介绍

用途:帮助用户把本地 MATLAB 文件或已有托管内容生成可在浏览器中直接打开的“Open in MATLAB Online”链接,适用于分享代码、让 AI 生成的 MATLAB 代码在 MATLAB Online 中运行,以及为 README 生成徽章。不适用于无需上传的试用、MATLAB Online 功能/许可/账号问题,或仅需交互运行而不生成分享链接的场景。

主要能力:按三种路径生成链接。GitHub 路径支持完整 CLI 自动化,先确认 gh 已安装并登录(gh --version、gh auth status),再执行 git init、git add、git commit 与 gh repo create my-project --public --source=. --push;创建公开仓库前须明确提醒代码将对全网可见并取得确认。MATLAB Drive 无 CLI,仅支持文件夹级分享,需在 https://drive.mathworks.com/ 建文件夹、上传、右键分享生成链接,再从 https://drive.matlab.com/sharing/<uuid>/<filename> 提取 UUID 与文件名。File Exchange 无 CLI,需在 https://www.mathworks.com/matlabcentral/fileexchange/ 发布后提供提交 ID 或页面 URL。

URL 模板:GitHub 为 https://matlab.mathworks.com/open/github/v1?repo=<owner>/<repo>&file=<relative-path>,repo 只写 owner/repo,无 branch/tag 参数,始终克隆默认分支;MATLAB Drive 为 https://matlab.mathworks.com/open/matlabdrive/v1?namespace=SHARED&id=<share-uuid>&file=<filename>,namespace 必填;File Exchange 为 https://matlab.mathworks.com/open/fileexchange/v1?id=<submission-id>,可加 file、project、version、line、focus。多文件需分别生成链接;GitHub 省略 file 克隆整库,Drive 设 file=/ 打开整个文件夹,File Exchange 省略 file 打开完整提交。GitHub 路径可生成徽章: Open in MATLAB Online。

限制与注意:不要添加 branch 参数,Drive 路径须用 /open/matlabdrive/v1 与 namespace=SHARED,repo 参数不得含 https://github.com/ 前缀,含空格或特殊字符的文件路径需 URL 编码。未提供上传路径时应同时给出三种选项。其他细节暂未提供。