Reputation: 1
I'm running a single curl -X POST command using the Windows command line.
I get an error stating: The input line is too long. This is because the command is longer than 8092 characters.
Its syntax is as follows
curl -X POST "https://api.deepl.com/v2/glossaries" --header "Authorization: DeepL-Auth-Key AUTH-KEY-NUMBER" -d "name=es" -d "source_lang=en" -d "target_lang=es" -d "entries='word1, word2', 'word3, word4', 'word5, word6', etc" -d "entries_format=csv"
If I use a fewer number of words, it runs successfully. The number of words is too long. How can I reference those words using an external file within the command line to be able to run the command successfully?
Thank you
Running the command results in the error: The input line is too long.
Upvotes: 0
Views: 28
Reputation: 420
How can I reference those words using an external file within the command line to be able to run the command successfully?
The glossaries endpoint has no such option unfortunately, and you don't have the power to change it to accept files.
I see 3 other options for you.
deepl
into a virtualenv, this will install it globally on your system). (The following is for bash
and uses an environment variable GLOSSARY_CONTENT
, the windows cmd
Syntax for this might be a bit different)pip install deepl
GLOSSARY_CONTENT=$'word1\tword2
word3\tword4'
echo "$GLOSSARY_CONTENT" | python -m deepl glossary create --name es --from "EN" --to "ES" -
Upvotes: 1