Skip to content

Commit

Permalink
fixed --set-api-key
Browse files Browse the repository at this point in the history
  • Loading branch information
Maups committed Nov 27, 2024
1 parent d6bd298 commit db8283a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Then just run
--path, -p <path/to/out_dir> The directory where the translated file goes, will be named <file_name>_<Iso-639-letters>
--help, -h Boolean flag, explains every option and argument given, if there are no arguments explains everything
--translator, -t google | deepl sets the translator you want to translate with
--set-api-key google:<your-google-key>&deepl:<your-deepl-key> sets API key (You need to activate it for Translation)
--set-api-key google:AIzaSyA8FJ3V0VzG-2pPQ6do3vH7V8W8h0h6HLoA
--set-api-key, -s <API-KEY>, sets API key for the current translator
Fast syntax is: tl :<out-code> :<in-code> flags text (if there is one it will be counted as out)
You can set flags with --this-is-a-flag <argument> (no arguments for boolean flags)
Expand Down
3 changes: 2 additions & 1 deletion lib/elixir_terminal_translator/options.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule ElixirTerminalTranslator.Options do
path: "--path, -p <path/to/out_dir> The directory where the translated file goes, will be named <file_name>_<Iso-639-letters>",
in: "--in, -i <ISO-639-two-letter-language-code> sets the input language for the translator \n Example: -i en for english",
out: "--out, -o <ISO-639-two-letter-language-code> sets the output language for the translator \n Example: -o de for german",
set_api_key: "--set-api-key <API-KEY>, sets API key for the current translator",
set_api_key: "--set-api-key, -s <API-KEY>, sets API key for the current translator",
translator: "--translator, -t google | deepl sets the translator you want to translate with"
}

Expand All @@ -27,6 +27,7 @@ defmodule ElixirTerminalTranslator.Options do
o: :out,
i: :in,
t: :translator,
s: :set_api_key,
]

def options, do: @options
Expand Down

0 comments on commit db8283a

Please sign in to comment.