Skip to content

uttamsutariya/DocDigest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LLM Doc Copier - Chrome Extension

A Chrome extension that extracts documentation pages and converts them to LLM-friendly Markdown format with a single click.

Features

  • 🎯 Smart Content Extraction: Uses Mozilla's Readability.js to intelligently extract the main content from any documentation page
  • πŸ“ Markdown Conversion: Converts HTML to clean Markdown format using Turndown.js
  • 🎨 Clean Formatting: Preserves headings, code blocks, lists, and other important formatting
  • πŸ“‹ One-Click Copy: Simple floating button to copy content to clipboard
  • πŸ”” Visual Feedback: Toast notifications confirm successful copy
  • πŸ“± Responsive Design: Works on desktop and mobile views

Installation

  1. Download/Clone this repository to your local machine

  2. Open Chrome and navigate to chrome://extensions/

  3. Enable Developer Mode by toggling the switch in the top right corner

  4. Click "Load unpacked" and select the folder containing this extension

  5. Done! The extension is now installed and ready to use

Usage

  1. Navigate to any documentation page (MDN, Stripe docs, React docs, etc.)

  2. Look for the floating button in the bottom-right corner that says "Copy LLM Text"

  3. Click the button to extract and copy the content

  4. See the confirmation toast "βœ… LLM-friendly version copied!"

  5. Paste anywhere - the content is now in your clipboard as clean Markdown

What Gets Extracted

The extension extracts:

  • Main article content
  • Headings (converted to Markdown # syntax)
  • Code blocks (preserved with ```language syntax)
  • Lists (bullet points and numbered)
  • Links and emphasis
  • Tables (converted to Markdown tables)

The extension removes:

  • Navigation menus
  • Sidebars
  • Footers
  • Advertisements
  • Social media widgets
  • Comments sections

Output Format

The copied content includes:

  • Page title as H1
  • Source URL
  • Extraction timestamp
  • Clean Markdown-formatted content

Example output:

# Documentation Title

**Source:** https://example.com/docs/page
**Extracted:** 2024-01-15T10:30:00.000Z

---

## Main Content Here

Your documentation content in clean Markdown...

Files Structure

chrome-extension/
β”œβ”€β”€ manifest.json        # Chrome extension manifest (V3)
β”œβ”€β”€ content.js          # Main content script
β”œβ”€β”€ styles.css          # Button and toast styles
β”œβ”€β”€ readability.js      # Mozilla's Readability library
β”œβ”€β”€ turndown.js         # HTML to Markdown converter
β”œβ”€β”€ icon16.png          # Extension icon (16x16)
β”œβ”€β”€ icon48.png          # Extension icon (48x48)
β”œβ”€β”€ icon128.png         # Extension icon (128x128)
└── README.md           # This file

Compatibility

  • Chrome/Chromium browsers (version 88+)
  • Edge (Chromium-based)
  • Brave Browser
  • Other Chromium-based browsers

Troubleshooting

Button not appearing?

  • Refresh the page after installing the extension
  • Check if the site has strict CSP policies that might block the extension

Content not extracting properly?

  • The extension uses intelligent extraction but may need fallback for unusual layouts
  • Try selecting the specific article container if available

Copy not working?

  • Ensure the browser has clipboard permissions
  • Some sites may restrict clipboard access - try on a different tab

Privacy

This extension:

  • βœ… Works entirely locally in your browser
  • βœ… Does not send data to any external servers
  • βœ… Does not track your usage
  • βœ… Only activates when you click the button

License

MIT License - Feel free to modify and distribute as needed.

Credits


Made with ❀️ by uttam for better LLM interactions with documentation

About

πŸš€ Chrome extension to extract & convert docs to LLM-friendly Markdown

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors