Skip to content
JoeMountWSWSPublic

About

A command line tool to convert World Socialist Web Site articles into Markdown format.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WSWS Markdown

CI Publish to PyPI

A tool to convert articles from the World Socialist Web Site to Markdown format.

Why not a generic URL-to-Markdown tool?

Generic converters guess at the main content block, so they often leak WSWS site chrome (share icons, newsletter widgets, "Read more" blocks) into the output or strip real content by mistake. This tool targets WSWS's actual markup (itemprop="articleBody", /en/authors/ links, <time datetime>) for exact extraction and frontmatter, at the cost of being tied to WSWS's current template.

Install

pip install wsws-md

Usage

wswsmd "https://www.wsws.org/en/articles/2026/07/03/coeq-j03.html"

Prints the article as Markdown (with YAML frontmatter containing title, author, date, description and source URL) to stdout. Use -o FILE / --output FILE to write to a file instead:

wswsmd "https://www.wsws.org/en/articles/2026/07/03/coeq-j03.html" -o article.md

Use --no-frontmatter to omit the YAML header and print just the title, byline and body:

wswsmd "https://www.wsws.org/en/articles/2026/07/03/coeq-j03.html" --no-frontmatter

Use --no-links to strip hyperlinks from the body text, keeping only the link text (useful when feeding the article into another tool that doesn't need the cross-links):

wswsmd "https://www.wsws.org/en/articles/2026/07/03/coeq-j03.html" --no-links

Use -q/--quiet to suppress non-error diagnostic output, or -v/--verbose to print fetch/parse diagnostics to stderr:

wswsmd "https://www.wsws.org/en/articles/2026/07/03/coeq-j03.html" --verbose

Claude Skill

This repo also ships a Claude Skill that wraps the CLI so Claude can convert WSWS articles to Markdown directly. Download the packaged wsws-md-skill-*.zip from the Releases page and upload it as a Skill in Claude.ai.

Development

pip install -e ".[test]"
pytest

Pull request titles must follow Conventional Commits — see CONTRIBUTING.md. Releases are automated with release-please.

About

A command line tool to convert World Socialist Web Site articles into Markdown format.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages