npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flashcard-master/adapters

v1.3.0

Published

Multi-source ingestion strategies, LLM vendor adapters, and multi-format exporters for Flashcard Master

Readme

@flashcard-master/adapters

npm version license docs

Multi-source ingestion strategies, LLM vendor adapters, and multi-format exporters for Flashcard Master.


🌐 Capabilities

1. Ingestion Strategies

Extract clean, distraction-free text from diverse learning sources:

  • Web Reader (WebReaderStrategy): Cleans web pages using Mozilla Readability and JSDOM, stripping ads, navbars, and cookie banners.
  • RSS & Atom (RssIngestionStrategy): Automatically parses syndication feeds to monitor new articles and blogs.
  • EPUB E-Books (EpubParser): Decompresses EPUB 2/3 books into chapter-level learning modules.
  • Notion Integration (NotionAdapter): Connects to the Notion API, traversing pages and databases recursively.
  • Local Files (LocalFileStrategy): Parses Markdown, PDF (unpdf), Word DOCX (mammoth), and plaintext documents.
  • AI Standard Formats: Ingests llms.txt and XML sitemaps.

2. LLM Provider Adapters

Zero-parser, schema-enforced JSON generation across major AI backends:

  • Ollama (OllamaAdapter): 100% private, offline inference with local models (deepseek-r1, llama3.2, mistral).
  • OpenAI (OpenAIAdapter): Strict structured outputs with gpt-4o and o3-mini.
  • Google Gemini (GeminiAdapter): High-throughput extraction with gemini-1.5-flash and gemini-2.0-flash.
  • Anthropic (AnthropicAdapter): Deep conceptual synthesis with Claude 3.5 Sonnet.

3. Study Exporters

  • AnkiConnect (AnkiConnectAdapter): 1-click live synchronization to Desktop Anki over local REST (127.0.0.1:8765).
  • Anki Packages (AnkiPackageExporter): Generates standalone .apkg decks compatible with AnkiMobile (iOS) and AnkiDroid.
  • E-Reader Study Books (EpubFlashcardExporter): Packages flashcards into formatted EPUB books with collapsible CSS spoilers for Kindle, Kobo, and Apple Books.
  • Text Formats: Markdown study guides, HTML printable cheat-sheets, CSV, and TSV spreadsheets.

📦 Installation

npm install @flashcard-master/adapters @flashcard-master/core

💻 Programmatic Usage

Ingesting an Article from a URL

import { WebReaderStrategy } from "@flashcard-master/adapters";

const reader = new WebReaderStrategy();
const doc = await reader.extract("https://en.wikipedia.org/wiki/Spaced_repetition");

console.log(`Title: ${doc.title}`);
console.log(`Word Count: ${doc.wordCount}`);
console.log(`Content Preview: ${doc.content.slice(0, 200)}...`);

Exporting to Desktop Anki via AnkiConnect

import { AnkiConnectAdapter } from "@flashcard-master/adapters";

const anki = new AnkiConnectAdapter({ baseUrl: "http://127.0.0.1:8765" });

// Test connection
const isConnected = await anki.checkConnection();
if (isConnected) {
  await anki.exportDeck({
    deckName: "Cognitive Science",
    cards: [
      {
        question: "What is the spacing effect?",
        answer: "Learning is greater when studying is spread out over time.",
        quoteCitation: "Learning is greater when studying is spread out over time, as opposed to cramming."
      }
    ]
  });
  console.log("Deck synced to Desktop Anki!");
}

📚 Documentation

For complete ingestion playbooks and exporter configurations, see the Flashcard Master Documentation.


📄 License

GNU Affero General Public License v3.0 (AGPL-3.0).