Skip to content

๐Ÿ“‘ Read a Google Drive Doc and convert to JSON (via ArchieML)

Notifications You must be signed in to change notification settings

bradoyler/googledoc-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

googledoc-to-json

Node.js library to read a Google Drive Doc and convert to JSON (via ArchieML)

Install

npm install googledoc-to-json --save

Examples

CLI

$ npm install -g googledoc-to-json
$ googledoc-to-json <doc-id> -c .gtokens.json -o output.json

API

const GoogleDocToJSON = require('googledoc-to-json');
const config = require('./config.json'); // see 'Getting Credentials' below
const gDocToJSON = new GoogleDocToJSON(config);

const options = {
    fileId: '1gTERIVPV_0yoMXc6mlBtBpNvaoH5pIU2IC-75V_Qcas',
    oAuthTokens: config.oAuthTokens
};

gDocToJSON.getArchieML(options, function (err, aml) {
    console.log('## ArchieML output', err, aml);
});

Getting credentials

  1. cp .gtokens.example.json .gtokens.json
  2. Run the amazing Google-Tokens
  3. Populate .gtokens.json with appropriate values

Todos:

  • Add Mocha tests

About

๐Ÿ“‘ Read a Google Drive Doc and convert to JSON (via ArchieML)

Resources

Stars

Watchers

Forks

Packages

No packages published