• I wanted to manage an English Twitter account but found it cumbersome and didn’t get around to it.

  • If I translate Japanese tweets into English and post them regularly, the account should appear active.

  • I wrote a script:

    • https://gist.github.com/blu3mo/f059190e6e35dead69adfcd9998cae28
    • Feel free to use it. CC-0
    • Configuration explanation:
      • TWITTER_CONSUMER_KEY/TWITTER_CONSUMER_SECRET/TWITTER_ACCESS_TOKEN/TWITTER_ACCESS_SECRET/TWITTER_BEARER_TOKEN
        • Account for posting English tweets
        • Log in to the X Developer Portal with the English account to obtain these keys
          • Allow Read/Write in OAuth settings and then regenerate the keys
      • SOURCE_USERNAME
        • Your own account tweeting in Japanese
        • In my case, it’s @blu3mo
      • FETCH_USERNAME/FETCH_EMAIL/FETCH_PASSWORD
        • Account for scraping
        • It is recommended to use a separate account from the main or translation account
          • There is a risk of being frozen due to scraping + writing the password in plaintext in the config
        • I created a disposable account (blu3mo)
      • image
    • Specifications: Retrieve tweets from the previous day and tweet them all at a time when people in the US time zone are awake
      • image
      • Let’s do it at 11 am EST, 8 am PST
      • It’s midnight in JST, perfect timing
      • Use cron?
        • Will it work during sleep..? (blu3mo)
          • Seems unlikely
      • Tried using GitHub actions but encountered errors and got stuck