{"id":22185874,"url":"https://github.com/wangle201210/dt","last_synced_at":"2026-03-04T19:31:42.883Z","repository":{"id":249781089,"uuid":"832483112","full_name":"wangle201210/dt","owner":"wangle201210","description":"数据转换","archived":false,"fork":false,"pushed_at":"2024-08-29T10:29:39.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-12T06:07:52.574Z","etag":null,"topics":["data-transfer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangle201210.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-23T05:51:42.000Z","updated_at":"2025-05-15T13:53:25.000Z","dependencies_parsed_at":"2024-07-29T04:34:56.455Z","dependency_job_id":null,"html_url":"https://github.com/wangle201210/dt","commit_stats":null,"previous_names":["wangle201210/dt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wangle201210/dt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangle201210%2Fdt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangle201210%2Fdt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangle201210%2Fdt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangle201210%2Fdt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangle201210","download_url":"https://codeload.github.com/wangle201210/dt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangle201210%2Fdt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30090523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T18:31:08.343Z","status":"ssl_error","status_checked_at":"2026-03-04T18:31:07.708Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-transfer"],"created_at":"2024-12-02T10:17:56.477Z","updated_at":"2026-03-04T19:31:42.849Z","avatar_url":"https://github.com/wangle201210.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# data-transfer\n数据转换\n## 安装\n1. 如果有golang环境：`go install github.com/wangle201210/dt@latest`  \n2. 如果有home brew：`brew tap wangle201210/dt` \u0026 `brew install dt`  \n3. 在[releases](https://github.com/wangle201210/dt/releases/tag/v0.0.1-alpha)下载可执行文件\n\n## 功能列表\n1. md5\n- [x] string 转 md5 `dt md5 wanna` echo `aa4dec62924881f79122e03e2254131a`\n2. time\n- [x] date 转 时间戳 `dt time date -d \"2024-07-23 15:50:39\"` echo `1721749839`\n- [x] 时间戳 转 date `dt time ts -t 1721749839` echo `2024-07-23 15:50:39`\n3. base64\n- [x] 字符串 转 base64 `dt base64 -e wanna` echo `d2FubmE=`\n- [x] base64 转 字符串 `dt base64 -d d2FubmE=` echo `wanna`\n- [x] base64 转 图片 `dt base64 -i \"data:image/png;base64,***\"` echo `temp_image_**.png` 可以不加前缀 `data:image/png;base64,`\n- [x] 图片 转 base64 `dt base64 -p temp_image_**.png` echo `编码后的图片数据`\n4. url\n- [x] 字符串编码为query `dt url -e \"https://www.baidu.com?name=wanna\u0026email=a@b.c\"` echo `https%3A%2F%2Fwww.baidu.com%3Fname%3Dwanna%26email%3Da%40b.c`\n- [x] query解码为字符串 `dt url -d https%3A%2F%2Fwww.baidu.com%3Fname%3Dwanna%26email%3Da%40b.c` echo `https://www.baidu.com?name=wanna\u0026email=a@b.c`\n5. rand\n- [x] 随机生成字符串 `dt rand -l 10` echo `f9UyjsHd1Q`\n- [x] 随机生成长度为N的数字 `dt rand -n -l 10` echo `9071824719`\n6. json\n- [x] toml转json `dt json toml demo.toml` echo `... ...`\n- [x] json转struct `dt json struct '{\"example\":{\"from\":{\"json\":true}}}'` echo `... ...` 可以 -f 传文件名\n\n\u003e 组合命令 `dt rand -l 10 | xargs dt md5 | xargs dt base64 -e` echo `YWU1ZTRjOGUzZDAxYjIzM2E2OTlkYzk3OTFmYTA3ZjE=`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangle201210%2Fdt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangle201210%2Fdt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangle201210%2Fdt/lists"}