A lightweight package with zero runtime dependencies for converting Markdown into Steam-compatible markup, and back again.
- Headings (
#through######) to[h1]through[h3], since Steam caps at three levels - Bold, italic, strikethrough, inline code
- Links and images to
[url]/[img] - Ordered and unordered lists (nested)
- Blockquotes (nested)
- Fenced code blocks to
[code] - Horizontal rules to
[hr][/hr]
[h1]through[h6]to#through######[b],[i],[strike],[code]to**,*,~~, backticks[url]/[img]to Markdown links and images[list]/[olist](nested) to-/1.[quote](nested) to>[hr][/hr]to---- Steam-only tags such as
[spoiler],[noparse],[table], and[u]have no Markdown equivalent, so they pass through verbatim rather than being dropped
Install with pip or uv:
pip install -U steamify
uv add steamifyfrom steamify import to_steam
md_text = """
# My Game Guide
Welcome to the **best** game ever!
## Features
- Easy to learn
- *Beautiful* graphics
- ~~Microtransactions~~ Free to play!
Check out the [wiki](https://example.com) for tips.
"""
steam_text = to_steam(md_text)
print(steam_text)
# [h1]My Game Guide[/h1]
# Welcome to the [b]best[/b] game ever!
# [h2]Features[/h2]
# [list]
# [*] Easy to learn
# [*] [i]Beautiful[/i] graphics
# [*] [strike]Microtransactions[/strike] Free to play!
# [/list]
# Check out the [url=https://example.com]wiki[/url] for tips.Converting the other way:
from steamify import to_markdown
steam_text = """
[h1]Patch Notes[/h1]
[list]
[*] Fixed [b]crash[/b] on startup
[*] [spoiler]Secret boss[/spoiler] added
[/list]
"""
md_text = to_markdown(steam_text)
print(md_text)
# # Patch Notes
# - Fixed **crash** on startup
# - [spoiler]Secret boss[/spoiler] added