{"id":24975156,"url":"https://github.com/jeffersonqin/mahirulauncher","last_synced_at":"2025-04-11T11:51:37.122Z","repository":{"id":108622068,"uuid":"408307845","full_name":"JeffersonQin/MahiruLauncher","owner":"JeffersonQin","description":"🍢  Cross-platform modular launcher","archived":false,"fork":false,"pushed_at":"2022-02-18T09:44:12.000Z","size":284,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T08:11:14.394Z","etag":null,"topics":["avaloniaui","cross-platform","csharp","dotnet","mvvm","osx","script","task-scheduler"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeffersonQin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-20T04:16:34.000Z","updated_at":"2024-06-26T13:05:56.000Z","dependencies_parsed_at":"2023-03-25T20:32:33.615Z","dependency_job_id":null,"html_url":"https://github.com/JeffersonQin/MahiruLauncher","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonQin%2FMahiruLauncher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonQin%2FMahiruLauncher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonQin%2FMahiruLauncher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeffersonQin%2FMahiruLauncher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeffersonQin","download_url":"https://codeload.github.com/JeffersonQin/MahiruLauncher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248390424,"owners_count":21095793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avaloniaui","cross-platform","csharp","dotnet","mvvm","osx","script","task-scheduler"],"created_at":"2025-02-03T20:44:51.729Z","updated_at":"2025-04-11T11:51:37.108Z","avatar_url":"https://github.com/JeffersonQin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MahiruLauncher\n\n跨平台脚本管理启动器\n\n## Introduction\n\n首先介绍这个工具里的两个概念：\n\n* Script: 配置的脚本\n* Task: 运行的任务\n\nTask 可以由 Script 点击 Run 直接新建并运行，也可以由发送 POST 请求到 Server 产生，参见 Server API Section\n\n### Script\n\n配置字段：\n\n* Name: 脚本名称\n* Identifier: 脚本 ID\n* Description: 脚本简介\n* Process Name (File Name): 进程名 / (二进制)文件路径。如果是 Working Directory 的相对路径，在路径前加上 `*` 即可。例如: `*.\\venv\\Scripts\\python.exe`。\n* Working Directory: 工作目录，相对目录可以在 settings 里的 Relative Working Directory 里设置，也可以直接填写绝对目录\n* Redirect Stream to File (启用本选项则无法 Use Shell to Execute): 是否重定向 stdout 和 stderr 到文件\n* Use Shell Execute: 使用 Shell 执行\n* Create No Window: **不**产生窗口\n* Starts when App Starts: 工具启动时自动创建任务执行 (适用于 server 类的脚本)\n* Default Argument List 默认参数列表\n  * Name / Var: 参数名称 / 描述，或者调用程序提供的变量 (如活动任务的 uuid)\n  * Value: 参数值\n* Drag and Drop Argument Name: 将拖拽到 script 上的内容当作参数的参数名称（支持文本和文件列表）\n\n### Task\n\n每个 Task 由多种状态：\n\n* Success [Green]: 脚本像服务器汇报成功执行\n* Waiting [White]: 没有开始执行 (常见于任务创建失败时)\n* Error [Red]: 没有汇报成功便终止了进程\n* Running [Blue]: 执行中\n* Killed [Orange]: 用户手动终止\n\n### Special Var\n\n* `$[SCHEDULE_UUID]`: 当前任务的 `uuid`\n\n## Server API\n\n### GET `/finish/{id}`\n\n* 说明：汇报 uuid 为 `{id}` 的任务已经**成功**完成，如果汇报但是脚本运行结束了就会把 task 判定为失败\n* 参数：\n  * `{id}`: 任务的 `uuid`\n* 返回值格式: `json`\n* 返回值字段：\n  * `Status`: 状态, `\"success\"|\"error\"`\n  * `Message`: 信息\n* 返回值示例:\n  ```json\n  {\n\t  \"Status\": \"success\",\n\t  \"Message\": \"\"\n  }\n  ```\n  ```json\n  {\n\t  \"Status\": \"error\",\n\t  \"Message\": \"task not found\"\n  }\n  ```\n\n### POST `/start`\n\n* 说明：开始新的任务\n* 表单参数：\n  * `id`: 要启动的 Script 的 ID\n  * `arguments`: json 格式的自定义参数列表（用于替换 Default Argument List 中的某些字段）\n* 返回值格式: `json`\n* 返回值字段：\n  * `Status`: 状态, `\"success\"|\"error\"`\n  * `Message`: 信息\n* 返回值示例:\n  ```json\n  {\n\t  \"Status\": \"success\",\n\t  \"Message\": \"\"\n  }\n  ```\n\n## Build\n\n* Windows: 正常 build 即可\n* OSX:\n  ```bash\n  ./build-app.sh \u003cshort-version-string\u003e\n  ```\n\n## Screenshots\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"./screenshots/scripts.png\" width=220 style=\"vertical-align: middle\"\u003e\n\t\u003cimg src=\"./screenshots/tasks.png\" width=220 style=\"vertical-align: middle\"\u003e\n\t\u003cimg src=\"./screenshots/editor.png\" width=220 style=\"vertical-align: middle\"\u003e\n\u003c/div\u003e\n\n## TODO\n\n- [x] Drag \u0026 drop to run\n- [x] Email notification when failed\n- [x] Import \u0026 export xml files\n- [x] Settings\n- [ ] Scheduler (cron)\n- [x] Python library\n- [ ] Python script template\n\n## Technology Used\n\n* [AvaloniaUI/Avalonia](https://github.com/AvaloniaUI/Avalonia)\n* [unosquare/embedio](https://github.com/unosquare/embedio)\n* [Jetbrains Rider](https://www.jetbrains.com/rider/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffersonqin%2Fmahirulauncher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffersonqin%2Fmahirulauncher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffersonqin%2Fmahirulauncher/lists"}