Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

google-docs-fetch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-docs-fetch

Fetch a Google Docs document as formatted, inlineable HTML.

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

google-docs-fetch

Fetch a Google Docs document as formatted, inlineable HTML.

  • Preserves (inline) document formatting, including bold/italics, colors, and more
  • Strips page width to reflow text into your own container
  • Maintains original URLs and uploaded images

Installation

npm install google-docs-fetch

Usage

Ensure that your document has link sharing on and set to be viewable by "Anyone wth the link". Retrieve your document ID (shown here as YOUR-DOC-ID) from the generated link:

https://docs.google.com/document/d/YOUR-DOC-ID/edit?usp=sharing

In your script, you can then retrieve the contents of the document as HTML:

var fetch = require('google-docs-fetch');

fetch('YOUR-DOC-ID', function (err, content) {
  if (!err) {
    console.log(content);
  }
});

The resulting HTML will resemble the following format, using a wrapper class to scope CSS styles:

<style type="text/css">
.page-content-YOUR-DOC-ID ... {...}
</style>
<div class="page-content-YOUR-DOC-ID">
...
</div>

FAQs

Package last updated on 01 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc