{"id":50512532,"url":"https://github.com/cppcoffee/translator","last_synced_at":"2026-06-02T21:03:42.035Z","repository":{"id":360111856,"uuid":"1248751309","full_name":"cppcoffee/translator","owner":"cppcoffee","description":"A lightweight Chinese-English bidirectional translation command-line tool","archived":false,"fork":false,"pushed_at":"2026-05-25T03:32:04.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T04:27:47.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/cppcoffee.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-25T02:42:30.000Z","updated_at":"2026-05-25T03:32:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cppcoffee/translator","commit_stats":null,"previous_names":["cppcoffee/translator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cppcoffee/translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Ftranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Ftranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Ftranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Ftranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppcoffee","download_url":"https://codeload.github.com/cppcoffee/translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppcoffee%2Ftranslator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33835766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"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":[],"created_at":"2026-06-02T21:03:41.950Z","updated_at":"2026-06-02T21:03:42.030Z","avatar_url":"https://github.com/cppcoffee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Translator\n\nA Chinese-English translation tool using OpenAI-compatible APIs.\n\n## Features\n\n- Chinese → English translation\n- English → Chinese translation\n\n## Requirements\n\nNo external dependencies required. Uses Python standard library only.\n\nPython 3.6+ is required.\n\n## Installation\n\n```bash\ngit clone \u003crepo-url\u003e\ncd translator\n```\n\n## Configuration\n\nEdit `.env` file with your API settings. Supports OpenAI-compatible APIs:\n\n**OpenAI:**\n```env\nAPI_KEY=sk-xxx\nBASE_URL=https://api.openai.com/v1\nMODEL=gpt-4o\n```\n\n**DeepSeek:**\n```env\nAPI_KEY=sk-xxx\nBASE_URL=https://api.deepseek.com\nMODEL=deepseek-chat\n```\n\n**Other compatible providers** (Anthropic, local LLMs, etc.) work similarly.\n\n## Usage\n\nRun the script:\n\n```bash\npython translator.py\n```\n\nOr create a symlink for global access:\n\n```bash\nsudo ln -s /path/to/translator/translator.py /usr/local/bin/tt\n```\n\nThen use directly:\n\n```bash\ntt\n```\n\nFollow the prompts to select translation direction and input your text.\n\n## Example\n\n```\nSelect translation direction:\n1. Chinese -\u003e English\n2. English -\u003e Chinese\n\nEnter option (1/2, default: 1): 1\n\nEnter Chinese text (Ctrl+C or empty to exit):\n\n\u003e 你好，世界\nHello, world\n\n\u003e 今天天气怎么样\nHow's the weather today\n\n\u003e\nExit.\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Ftranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppcoffee%2Ftranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppcoffee%2Ftranslator/lists"}