{"id":13484192,"url":"https://github.com/pawurb/termit","last_synced_at":"2025-03-27T16:30:33.371Z","repository":{"id":10125277,"uuid":"12195612","full_name":"pawurb/termit","owner":"pawurb","description":"Translations with speech synthesis in your terminal as a ruby gem","archived":true,"fork":false,"pushed_at":"2017-05-25T08:07:25.000Z","size":423,"stargazers_count":508,"open_issues_count":0,"forks_count":20,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-13T00:02:20.649Z","etag":null,"topics":["google-translate","ruby","ruby-gem","speech-synthesis","terminal","translation","translations"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"DirtyUnicorns/android_vendor_du","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pawurb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-18T13:24:30.000Z","updated_at":"2024-10-22T09:55:35.000Z","dependencies_parsed_at":"2022-09-05T06:01:51.402Z","dependency_job_id":null,"html_url":"https://github.com/pawurb/termit","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawurb%2Ftermit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawurb%2Ftermit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawurb%2Ftermit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pawurb%2Ftermit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pawurb","download_url":"https://codeload.github.com/pawurb/termit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245882181,"owners_count":20687842,"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":["google-translate","ruby","ruby-gem","speech-synthesis","terminal","translation","translations"],"created_at":"2024-07-31T17:01:20.414Z","updated_at":"2025-03-27T16:30:32.937Z","avatar_url":"https://github.com/pawurb.png","language":"Ruby","readme":"# Termit [![Build Status](https://travis-ci.org/pawurb/termit.svg)](https://travis-ci.org/pawurb/termit) [![Gem Version](https://badge.fury.io/rb/termit.svg)](http://badge.fury.io/rb/termit) [![Coverage Status](https://coveralls.io/repos/pawurb/termit/badge.svg)](https://coveralls.io/r/pawurb/termit)\n\nTermit is an easy way to translate stuff in your terminal. You can check out its node.js npm version [normit](https://github.com/pawurb/normit).\n\n## Installation\n```bash\ngem install termit\n```\n\n## Usage\n```bash\ntermit 'source_language' 'target_language' 'text'\n```\n\nExample:\n\n```bash\ntermit en es \"hey cowboy where is your horse?\"\n=\u003e \"Hey vaquero dónde está tu caballo?\"\n\ntermit fr en \"qui est votre papa?\"\n=\u003e \"Who's Your Daddy?\"\n```\n\nQuotation marks are not necessary for text data input:\n```bash\ntermit fr ru qui est votre papa\n=\u003e \"Кто твой папочка?\"\n```\n\n### Speech synthesis\n\nSpecify a **-t** (talk) flag to use speech synthesis (requires mpg123):\n```bash\ntermit en fr \"hey cowboy where is your horse?\" -t\n=\u003e \"Hey cowboy où est votre cheval ?\" # and a french voice says something about a horse\n```\n\nYou can use termit as a speech synthesizer of any supported language without having to translate anything:\n```bash\ntermit en en \"hold your horses cowboy !\" -t\n=\u003e \"hold your horses cowboy !\" # and an english voice asks you to hold on\n```\n\n### Learning language when committing to git\n\nIdea by [Nedomas](https://news.ycombinator.com/item?id=7545747). See and hear your messages translated to target lang every time you commit. You can do this two ways: overriding the `git` command, and using a post-commit hook in git.\n\n#### Override the `git` command (zsh only)\n\nIn **~/.zshrc**\n\n```bash\nexport LANG=es\ngit(){[[ \"$@\" = commit\\ -m* ]]\u0026\u0026termit en $LANG ${${@:$#}//./} -t;command git $@}\n```\n\nI am no shell ninja so if you know how to make it work in bash then please submit a PR.\n\n#### Using a post-commit hook\n\nAdd a file named `post-commit` to your project's `.git/hooks` directory, with this in it:\n\n```bash\ntermit en es \"`git log -1 --pretty=format:'%s'`\" -t\n```\n\nRemember to switch the languages according to your preference.\n\nIf you want this to be in every one of your git repositories, see [this Stack Overflow answer](http://stackoverflow.com/a/8842663/249801).\n\n## Language codes:\n\nTo find all available language codes visit https://msdn.microsoft.com/en-us/library/hh456380.aspx\n\n## Requirements\n\nWorks with Ruby 1.9.2 and higher.\n\nTo use speech synthesis you need to have mpg123 installed.\n\nFor Ubuntu:\n```bash\nsudo apt-get install mpg123\n```\n\nFor MacOSX:\n```bash\nbrew install mpg123\n```\n\n## Status\n\nIt was rewritten to work with [Bing Translator](https://www.bing.com/translator) . Thanks to [Ragnarson](https://ragnarson.com) for supporting it !\n\n## Disclaimer\n\nTermit works by scraping the private APIs and is therefore not recommended for use in production or on a large scale.\n","funding_links":[],"categories":["Ruby","Internationalization","Misc","High Level Tasks"],"sub_categories":["Machine Translation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawurb%2Ftermit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawurb%2Ftermit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawurb%2Ftermit/lists"}