<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%A7Google%E7%BF%BB%E8%A8%B3%E3%81%99%E3%82%8B</id>
	<title>コマンドラインでGoogle翻訳する - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%A7Google%E7%BF%BB%E8%A8%B3%E3%81%99%E3%82%8B"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%A7Google%E7%BF%BB%E8%A8%B3%E3%81%99%E3%82%8B&amp;action=history"/>
	<updated>2026-06-05T16:46:25Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%A7Google%E7%BF%BB%E8%A8%B3%E3%81%99%E3%82%8B&amp;diff=12423&amp;oldid=prev</id>
		<title>Administrator: ページの作成:「macOSやLinuxのコマンドラインでGoogle翻訳ができる「translate-shell」なるプログラムを発見した。複数のエンジンに対応…」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%A7Google%E7%BF%BB%E8%A8%B3%E3%81%99%E3%82%8B&amp;diff=12423&amp;oldid=prev"/>
		<updated>2020-03-12T06:10:46Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/wiki/MacOS&quot; title=&quot;MacOS&quot;&gt;macOS&lt;/a&gt;や&lt;a href=&quot;/wiki/Linux&quot; title=&quot;Linux&quot;&gt;Linux&lt;/a&gt;の&lt;a href=&quot;/w/index.php?title=%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;「コマンドライン」 (存在しないページ)&quot;&gt;コマンドライン&lt;/a&gt;でGoogle翻訳ができる「translate-shell」なる&lt;a href=&quot;/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0&quot; title=&quot;プログラム&quot;&gt;プログラム&lt;/a&gt;を発見した。複数のエンジンに対応…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[macOS]]や[[Linux]]の[[コマンドライン]]でGoogle翻訳ができる「translate-shell」なる[[プログラム]]を発見した。複数のエンジンに対応しておりBing翻訳なんかもできるらしい。&lt;br /&gt;
&lt;br /&gt;
== 注意 ==&lt;br /&gt;
このコマンドは[[Google]]や[[Bing]]と通信しているため、あまり勢いよく使うと通信制限を食らう。&lt;br /&gt;
==インストール==&lt;br /&gt;
[[macOS]]の場合は[[homebrew]]から入れるのが簡単。&lt;br /&gt;
 brew install translate-shell&lt;br /&gt;
==基本==&lt;br /&gt;
基本形。&lt;br /&gt;
 trans 翻訳元:翻訳先 &amp;quot;hello world&amp;quot;&lt;br /&gt;
こんな感じ。&lt;br /&gt;
 trans en:ja &amp;quot;hello world&amp;quot;&lt;br /&gt;
言語一覧表示は「-R」。&lt;br /&gt;
 trans -R&lt;br /&gt;
翻訳元を指定しなければ自動認識。&lt;br /&gt;
 trans :ja &amp;quot;hello world&amp;quot;&lt;br /&gt;
翻訳先も指定しなければOSの言語（日本語）になる。&lt;br /&gt;
 trans &amp;quot;hello world&amp;quot;&lt;br /&gt;
==辞書モード==&lt;br /&gt;
単語などの意味を調べたい場合は「-d」。 dictionaryのdだ。bじゃないよ。&lt;br /&gt;
 trans -d hello&lt;br /&gt;
==訳文のみ表示==&lt;br /&gt;
元文章を表示しない場合は「-b」を付ける。&lt;br /&gt;
 trans -b :ja &amp;quot;hello world&amp;quot;&lt;br /&gt;
==パイプで使う==&lt;br /&gt;
[[パイプ]]で渡した場合は行単位で翻訳される。知らずにcatしたものを渡したら一撃で[[Google]]先生に通信制限された。&lt;br /&gt;
 cat README.md | trans -b&lt;br /&gt;
[[パイプ]]で使う場合は[[改行コード]]を取り除いた方がいいかも。&lt;br /&gt;
 cat README.md | tr -d &amp;#039;\n&amp;#039; | trans -b&lt;/div&gt;</summary>
		<author><name>Administrator</name></author>
	</entry>
</feed>