Skip to content

[Firefox Extension] Easily capture web content as Markdown to provide context to AI assistants like ChatGPT, streamlining your research and coding workflow.

License

Notifications You must be signed in to change notification settings

SimonB97/markdown-collector

Repository files navigation

Markdown Collector - Website to Markdown

A Firefox extension that helps you save web pages as Markdown and manage them efficiently. Perfect for sharing content with AI assistants like ChatGPT.

Features

  • Quick Save: Use keyboard shortcuts to save and convert pages:
    • Alt+I: Save and convert current page(s)
    • Alt+C: Save, convert, and copy to clipboard
    • Alt+M: Open markdown collection
  • AI-Powered Refinement: Optional LLM integration to refine and structure content based on custom prompts
  • Multi-Tab Processing: Select multiple tabs (Ctrl+Click or Shift+Click) and process them:
    • Individual mode: Apply the same AI refinement to each page separately
    • Batch mode: Combine all selected pages into one document (Shift+Enter) and apply the same AI refinement to the combined content
  • Content Management:
    • Centralized collection page for all saved URLs and their Markdown content
    • Edit content directly within the collection
    • Select multiple entries for copying or deleting
    • Update and review changes with diff view
  • Smart Content Cleanup: Optional Readability integration to extract main content and remove clutter

Installation

Get it from Firefox Add-ons: Markdown Collector

For developers:

  1. Clone: git clone https://github.com/simonb97/markdown-collector.git
  2. Load in Firefox:
    • Go to about:debugging#/runtime/this-firefox
    • Click "Load Temporary Add-on"
    • Select manifest.json

Quick Start Guide

  1. Load the Extension in Firefox:

    • Open Firefox and navigate to about:debugging#/runtime/this-firefox

    • Click on "Load Temporary Add-on..."

    • Select the manifest.json file from the cloned repository

    • Single page: Press Alt+I or Alt+C

    • Multiple pages:

      • Hold Ctrl and click on tabs you want to save
      • Press Alt+I or Alt+C
      • Choose to process them separately or combine them
  2. Save Pages:

    • Single Page:
      • Press Alt+I to save and convert the current page
      • Press Alt+C to save, convert, and copy to clipboard
    • Multiple Pages:
      • Select multiple tabs using Ctrl+Click or Shift+Click
      • Press Alt+I or Alt+C
      • Choose processing mode:
        • Press Enter: Process each page individually with the same prompt
        • Press Shift+Enter: Combine all pages into one document
  3. AI Refinement (Optional):

    • Enable LLM refinement in settings
    • Add your API key (supports OpenAI and compatible local models)
    • When saving pages, enter a prompt to refine the content
    • For multiple pages:
      • Individual mode: Same prompt applies to each page
      • Batch mode: Prompt applies to combined content
  4. Manage Collection:

    • Press Alt+M to open the collection page
    • Edit content directly in the markdown boxes
    • Select entries and use the action buttons to:
      • Copy selected entries
      • Update content from source
      • Delete entries
    • Use the search feature to filter entries

Keyboard Shortcuts

  • Save and Convert: Alt+I
  • Save, Convert, and Copy: Alt+C
  • Open Collection: Alt+M
  • In Prompt Dialog:
    • Enter: Process individually
    • Shift+Enter: Process as batch (when multiple tabs selected)
    • Esc: Cancel operation

Shortcuts can be customized in Firefox Add-ons settings.

Roadmap

See Roadmap.md.

Changelog is at the end of Roadmap.md.

Contributing

Contributions are welcome! Whether it's reporting bugs, suggesting features, or submitting pull requests, your help is appreciated.

  1. Fork the Repository
  2. Create a New Branch:
    git checkout -b feature/YourFeature
  3. Commit Your Changes:
    git commit -m "Add some feature"
  4. Push to the Branch:
    git push origin feature/YourFeature
  5. Open a Pull Request

License

This project is licensed under the GNU General Public License v3.0.

Acknowledgments

  • Turndown for HTML to Markdown conversion.
  • JsDiff for showing differences between Markdown texts.
  • Readability for extracting the main content of a page.

About

[Firefox Extension] Easily capture web content as Markdown to provide context to AI assistants like ChatGPT, streamlining your research and coding workflow.

Topics

Resources

License

Stars

Watchers

Forks