A tool to convert articles from the World Socialist Web Site to Markdown format.
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.
pip install wsws-mdwswsmd "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.mdUse --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-frontmatterUse --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-linksUse -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" --verboseThis 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.
pip install -e ".[test]"
pytestPull request titles must follow Conventional Commits — see CONTRIBUTING.md. Releases are automated with release-please.