{"id":16674285,"url":"https://github.com/tommy131/owotools","last_synced_at":"2025-10-14T21:41:19.886Z","repository":{"id":184290660,"uuid":"468525990","full_name":"Tommy131/OwOTools","owner":"Tommy131","description":"A Repository for OwOBlog's UI.","archived":false,"fork":false,"pushed_at":"2022-06-19T23:26:15.000Z","size":258,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-26T00:35:02.856Z","etag":null,"topics":["console","frontend","javascript","js","logger","owoblog","tools","web","web-tools"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tommy131.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}},"created_at":"2022-03-10T22:11:18.000Z","updated_at":"2024-09-04T18:12:21.000Z","dependencies_parsed_at":"2023-08-17T22:00:19.289Z","dependency_job_id":null,"html_url":"https://github.com/Tommy131/OwOTools","commit_stats":null,"previous_names":["tommy131/owotools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tommy131/OwOTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tommy131%2FOwOTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tommy131%2FOwOTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tommy131%2FOwOTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tommy131%2FOwOTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tommy131","download_url":"https://codeload.github.com/Tommy131/OwOTools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tommy131%2FOwOTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021378,"owners_count":26087023,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["console","frontend","javascript","js","logger","owoblog","tools","web","web-tools"],"created_at":"2024-10-12T12:30:06.381Z","updated_at":"2025-10-14T21:41:19.839Z","avatar_url":"https://github.com/Tommy131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OwOTools\nOpen source license : ![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg) [Learn More](https://opensource.org/licenses/Apache-2.0)\n\nA Repository for OwOBlog in JavaScript.\u003cbr/\u003e\n一个来自OwOBlog的神奇仓库.\u003cbr/\u003e\n持续更新中... 请给一个Star表示支持我吧QWQ\u003cbr/\u003e\n\u003cb\u003e友情项目地址: \u003c/b\u003e[OwOFrame](https://github.com/OwOBlogTeam/OwOFrame)\n\n\n------\n\n\n## Usage | 用法\n### 1. [Object:Logger]\n\n```js\n// 常规输出;\nlogger.info('Hello World~');\n// 提示输出;\nlogger.notice('Hello World~');\n// 带彩色的输出 (可用于成功执行指定操作时输出此日志);\nlogger.success('Hello World!');\n// 警告输出 (带默认的高亮);\nlogger.warning('Hello World!');\n// 警告提示 (可以选择是否弹窗);\nlogger.alert('Hello World!', /* boom: boolean, default: false */);\n// 错误提示, 使用常规Log格式输出;\nlogger.error('Hello World!');\n// 紧急错误提示, 使用 Error等级格式输出 (与alert一样，可以选择是否弹窗);\nlogger.emergency('Hello World!' /* boom: boolean, default: false */);\n\n// Settings 的默认配置如下:\nconst logger = {\n  settings: {\n    useDate: true,\n    useTime: false,\n  }\n};\n```\n\n效果如下 (默认配置):\u003cbr/\u003e\n![Tested Effect](img/Tested.png)\n\u003cbr/\u003e\n\n\n启用时间输出的效果如下:\u003cbr/\u003e\n```js\nlogger.settings.useDate = true;\nlogger.settings.useTime = true;\n```\n![Tested Effect](img/Tested2.png)\n\u003cbr/\u003e\n\n\n可以关闭默认的日期输出, 使用如下方法:\n```js\nlogger.settings.useDate = false; // 关闭日期输出;\nlogger.settings.useTime = false; // 关闭时间输出;\n```\n效果如下:\u003cbr/\u003e\n![Tested Effect](img/Tested3.png)\n\u003cbr/\u003e\n\n\n\u003e \u003cb\u003e注意:\u003c/b\u003e 当 `logger.settings.useDate` 为 `false` 时, 将不会输出所有日期的格式.\u003cbr/\u003e\n\n\n### 2. [Object:OwO]\n一个通用方法合集. 目前开发进度如下:\u003cbr/\u003e\n- [x] 模拟睡眠方法 (`owo.sleep(second: int|float)`)\n- [x] 高亮容器方法 (`owo.highlight.select(elementName: string, func: callable)`)\n\n#### §2.1 `owo.sleep()`\n此方法采用 `async/await` 模式通过在 `Promise` 下的异步操作模拟睡眠.\u003cbr/\u003e\n具体用法如下:\n```js\n// 打开 logger 中的时间显示作为参考;\nlogger.settings.useTime = true;\nlogger.info(logger.date());\nawait owo.sleep(1);\nlogger.info(logger.date());\nawait owo.sleep(1);\nlogger.info(logger.date());\n```\n运行截图:\u003cbr/\u003e\n![Tested Effect](img/owoSleep.png)\n\u003cbr/\u003e\u003cbr/\u003e\n\n#### §2.2 `owo.highlight.select()`\n一个方便快速找到指定元素的函数. 目前实现的功能比较粗糙简陋, 仅仅使用了 `border` 来修改元素的边框. 预计的工作列表如下:\n- [x] 高亮部分显示\n- [x] 控制台输出\n- [x] 移除高亮部分的函数\n- [ ] 鼠标悬浮时显示一些元素的细节 (例如`高度`, `宽度`, 元素`className`/`id`)\n\n\n范例代码如下:\n```js\ndocument.write('\u003cdiv id=\"test\"\u003e一个容器\u003c/div\u003e');\nconst element = owo.highlight.select('#test').shoot((highlight) =\u003e {\n  console.log(highlight.selector); // 由 owo.highlight 返回获取到的元素; 如果获取不到则返回NULL;\n});\n```\n效果如下:\u003cbr/\u003e\n![Tested Effect](img/owoHighlight_1.png)\n\n同样可以使用 `remove()` 方法移除高亮部分.\n```js\nowo.highlight.select('#test').remove();\n```\n效果如下:\u003cbr/\u003e\n![Tested Effect](img/owoHighlight_2.png)\n\n\n\n------\n\n\n## Statement\n\u0026copy; 2016-2022 [`OwOBlog-DGMT`](https://www.owoblog.com). Please comply with the open source license of this project for modification, derivative or commercial use of this project.\n\n\u003e My Contacts:\n- Website: [`HanskiJay`](https://www.owoblog.com)\n- Telegram: [`HanskiJay`](https://t.me/HanskiJay)\n- E-Mail: [`HanskiJay`](mailto:support@owoblog.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommy131%2Fowotools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommy131%2Fowotools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommy131%2Fowotools/lists"}