Translate scrapbox project json file to English.
$ pip install -r requirements.txt
- Set
OPENAI_API_KEY
envrionmental variable in your computer. (How to set your API key)
- Export your project as json file at scrapbox.io. Do NOT check "Include metadata such as line.created and line.updated."
- Edit
INPUT_PATH
variable in the code to load your exported json file.
INPUT_FILE = "input/sample.json"
- Run the script
$ python main.py
- Wait until the end of translation. It will take approximately
2.7 * {number of page}
seconds.
- If you are not in OpenAI paid plan / if you are in your first 48 hours, you might face a rate limit. In that case, increase the value
SLEEP_DURATION
in to speed down.