{"id":21090663,"url":"https://github.com/ycrao/scripts-for-scriptable","last_synced_at":"2025-08-04T18:40:49.739Z","repository":{"id":82851255,"uuid":"573387091","full_name":"ycrao/scripts-for-scriptable","owner":"ycrao","description":"as its name","archived":false,"fork":false,"pushed_at":"2025-05-15T05:25:22.000Z","size":17026,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T05:27:12.295Z","etag":null,"topics":["douyin-video-download","hot-news","ios-app","learning-scriptable","macos-app","price-tracker","scriptable-app","scriptable-demo","scriptable-widgets","widgets"],"latest_commit_sha":null,"homepage":"https://raoyc.com/rstore/app.html","language":"JavaScript","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/ycrao.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,"zenodo":null}},"created_at":"2022-12-02T10:45:41.000Z","updated_at":"2025-05-15T05:25:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd682a04-3722-46d1-9bc0-06a057248969","html_url":"https://github.com/ycrao/scripts-for-scriptable","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycrao%2Fscripts-for-scriptable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycrao%2Fscripts-for-scriptable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycrao%2Fscripts-for-scriptable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycrao%2Fscripts-for-scriptable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycrao","download_url":"https://codeload.github.com/ycrao/scripts-for-scriptable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538417,"owners_count":22087862,"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":["douyin-video-download","hot-news","ios-app","learning-scriptable","macos-app","price-tracker","scriptable-app","scriptable-demo","scriptable-widgets","widgets"],"created_at":"2024-11-19T21:39:10.730Z","updated_at":"2025-08-04T18:40:49.705Z","avatar_url":"https://github.com/ycrao.png","language":"JavaScript","readme":"# scripts-for-scriptable\n\n\u003e   Just as its name.\n\n[iOS Scriptable](https://scriptable.app/) | [TestFlight](https://testflight.apple.com/join/uN1vTqxk) | [macOS Scriptable](https://scriptable.app/mac-beta/)\n\n### 应用商店\n\n\u003cimg src=\"screenshot/Install_rStore_shortcut_qrcode.png\" alt=\"rStore\" width=\"450\" height=\"450\" /\u003e\n\n扫描上面快捷指令二维码运行或者手动导入 [rStore](app/rStore.js) 脚本或者到 `Scriptable` 中，后续即可快捷安装更新本人出品的应用。如脚本能起到增效或娱乐作用，请 `Star` 支持，谢谢！\n\n应用商店截图：\n\n\u003cimg src=\"screenshot/rStore.png\" alt=\"rStore\" width=\"540\" height=\"1168\" /\u003e\n\n### demo\n\n\u003e   Some component demos.\n\n- [request_demo](demo/request_demo.js)\n- [alert_demo](demo/alert_demo.js), see [screenshot](screenshot/alert_demo.png)\n- [dictation_demo](demo/dictation_demo.js)\n- [speech_demo](demo/speech_demo.js)\n- [location_demo](demo/location_demo.js)\n- [message_demo](demo/message_demo.js)\n- [keychain_demo](demo/keychain_demo.js)\n- [webview_demo](demo/webview_demo.js), see [screenshot](screenshot/webview_demo.png)\n- [uitable_demo](demo/uitable_demo.js) support light and dark appearance, see [screenshot](screenshot/uitable_demo.png)\n- [widget_demo](demo/widget_demo.js) a widget to show Chinese poetry, see [screenshot](screenshot/widget_demo.png)\n\n### module or library\n\n- [spark-md5.min.js](app/spark-md5.min.js) code from [js-spark-md5](https://github.com/satazor/js-spark-md5)\n- [cache.module](app/cache.module.js)\n- [http.module](app/http.module.js)\n\n#### usage\n\n```js\n// using md5 hash\nconst sparkMD5 = importModule(\"spark-md5.min\");\nlet hash = sparkMD5.hash(\"hi, there\")\nconsole.log(hash)\n\n// using cache module\nconst $cache = importModule(\"cache.module\")\n\n// impl by Keychain\n// note: you can pass prefix string to isolate different app\nlet sCache = $cache.useSecureStorage('prefixForApp1')\nsCache.set(\"hello\", \"world\")\nlet sVal = sCache.get(\"hello\")\nconsole.log(sVal)\n\n// impl by FileManager\n// note: you can pass prefix string to isolate different app\nlet fCache = $cache.useFileStorage('prefixForApp2')\nfCache.set(\"hello\", \"world\")\nlet fVal = fCache.get(\"hello\")\nconsole.log(fVal)\n\n// using http module\nconst $http = importModule(\"http.module\")\n$http.req('get', 'https://httpbin.org/ip').loadJSON().then(resp =\u003e {\n    let ip = resp.origin\n    console.log(ip);\n});\n```\n\n### app\n\n\u003e   除非特别说明，所有脚本同样也支持 `Scriptable` 电脑版，下面是 `macOS` 下的通知栏小组件预览图：\n\n\u003cimg src=\"screenshot/apps_on_macOS.png\" alt=\"apps_on_macOS\" width=\"368\" height=\"1032\" /\u003e\n\n| 名称 | 中文名称 | 说明或备注 |\n| --------------------------- | ---------- | ------------------------- |\n| [IPTV](app/IPTV.js) 🆕 ❌（已失效不可用）| 网络电视 | 手机在线看电视 |\n| [zhihuHot](app/zhihuHot.js) | 知乎热点 | 展示知乎热点数据，50条结果中随机 |\n| [priceReminder](app/priceReminder.js) | 贵金属价格提示器 | 展示现货黄金/白银价格 |\n| [acgGirl](app/acgGirl.js) | 二次元妹子 | 各种二次元妹子，支持多种来源提供者 |\n| [dogDiary](app/dogDiary.js) | 舔狗日记 | 舔到最后，一无所有 |\n| [videoHelper](app/videoHelper.js) ❌（API解析已失效，改为打开第三方网站） | 视频助手 | 支持头条系等应用短视频下载 |\n| [acgPPT](app/acgPPT.js) | 动漫游PPT | 动态切换动漫游主题图片 |\n| [todayHistory](app/todayHistory.js) | 历史上的今天 | 展示历史上的今天旧闻 |\n| [showPhoto](app/showPhoto.js) | 秀相册 | 展示本地相册图片 |\n| [iLottery](app/iLottery.js) | 爱彩票 | 展示彩票开奖结果 |\n\n### IPTV 🆕\n\n\u003e   无须借助第三方，直接在 iPhone 手机上看电视，默认使用 [fanmingming ipv6](https://github.com/fanmingming/live/blob/main/tv/m3u/ipv6.m3u) 源文件，IPv6 网络下使用最佳。\n\n预览图如下：\n\n\u003cimg src=\"screenshot/watching-iptv.gif\" alt=\"zhihuHot\" width=\"400\" height=\"865\" /\u003e\n\n\n#### zhihuHot\n\n\u003e   展示知乎热点，建议提前安装好知乎 App，以方便点击跳转，源代码 [zhihuHot](app/zhihuHot.js)，依赖同目录下 `http.module` 与 `cache.module` 模块。\n\n预览图如下：\n\n\u003cimg src=\"screenshot/zhihuHot.png\" alt=\"zhihuHot\" width=\"400\" height=\"216\" /\u003e\n\n#### priceReminder\n\n\u003e   贵金属价格提示器，展示 `XAUUSD/XAGUSD/Au(T+D)/Ag(T+D)` 等价格，数据来源新浪财经，由于 widget 机制，价格刷新不及时。\n\n预览图如下：\n\n\u003cimg src=\"screenshot/priceReminder.png\" alt=\"priceReminder\" width=\"414\" height=\"222\" /\u003e\n\n\n#### acgGirl\n\n\u003e   展示各种二次元妹子，支持多种提供者来源，在 `widget` 配置中，可以填写下列任一个提供者 `provider` 。\n\u003e   *特别注意*：部分 `provider` 网站可能已失效无法访问，请以最新代码为准。\n\n```\nhanxiaohan\nxjh\nyimian\nyiluo\nbtstu\nr10086\n```\n\n预览图如下：\n\n\u003cimg src=\"screenshot/acgGirl_config.png\" alt=\"acgGirl_config\" width=\"423\" height=\"405\" /\u003e\n\n\u003cimg src=\"screenshot/acgGirl.png\" alt=\"acgGirl\" width=\"407\" height=\"676\" /\u003e\n\n#### dogDiary\n\n\u003e   舔狗日记（语录），舔狗数据来源 [we.dog](https://github.com/xiongbao/we.dog) ，内置到脚本中，没有对接定位与天气接口，天气类型随机处理（支持 widget 参数传入）。\n\n预览图如下：\n\n\u003cimg src=\"screenshot/dogDiary.png\" alt=\"dogDiary\" width=\"403\" height=\"230\" /\u003e\n\n#### videoHelper\n\n\u003e   视频助手，解析接口来自[TikDD](https://www.tikdd.cc/zh-Hans/)，仅支持抖音与 `TikTok`。已过时或失效API： \u003cdel\u003e[星辰API](https://api.xcboke.cn/doc/juhe.html)\u003c/del\u003e \u003cdel\u003e[猪猪API](https://api.iculture.cc/)\u003c/del\u003e， 文档中说支持“抖音/快手/火山/微博/虎牙/轻视频/梨视频/皮皮虾/皮皮搞笑/微视/最右/VUE Vlog/新片场/度小视/六间房/acfun”，目前仅测试过抖音，其它平台请自测。\n\n需要搭配苹果官方 “快捷指令” 与 “文件” App使用，请在快捷指令中搜索并安装 “文件下载” 指令。\n\n\u003cimg src=\"screenshot/shortcut.png\" alt=\"shortcut\" width=\"469\" height=\"900\" /\u003e\n\n“文件下载” 指令是保存到 `iCloud` 云盘；如果需要下载保存到本地相簿，可以在手机中打开 [此链接](https://www.icloud.com/shortcuts/8e4fd6da777e418498237e00621b969f) 或者扫描下面二维码安装 “DownloadVideo” 快捷指令，然后再自行修改 [videoHelper.js](app/videoHelper.js) 脚本代码，将 `cb.addParameter(\"name\", \"下载文件\")` 修改为 `cb.addParameter(\"name\", \"DownloadVideo\")` 即可。\n\n\u003cimg src=\"screenshot/DownloadVideo_shortcut_qrcode.png\" alt=\"DownloadVideo_shortcut_qrcode\" width=\"450\" height=\"450\" /\u003e\n\n\n使用时，请复制各短视频APP分享地址然后到 `Scriptable` 应用执行此脚本（通过剪切板方式）；或者应用中分享拉到最右“更多分享”，选择 `Run Script` 选定 `VideoHelper` 脚本（如果未出现，请检查一下是否存在设置过 `Share Sheet Inputs` 且选择 `Text` 以及开启 `Always Run in App`，见下图）。如果出现获取剪切板权限以及链接到网络等选项请保持允许，否则可能解析下载失败。\n\n\u003cimg src=\"screenshot/videoHelper_flow.png\" alt=\"videoHelper_flow\" width=\"568\" height=\"817\" /\u003e\n\n\n快捷使用起见，你也可以添加此脚本到手机桌面，操作流程大致如下：\n\n\n\u003cimg src=\"screenshot/videoHelper_flow2.png\" width=\"569\" height=\"422\" /\u003e\n\n#### acgPPT\n\n顾名思义，可以动态切换的动漫游图片集，由 `r10086.com` 提供，注意该网站为原作者使用 `frp` 内穿构建的，可能存在不稳定性。点此查看 [原始网站](https://img.r10086.com/) 说明。\n\n\u003cimg src=\"screenshot/acgPPT.gif\" width=\"410\" height=\"410\" /\u003e\n\n#### todayHistory\n\n历史上的今天，以榜单形式展示，数据来源 [tool.lu](https://tool.lu/todayonhistory/) ，点击条目之后可以跳转到百度移动版搜索旧闻。\n\n\u003cimg src=\"screenshot/todayHistory.png\" width=\"308\" height=\"286\" /\u003e\n\n\n#### showPhoto\n\n不同于 `acgGirl` 脚本从网络下载图，`showPhoto` 从本地相册中选图（更加安全可控，可用于展示一些纪念性的图片如结婚照等），然后保存到缓存中，当应用到手机桌面 `widget` 时， 将直接使用缓存中的图片数据。\n\n\u003cimg src=\"screenshot/showPhoto_1.png\" width=\"446\" height=\"934\" /\u003e\n\n\u003cimg src=\"screenshot/showPhoto_2.png\" width=\"442\" height=\"752\" /\u003e\n\n\n#### iLottery\n\n展示中国彩票双色球与大乐透开奖结果，开奖数据来源 [500彩票网](https://500.com/) ，可能存在不及时情况。脚本默认展示大乐透（`dlt`），可在 widget 配置中传入双色球汉语拼音缩写（`ssq`）切换成双色球结果。\n\n特别提醒：双色球每周二、四、日开奖；大乐透每周一、三、六开奖。\n\n\u003cimg src=\"screenshot/iLottery.png\" width=\"530\" height=\"302\" /\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycrao%2Fscripts-for-scriptable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycrao%2Fscripts-for-scriptable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycrao%2Fscripts-for-scriptable/lists"}