Giter Site home page Giter Site logo

winnerineast / markdowner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dhravya/markdowner

0.0 0.0 0.0 23 KB

A fast tool to convert any website into LLM-ready markdown data.

Home Page: https://md.dhr.wtf

License: MIT License

TypeScript 100.00%

markdowner's Introduction

Markdowner โšก๐Ÿ“

A fast tool to convert any website into LLM-ready markdown data.

๐Ÿ‘€ Why?

I'm building an AI app called Supermemory - https://git.new/memory. Where users can store website content in the app and then query it using AI. One thing I noticed was - when data is structured and predictable (in markdown format), the LLM responses are much better.

There are other solutions available for this - https://r.jina.ai, https://firecrawl.dev, etc. But they are either:

  • too expensive / proprietary
  • or too limited.
  • very difficult to deploy

Here's a quote from my friend @nexxeln what users think

So naturally, we fix it ourselves โšก

Features ๐Ÿš€

  • Convert any website into markdown
  • LLM Filtering
  • Detailed markdown mode
  • Auto Crawler (without sitemap!)
  • Text and JSON responses
  • Easy to self-host
  • ... All that and more, for FREE!

Usage

To use the API, just make GET a request to https://md.dhr.wtf

Usage example:

$ curl 'https://md.dhr.wtf/?url=https://example.com'
REQUIRED PARAMETERS

url (string) -> The website URL to convert into markdown.

OPTIONAL PARAMETERS

enableDetailedResponse (boolean: false) -> Toggle for detailed response with full HTML content. crawlSubpages (boolean: false) -> Crawl and return markdown for up to 10 subpages. llmFilter (boolean: false) -> Filter out unnecessary information using LLM.

Response Types

Add Content-Type: text/plain in headers for plain text response. Add Content-Type: application/json in headers for JSON response.

Tech

Under the hood, Markdowner utilises Cloudflare's Browser rendering and Durable objects to spin up browser instances and then convert it to markdown using Turndown.

Architecture diagram

Self hosting

You can easily self host this project. To use the browser rendering and Durable Objects, you need the Workers paid plan

  1. Clone the repo and download dependencies
git clone https://github.com/dhravya/markdowner
npm i
  1. Run this command:
    npx wrangler kv:namespace create md_cache
    
  2. Open Wrangler.toml and change the IDs accordingly
  3. Run npm run deploy
  4. That's it ๐Ÿ‘

Support

Support me by simply starring this repository! โญ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.