
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
notion-translator
Advanced tools
CLI tool to translate Notion pages into a different language by levergign DeepL's API
Notion Translator is a CLI tool that enables Notion users to translate Notion pages into a different language by leveraging the DeepL's text translation API.
You can install this tool just by running:
npm install -g notion-translator
Let's say you'd like to translate a Notion page template written in English into a differen language such as Japanese, Spainish, and French. All you need to do with notion-translator are:
NOTION_API_TOKEN
env variableDEEPL_API_TOKEN
env variablenotion-translator \
--from en \
--to ja \
--url https://www.notion.so/acme/Blog-Post-ABC123
Once you create your integration for translation and set the Notion / DeepL credentials in env variables, you can run the command to translate with the Notion page URL:
When the translated page is ready, the CLI opens the page in the default web browser for you. The CLI generates the page as a child page of the original one, but you can move it anywhere else if you would like to do so!
To run this CLI tool, the following are required:
You can configure your integration by the following steps:
Once the integration is created, you can find your Internal Integration Token under Secrets section. The string value should start with secret_
. You will use this value as NOTION_API_TOKEN
when configuring the CLI later.
You can configure your DeepL API account by the following steps:
Once your account is activated, you can find your DeepL API token on your account page. YOu will use this value as DEEPL_API_TOKEN
when configuring the CLI later.
You can install the CLI via npm
command.
npm install -g notion-translator
Let's hit notion-translator -h
to check if the command is now available for you.
$ notion-translator -h
Usage: notion-translator [options]
CLI to translate a Notion page to a different language
Options:
-u, --url <https://www.notion.so/...>
-f, --from <bg,cs,da,de,el,en,es,et,fi,fr,hu,id,it,ja,lt,lv,nl,pl,pt,ro,ru,sk,sl,sv,tr,zh>
-t, --to <bg,cs,da,de,el,en-gb,en-us,es,et,fi,fr,hu,id,it,ja,lt,lv,nl,pl,pt-pt,pt-br,ro,ru,sk,sl,sv,tr,zh>
-d, --debug
-h, --help display help for command
Prior to running the command, set two env variables:
NOTION_API_TOKEN
: Notion's Internal Integration TokenDEEPL_API_TOKEN
: DeepL's API tokenIf you prefer using .env
file, it also works as long as the file exists in the current directory.
Please don't forget to share the original Notion page with your integration. You can find Share link at the top of a Notion page. From there, you can invite your Notion Translator integration to the page.
Okay, everything should be ready! Let's run the command now :)
notion-translator \
--from en \
--to ja \
--url https://www.notion.so/acme/Blog-Post-ABC123
If your credentails are not properly set, the CLI opens Notion / DeepL configuration page in the default browser for you. Double-check the settings and token string values.
Also, if you are unsure about the language code to pass as from/to languages, please refer to DeepL's official document.
I hope that this tool will help you save time!
If you have any feedback or suggestions to this tool, please feel free to write in in this GitHub repository's issue tracker. Pull requests are welcome too!
The MIT License
FAQs
CLI tool to translate Notion pages into a different language by levergign DeepL's API
We found that notion-translator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.