{"id":16423728,"url":"https://github.com/cofcool/sourcebox","last_synced_at":"2025-03-23T07:32:43.299Z","repository":{"id":65382995,"uuid":"587565184","full_name":"cofcool/sourcebox","owner":"cofcool","description":"秘源宝箱(The Source Box)，包含众多小工具的宝箱，借用秘源之力解放自我 🎉🎉🎉","archived":false,"fork":false,"pushed_at":"2024-10-09T10:24:28.000Z","size":832,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T07:41:29.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/cofcool.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":"2023-01-11T03:30:04.000Z","updated_at":"2024-10-09T10:24:32.000Z","dependencies_parsed_at":"2024-04-30T07:28:42.364Z","dependency_job_id":"d391b518-cdd4-41a1-be58-73bc7b35765a","html_url":"https://github.com/cofcool/sourcebox","commit_stats":null,"previous_names":["cofcool/sourcebox"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofcool%2Fsourcebox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofcool%2Fsourcebox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofcool%2Fsourcebox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofcool%2Fsourcebox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cofcool","download_url":"https://codeload.github.com/cofcool/sourcebox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221847035,"owners_count":16890952,"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":[],"created_at":"2024-10-11T07:40:42.618Z","updated_at":"2025-03-23T07:32:43.287Z","avatar_url":"https://github.com/cofcool.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 秘源宝箱\n\n**包含众多小工具的宝箱，借用秘源之力解放自我  🎉🎉🎉**\n\n---\n\n使用 Java（要求 JDK 21, 推荐使用 `GraalVM`）、Python、Go 等语言实现，桌面版使用 KMP 实现\n\n* `./sourcebox.sh` 查看程序信息，`--help={COMMAND}` 查看具体命令的帮助信息, 如 `--help=converts`\n* `--debug=true` 打开调试模式\n\n部分命令支持别名， 如 `--tool=converts --cmd=md5 --in=test` 的别名为 `--md5=test`，具体可查看帮助文档，也可借助命令助手配置别名\n\n项目构建:\n\n* `mvn package` 构建 jar 包，同时构建 Go 版实现\n\n**TODO**\n\n* [ ] Web\n\n***Java 实现支持全平台（需预先安装 JRE 21）, 由 Go 实现的功能只提供 Linux 平台的软件包***\n\n## 命令助手\n\n使用前需要把 `source ～/.sourcebox/alias` 添加到 shell 配置中\n\n* 命令管理，方便管理日常使用的长命令，如查询，添加标签等\n* 别名管理，可针对长命令配置别名，并导出到当前环境\n\n使用:\n\n* 添加 `./sourcebox.sh --tool=cHelper --add=\"@helper sourcebox --tool=cHelper #sourcebox #my\"`，`@`开头的为别名，可选参数；`#`开头的为标签，可以为多个，可选参数\n* 导出到环境变量 `./sourcebox.sh --tool=cHelper --store=ALL` ，`--store` 参数可指定需要导出的命令，支持别名和标签，如 `--store=\"#kafka\"`，只会导出有别名的命令\n* 查询 `./sourcebox.sh --tool=cHelper --find=ALL` 查询命令，支持别名和标签，可以多个，如 `--find=\"#my @helper\"`\n* 删除 `./sourcebox.sh --tool=cHelper --del=ALL` 删除命令，支持别名和标签，可以多个，如 `--del=\"#my @helper\"`\n\n内置别名：\n\n```\n@helper sourcebox --tool=cHelper #sourcebox\n@mlower sourcebox --tool=converts --cmd=lower #sourcebox\n@mupper sourcebox --tool=converts --cmd=upper #sourcebox\n@mmd5 sourcebox --tool=converts --cmd=md5 #sourcebox\n@mtimesp sourcebox --tool=converts --cmd=timesp #sourcebox\n@mnow sourcebox --tool=converts --cmd=now #sourcebox\n@mhdate sourcebox --tool=converts --cmd=hdate #sourcebox\n```\n\n## 常用字符串转换工具\n\n使用: `./sourcebox.sh --tool=converts --cmd=\"now\" --pipeline=\"md5 | base64\"`\n\n支持功能（可通过 `|` 连接多个命令）:\n\n* md5，生成指定字符串的 md5 值\n* kindle，Kindle 笔记内容转换为 Markdown 文档\n* upper/lower，字符串大小写转换\n* hdate，时间戳转换为易于阅读的时间格式\n* timesp，把时间转换为时间戳\n* now，当前时间戳\n* replace，字符串替换\n* base64，编码和解码\n* morsecode，摩尔斯电码转换\n* security，加密/解密\n* dataunit，字节显示更易读\n* ...\n\n## 网页下载\n\n* 链接递归遍历\n* 代理\n* 批量下载\n* 转换为 markdown、text、epub\n\n使用: `./sourcebox.sh --tool=htmlDown --url=\"https://example.com\"`\n\n## Git 提交记录生成更新日志\n\n使用: `./sourcebox.sh --tool=gitCommits2Log --path=./`\n\n## 简单 Web 文件服务器\n\n使用 `./sourcebox.sh --tool=dirWebServer`\n\n## JSON 生成对象\n\n使用: `./sourcebox.sh --tool=json2POJO --path=./`\n\n支持:\n\n* Java class/record\n\n## Trello 导出的 JSON 文件导入到 Logseq\n\n支持把从 Trello 看板导出的 JSON 文件导入到 Logseq\n\n##  文件重命名\n\n使用: `./sourcebox.sh --tool=rename --path=./`\n\n支持:\n\n* order, 文件序号\n* date, 日期\n* datetime, 时间\n* urlencoded, 解码 URL 编码\n* replace, 字符串替换\n\n## Git diff 分析\n\n* 根据 diff 信息抽取对应行的变更记录\n\n使用: `git diff --unified=0 --diff-filter=M . | ./sourcebox.sh --tool=analysisDiff --path=./ \u003e diff.csv`\n\n## 文件处理工具\n\n* 统计一个文件内容在另一个文件中的数量，使用: `./sourcebox.sh --tool=fileTools --util=count --samplePath=sample.csv --path=data.csv`\n* 根据传入的字符或索引切割文件内容，使用: `./sourcebox.sh --tool=fileTools --util=split --path=data.csv --splitIdx=2`\n\n## 网络工具\n\n* IP 信息查询，`./sourcebox.sh --tool=netUtils --util=ip --in=127.0.0.1`\n* DNS 查询，`./sourcebox.sh --tool=netUtils --util=dns --in=github.com`\n\n## 阅读软件笔记、高亮导出为 markdown 文件\n\n支持 Kindle、Moon+ Reader\n\n## LinkCovertTool\n\nJava，可把后缀为`.desktop`，`.webloc`的多个网页快捷文件提取到链接并输出到Markdown文件。\n\n## 简单笔记\n\n简单笔记软件，开发目的是为局域网内部的多台设备进行信息同步，基于 Vert.x Web 开发，内容以 JSON 格式存储到文件中\n\n配置:\n\n* filepath，文件保存路径，默认为当前目录\n* filename，文件名称，默认为 `note.json`\n* port，监听端口，默认为 `38080`\n\n## JSON 格式化\n\n使用: `./sourcebox.sh --tool=json [--json='{}'] [--path=dmeo.json]`，支持 JSON Line\n\n## 重复执行 SHELL 命令\n\n支持指定执行次数，循环次数，执行频率等，使用: `./sourcebox.sh --tool=task --count=10 --cmd='echo $count'`\n\n## 参与开发\n\n执行流程：\n\n![sourcebox-flow](./imgs/mytoolbox-flow.svg)\n\n## 致谢\n\n\u003ca href=\"https://jb.gg/OpenSourceSupport\"\u003e\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png\" alt=\"JetBrains Logo (Main) logo.\" width=\"20%\" height=\"20%\"\u003e\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofcool%2Fsourcebox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcofcool%2Fsourcebox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofcool%2Fsourcebox/lists"}