Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradoyler/googledoc-to-json
📑 Read a Google Drive Doc and convert to JSON (via ArchieML)
https://github.com/bradoyler/googledoc-to-json
Last synced: 17 days ago
JSON representation
📑 Read a Google Drive Doc and convert to JSON (via ArchieML)
- Host: GitHub
- URL: https://github.com/bradoyler/googledoc-to-json
- Owner: bradoyler
- Created: 2016-03-10T15:14:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T02:25:49.000Z (about 6 years ago)
- Last Synced: 2024-10-11T01:14:18.981Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 22
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 -c .gtokens.json -o output.json
```### API
```javascript
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`
1. Run the amazing [Google-Tokens](https://github.com/bradoyler/google-tokens)
1. Populate `.gtokens.json` with appropriate values## Todos:
- Add Mocha tests