Files

2.6 KiB

Substack Article Formatter

Transform plain text into professional Substack format. Ensures proper HTML formatting so bold/italic/headers work correctly when pasted into Substack editor.

โœจ Key Features

  • Clean formatting for better readability
  • Proper HTML output that Substack editor recognizes
  • Copy-paste ready with formatting preserved
  • Minimal or standard formatting options

๐Ÿš€ Quick Start

# Basic formatting
python3 formatter.py "Your content here"

# With specific structure  
python3 formatter.py "Your content here" micro-story

# Format and copy to clipboard (Linux)
python3 formatter.py "Your content here" | python3 copy_to_substack.py

๐Ÿ“‹ Copy-Paste Process

  1. Format your content using the formatter
  2. Copy as HTML using the copy script
  3. Paste into Substack - formatting preserved automatically!

Linux/WSL:

# Install dependencies
sudo apt install pandoc xclip  # Ubuntu/Debian
sudo pacman -S pandoc xclip    # Arch

# Format and copy
python3 formatter.py "Your text" > output.html
python3 copy_to_substack.py "$(cat output.html)"

macOS:

brew install pandoc
# Use pbcopy instead of xclip (modify copy script as needed)

๐ŸŽฏ Formatting Options

Standard Formatting

Clean paragraph structure with proper HTML tags

Minimal Formatting

Pure spacing improvements with exact content preservation

๐Ÿ›  Files

  • formatter.py - Main formatting engine
  • copy_to_substack.py - HTML clipboard utility
  • test_formatter.py - Test all formats
  • examples.md - Before/after examples
  • SKILL.md - Complete documentation

๐Ÿงช Testing

# Test all formatting types
python3 test_formatter.py

# Test specific format
python3 formatter.py "Your content" micro-story

๐Ÿ”ง Integration with Bot

Just tell Bot:

"Format this for Substack: [your content]"

Or be specific:

"Format this for Substack as a micro-story: [your content]"

The skill handles:

  • Viral pattern application
  • HTML conversion
  • Copy instructions
  • Formatting verification

โš ๏ธ Technical Notes

Why HTML conversion is needed: Substack editor treats raw markdown as plain text. The solution is converting to HTML and copying as text/html format so Substack recognizes the formatting.

Dependencies:

  • pandoc - Markdown to HTML conversion
  • xclip (Linux) - Clipboard management with MIME types
  • pbcopy (macOS) - Alternative clipboard tool

๐ŸŽฏ Philosophy

Format for readability, preserve your voice. This tool improves visual presentation while keeping your message and personality intact.