@nfriend/wordle-solver

1.3.0 • Public • Published

Wordle (and Absurdle) Solver

npm (scoped) Twitter bot status Twitter Follow

The wordle-bot logo

A bookmarklet and Twitter bot that automatically solves the daily Wordle puzzle.

It also solves a fun variant: Absurdle.

Wordle demo

A demo of this script solving a daily Wordle puzzle

Absurdal demo

A demo of this script solving the Absurdal puzzle

Twitter bot

Every morning, this Twitter bot uses this script to solve the daily Wordle puzzle and posts its results.

A screenshot of a Tweet by @bot_wordle

The tweet will include a link to a screenshot of the full solution.

Source for the Twitter bot can be seen in twitter-bot/index.js. The bot is run inside a GitLab scheduled pipeline (see .gitlab-ci.yml).

Usage

In your browser of choice, create a new toolbar bookmark. Name the bookmark something like "Solve Wordle", and paste the following code into the "URL" field:

javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://unpkg.com/@nfriend/wordle-solver/build/index.js';})();

A screenshot of the 'add new bookmark' dialog in Firefox

Then, navigate to Wordle or Absurdle and click your new "Solve Wordle" bookmarklet!

Releases

This script is published to NPM as @nfriend/wordle-solver and is available as a downloadable script here: https://unpkg.com/@nfriend/wordle-solver/build/index.js.

Developing

Bookmarklet

Clone this repository, and in the root directory, run:

  • yarn
  • yarn tsc --watch

build/index.js will be automatically updated every time src/index.ts is changed.

To run build/index.js, copy its contents and paste into the developer tools of a Wordle or Absurdal page.

Releasing a new version

To release a new version of the bookmarklet:

  1. Run yarn tsc to ensure build/index.js is up to date
  2. Run yarn version --[patch|minor|major]
  3. Run npm publish
  4. Run git push
  5. Run git push --tags
  6. Create a new release on GitLab using the tag created by yarn above

Twitter bot

After running the steps in the Bookmarklet section above, navigate to the twitter-bot directory and run:

  • yarn
  • yarn solve --date=2021-10-10 --headful --skip-tweet --skip-image-upload --use-local-script

See the comments in twitter-bot/index.js for an explanation of each command line parameter.

The API keys/secrets for both Twitter and Imgur are provided through environment variables.

Readme

Keywords

none

Package Sidebar

Install

npm i @nfriend/wordle-solver

Weekly Downloads

6

Version

1.3.0

License

MIT

Unpacked Size

160 kB

Total Files

4

Last publish

Collaborators

  • nfriend