Skip to content

Commit

Permalink
Add options [wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
kojix2 committed Oct 19, 2024
1 parent 7d3e10b commit 5ac3b5d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/deepl/parser.cr
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ module DeepL
on("status", "Check translation status") do
_set_action_(Action::TranslateDocumentStatus, "Usage: deepl doc status [options] <file>")

on("-i", "--id", "Document ID (required)") do |id|
opt.document_id = id
end

on("-k", "--key", "Document key (required)") do |key|
opt.document_key = key
end

_on_debug_

_on_help_
Expand All @@ -61,6 +69,14 @@ module DeepL
on("download", "Download translated document") do
_set_action_(Action::TranslateDocumentDownload, "Usage: deepl doc download [options] <file>")

on("-i", "--id", "Document ID (required)") do |id|
opt.document_id = id
end

on("-k", "--key", "Document key (required)") do |key|
opt.document_key = key
end

on("-o", "--output FILE", "Output file") do |file|
opt.output_file = Path[file]
end
Expand Down

0 comments on commit 5ac3b5d

Please sign in to comment.