# CONTENT.md — Semantic Content Extraction Engine

> Automated webpage-to-markdown extraction engine for Copy Markdown. Strips HTML boilerplate, navigation, ads, and scripts to output clean, token-efficient GitHub Flavored Markdown for LLMs and notes.

## Overview
Standard web copy-pasting injects invisible tracking scripts, navigation elements, mega-menus, cookie banners, and broken styling into your clipboard. CONTENT.md parses the live Document Object Model (DOM) using AST tree-walking to isolate primary editorial content while cleanly discarding all peripheral noise.

## Capabilities
- **Semantic Article Detection:** Identifies `<article>`, `<main>`, `role="main"`, and high-density editorial blocks automatically.
- **Hierarchy Preservation:** Retains h1–h6 heading nesting, unordered and ordered lists, blockquotes, and text emphasis.
- **Fenced Code Blocks:** Detects `<pre>` and `<code>` blocks and maps syntax languages (js, ts, python, html, css, json, etc.).
- **GFM Table Conversion:** Transforms complex HTML data tables into GitHub Flavored Markdown tables.
- **Token Optimization:** Strips up to 90% of raw HTML boilerplate to maximize context window headroom for ChatGPT, Claude, Cursor, and Gemini.

## Standard Output Format
```markdown
URL: "https://www.example.com/article"

---

# Article Title

Introduction paragraph preserving editorial content and author flow.

## Section Heading
- High-priority key point
- Technical detail preserving inline links

```typescript
function example(): boolean {
  return true;
}
```

| Feature | Copy Markdown | Standard Paste |
|---|---|---|
| Strips Navigation | Yes | No |
| Preserves Code | Yes | No |
| Token Overhead | -90% | High |

---
Extracted with [Copy Markdown](https://www.copymarkdown.md)
```

## Navigation & Resources
- Web Interface: https://www.copymarkdown.md/content
- DESIGN.md: https://www.copymarkdown.md/design.md
- LINKS.md: https://www.copymarkdown.md/links.md
- Chrome Web Store: https://chromewebstore.google.com/detail/copy-markdown/chjlhkmhgpojfmddbpplonolmcjbbbem
- Home: https://www.copymarkdown.md
- Built by Michael Vereb: https://www.michaelvereb.com
