X Article Publisher

Imports local Markdown files into the X (Twitter) Articles editor using a command-line script and a Chrome extension.

Imports local Markdown files into the X (Twitter) Articles editor using a command-line script and a Chrome extension.

The gist

X Article Publisher is an open-source tool by punk2898 for importing Markdown files directly into the X Articles editor. It combines a local Node.js server with a Chrome extension to bypass manual copy-pasting and reformatting. The tool reads a local Markdown file and injects its content, including images and formatting, into the X composition window, streamlining the publishing workflow for writers and developers who draft content in Markdown.

What it does

  • Parses local Markdown files into a format compatible with the X Articles editor.
  • Runs a local server to serve the processed article content to a browser extension.
  • Adds an 'Import' button directly into the X.com article composition interface.
  • Injects formatted text, links, images, lists, and code blocks into the editor.
  • Automates the publishing workflow via a single command-line script.

How it works

The user executes a shell script with a path to a Markdown file. This launches a local Node.js server that parses the file and exposes its content via HTTP endpoints. A companion Chrome extension injects an 'Import' button onto the X Articles page. When clicked, the extension fetches the parsed article from the local server and injects it into the web editor. This tool is open-source and requires local installation.

Best for

This tool is best for developers and writers who compose their articles in Markdown and want to publish them on X without tedious manual reformatting.

Watch out for

Use requires an X Premium subscription to access the 'Articles' feature. The setup involves running a local server from the command line and manually loading an unpacked Chrome extension, making it unsuitable for non-technical users.