{"id":17987861,"url":"https://github.com/lujun9972/youdao.sh","last_synced_at":"2025-07-15T07:10:07.576Z","repository":{"id":91558911,"uuid":"205743318","full_name":"lujun9972/youdao.sh","owner":"lujun9972","description":"简单的调用有道智云文本翻译API进行翻译的脚本.","archived":false,"fork":false,"pushed_at":"2019-09-04T09:27:24.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T15:11:53.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/lujun9972.png","metadata":{"files":{"readme":"README.org","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":"2019-09-01T23:18:04.000Z","updated_at":"2019-09-04T09:27:26.000Z","dependencies_parsed_at":"2023-03-12T02:00:57.714Z","dependency_job_id":null,"html_url":"https://github.com/lujun9972/youdao.sh","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/lujun9972%2Fyoudao.sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fyoudao.sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fyoudao.sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lujun9972%2Fyoudao.sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lujun9972","download_url":"https://codeload.github.com/lujun9972/youdao.sh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247114281,"owners_count":20885905,"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-29T19:09:56.538Z","updated_at":"2025-04-04T03:23:52.066Z","avatar_url":"https://github.com/lujun9972.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: README\n#+AUTHOR: lujun9972\n#+TAGS: youdao.sh\n#+DATE: [2019-09-03 二 19:15]\n#+LANGUAGE:  zh-CN\n#+STARTUP:  inlineimages\n#+OPTIONS:  H:6 num:nil toc:t \\n:nil ::t |:t ^:nil -:nil f:t *:t \u003c:nil\n\n简单的调用有道智云文本翻译API进行翻译的脚本.\n\n* feature\n+ 允许自定义显示模板\n+ 允许自定义从json结果中抽取域值的filter\n\n* Requirements\n+ jq\n+ curl\n  \n* Usage\n1. 在 =youdao.cfg= 中配置变量名和从json结果中抽取域值的filter的对应关系\n   #+BEGIN_SRC conf\n     errorCode=.errorCode\n     query=.query\n     translation=.translation[0]\n     speakUrl=.speakUrl\n   #+END_SRC\n   \n   其中filter需要遵循 =jq= 命令的filter规则\n\n2. 在 =youdao.template= 中配置显示模板,其中可以用shell格式嵌入 =youdao.cfg= 中配置好的变量\n   #+BEGIN_EXAMPLE\n     翻译结果： ${translation}\n   #+END_EXAMPLE\n\n3. 使用 =youdao.sh 翻译= 查询结果\n   #+BEGIN_SRC shell :results org\n     ./youdao.sh hello world\n   #+END_SRC\n\n   #+RESULTS:\n   #+BEGIN_SRC org\n   翻译结果： 你好，世界\n   #+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fyoudao.sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flujun9972%2Fyoudao.sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flujun9972%2Fyoudao.sh/lists"}