DogeJS / Doge on X / Doge-speak maker

Doge-speak maker

Type a plain sentence. Get it back in doge-speak, pick your favourite, and post it. Such words. Very wow.

Free, no account, nothing leaves your browser. For developers: the docs

The doge-speak page on a phone: a sentence typed in and five doge-speak lines to pick from.

What you get

Doge-speak maker, step by step

dogejs.com/x/wow/app/
A meme image: doge in the middle with the words so launched, much shop, such first, much happy around it.

A meme image in one tap

Turn your line into a picture with the doge in the middle and the words around it. Download it or copy it.

  • Made in your browser
  • Looks the same every time
  • Ready to attach to a post
The meme image section on a phone: Classic, Shout and Cool styles and the doge image with the words around it.

Three image styles

Open the meme image under your lines and choose Classic, Shout or Cool. It works the same on a phone.

  • Download or copy in one tap
  • The image is optional: you can post only the words
  • No sign-up, no upload
The doge-speak page on a phone after pressing Shuffle: a different set of five lines.

Press Shuffle for more

Not your favourite? Shuffle gives the next round of lines for the same sentence.

  • The same sentence gives the same lines until you shuffle
  • Your words, plus a fixed doge vocabulary
  • Rude words are refused, even when disguised
An illustration of a post box with a doge-speak line and the meme attached.

Post it in one tap

The post box opens with your line already in it. Attach the image and press Post.

  • We never post for you
  • Keep it short: the line counts toward 280 characters
  • Works on phone and computer

How it works

  1. Type a sentence

    Anything plain, like "we opened a coffee shop".

  2. Pick a line

    Shuffle for more, or make a meme image.

  3. Post it

    The X post box opens with your words in it.

Questions

Why do I get the same lines every time?

They are deterministic on purpose: press Shuffle for the next round.

Can it insert someone's name?

No. Mentions are removed and only your words plus a fixed vocabulary are used.

Why was my sentence refused?

A word in it is on the filter list (also when disguised). Try different words.

Does it work in other languages?

Letters of any language are kept, but the word classes and stop words are English, so English works best.

Is anything sent to a server?

No. The words are made and drawn in your browser.

Is this made by X?

No. DogeJS is an independent project and is not affiliated with X Corp. The tools only open X's own post box with the text filled in; you press Post yourself.

Doge-speak maker

It works for real, right here. No sign-up.

For developers

Doge-speak for developers

How the lines are made, why they are deterministic, and the word filter in front of them.

How it works

  1. The sentence (at most 200 characters) is checked by the word filter first: input with a blocked word is refused as a whole, with one friendly sentence.
  2. Links, @mentions and hashtag signs are removed, then common words (the, is, today...) are dropped. What is left is classified as noun, verb or adjective.
  3. Each line picks 2 to 4 of your words with a modifier that fits the word (such, much, very, so, many) and ends some lines with a closer such as wow, amaze or excite. The choices come from a small seeded generator over the words, so the same sentence and the same Shuffle round always give the same lines.
  4. Nothing is ever inserted but your own words and the fixed vocabulary: no names, no mentions, no links.

Use it in your own code

The package is @dogejs/xkit. It is not on npm yet: install it from its repository tag, then import the helpers. They are plain functions with no DOM at module level, so they run in Node 20+, in browsers and in workers.

Shell
npm install github:DogeJS-Dev/doge-on-x#v0.2.0
JavaScript
import { tipLink, decodeLink, checkProof, draw, postIntentUrl } from '@dogejs/xkit';

Use dogeSpeak in a bot or a chat command; it is pure and fast.

Code examples

Each example runs in Node against the built package; the output is recorded from that run and checked by npm run examples.

Plain words in, doge-speak out

Two rounds of three lines; the same round gives the same lines; mentions and links dropped. File examples/speak.mjs; run: node examples/speak.mjs.

JavaScript
// Plain words in, doge-speak out. Same words and round: same lines.
import { dogeSpeak, isBlockedText, wowPost } from '@dogejs/xkit';

const first = dogeSpeak('We launched the new rocket today', 0, 3);
console.log(first.lines);
console.log(dogeSpeak('We launched the new rocket today', 1, 3).lines); // the Shuffle button adds 1
console.log(JSON.stringify(dogeSpeak('We launched the new rocket today', 0, 3)) === JSON.stringify(first));
console.log(dogeSpeak('thanks @someone, see https://example.com', 0, 2).lines); // mentions and links are dropped
console.log(isBlockedText('have a nice day'), wowPost(first.lines[0]));
Output
[
  'wow. so launched. very new. such rocket.',
  'very launched. so new. much rocket. wow.',
  'wow. very launched. so new. such rocket.'
]
[
  'so launched. very new. amaze.',
  'so new. much rocket. much happy.',
  'so launched. very new. such rocket. wow.'
]
true
[ 'such thanks. much see. amaze.', 'such thanks. much see. wow.' ]
false wow. so launched. very new. such rocket.

The word filter

Ordinary words pass, unfriendly input is refused as a whole. File examples/speak-safety.mjs; run: node examples/speak-safety.mjs.

JavaScript
// The word filter in front of doge-speak: unfriendly input is refused as a whole, ordinary words pass.
import { dogeSpeak, FRIENDLY_REFUSAL, isBlockedText, isBlockedWord, normalizeWord } from '@dogejs/xkit';

console.log(normalizeWord('W00W'));            // the form the filter compares
console.log(isBlockedWord('therapist'), isBlockedWord('Scunthorpe'), isBlockedText('gas fees are low today'));
const r = dogeSpeak('you are an idiot', 0, 3);
console.log(r.ok, r.ok ? r.lines : r.reason, r.ok ? '' : r.reason === FRIENDLY_REFUSAL);
console.log(dogeSpeak('', 0, 3));
Output
woow
false false false
false Let us keep it friendly. Try different words. true
{ ok: false, reason: 'Type a sentence first.' }

Post a line

The composer link of the page, and how a long text is cut to fit with its link. File examples/wow-post.mjs; run: node examples/wow-post.mjs.

JavaScript
// Post a doge-speak line: the text is kept under 240 (X's count) with the link, cut at a word with "...".
import { dogeSpeak, fitPost, postIntentUrl, wowPost, xLength } from '@dogejs/xkit';

const line = dogeSpeak('Our little bakery sold every croissant before nine this morning', 2, 1).lines[0];
console.log(line, '|', xLength(wowPost(line), 1), 'of 280');
console.log(postIntentUrl({ text: wowPost(line), url: 'https://dogejs.com/x/wow/' }));
const long = fitPost('such words. '.repeat(40), true);
console.log(long.length, xLength(long, 1), long.slice(-16));
Output
much bakery. such sold. very morning. wow. | 66 of 280
https://x.com/intent/post?text=much%20bakery.%20such%20sold.%20very%20morning.%20wow.&url=https%3A%2F%2Fdogejs.com%2Fx%2Fwow%2F
209 234 uch words. such…

API reference

The exports this page uses. The full list is on the Doge on X developer page.

Doge-speak src/speak.ts

ExportReturnsWhat it does
dogeSpeak(input, round?, count?){ ok: true, lines } | { ok: false, reason }Deterministic doge-speak: same words and round, same lines. Uses only the input's words and a fixed vocabulary; mentions and links are dropped; at most 200 characters in.
contentWords(input)string[]The words doge-speak uses, in order, lower case, without duplicates.
kindOf(word)'noun' | 'verb' | 'adj'Word class from a small list and English endings.
MAX_INPUT200Longest input.

Word filter src/safety.ts

ExportReturnsWhat it does
isBlockedText(text)booleanTrue when any word is blocked (also disguised with digits, symbols or repeated letters).
isBlockedWord(word)booleanOne word. Ordinary words that contain a short entry (therapist, Scunthorpe) pass.
normalizeWord(word)stringThe form the filter compares.
FRIENDLY_REFUSALstringThe sentence shown for refused input.

Post composer src/intent.ts

ExportReturnsWhat it does
postIntentUrl({ text, url? })stringhttps://x.com/intent/post?text=...&url=.... Throws if it would not fit in 280 (X's count) or the url is not http(s).
followIntentUrl(handle)stringhttps://x.com/intent/follow?screen_name=...
xLength(text, urls?)numberLength as X counts it: most Latin characters 1, CJK and emoji 2, each link 23.
fitPost(text, hasUrl, limit?)stringCuts a text at a word so text plus link fits limit (default 240), ending with an ellipsis.
POST_LIMIT, URL_WEIGHT, OUR_LIMIT280, 23, 240X's limit, the weight of a link, the limit our texts keep to.

Self-hosting

Everything is static files. The page scripts are built from DogeJS-Dev/doge-on-x; the HTML and CSS of the pages are in DogeJS-Dev/website under site/x/.

Shell
git clone https://github.com/DogeJS-Dev/doge-on-x
cd doge-on-x
npm install
npm run build      # dist/x-tip.js, x-t.js, x-proof.js, x-price.js, x-wow.js, x-profile.js, x-giveaway.js
npm test           # unit tests
npm run examples   # runs every example on this page and compares its output
  1. Copy site/x/ from the website repository (the product page of each tool is x/<tool>/, the tool itself x/<tool>/app/), with ui.css, apps.css, styles.css, site.js, pay.js (tip pages) and signin.js (proof page) from the site root, and the images the pages name.
  2. Put the built dist/x-*.js next to the pages as site/x/x-*.js.
  3. Serve the folder from any static host. Nothing else is needed: no database, no keys, no X API.

What changes on your own host: the pages write links for the host they are served from (so your tip links point to your copy), and proofs are signed for your host. A proof page accepts proofs signed for dogejs.com and for its own host, nothing else. To make another host the default for links built in code, pass it as the base argument of tipLink, proofLink and bioLine, and the hosts you accept as allowedHosts of checkProof.