docs-markdown
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

📝 Docs Markdown

Convert a Google Docs file (API response) to Markdown

Node CI Travis CI Coverage Dependencies License Vulnerabilities Based on Node.ts npm type definitions npm package npm downloads Contributors semantic-release

npm

💡 Usage

Install the package from npm:

npm install docs-markdown

Import and use:

import { googleDocsToMarkdown } from "docs-markdown";
import { google } from "googleapis";
import { writeFileSync } from "fs";
const oauth2Client = new google.auth.OAuth2(); // Authenticate
 
const docs = google.docs("v1");
const file = await docs.documents.get({
  documentId: "Google Docs document ID",
  auth: oauth2Client,
});
 
const markdown = googleDocsToMarkdown(file.data);
writeFileSync("file.md", markdown);

⭐️ Features

  • Paragraphs
  • Headings, titles, subtitles
  • Bold, italic
  • Lists
  • Links
  • Images
  • Tables
  • Header, footer

👩‍💻 Development

Build TypeScript:

npm run build

📄 License

MIT © Anand Chowdhary

Package Sidebar

Install

npm i docs-markdown

Weekly Downloads

70

Version

1.2.0

License

MIT

Unpacked Size

18.7 kB

Total Files

9

Last publish

Collaborators

  • anandchowdhary