Sign inSign up

nacrecontextlayer/connector-drive

By nacrecontextlayer

•Updated about 14 hours ago

Keeps a Google Drive folder or shared drive in Nacre layers, files as files.

Image
Machine learning & AI
Data science
Databases & storage
0

61

nacrecontextlayer/connector-drive repository overview

⁠Nacre connector — drive

Keeps a Google Drive folder — every file under it, recursively — or a whole shared drive in Nacre⁠ layers. A file is a document, its path under the folder is the external_id, a path rule picks its layer, and a file that was trashed or deleted is a document that leaves the index. A file's md5Checksum is its version, so a sweep over a large Drive downloads only what changed.

docker run -v drive-state:/state -v ./service-account.json:/run/sa.json:ro \
  -e NACRE_URL=https://nacre.example.com -e NACRE_TOKEN=... \
  -e DRIVE_CREDENTIALS=/run/sa.json -e DRIVE_FOLDER=1AbC...xYz \
  -e 'DRIVE_LAYERS=Policies/**=handbook;Engineering/**=engineering' \
  nacrecontextlayer/connector-drive:0.1.1

The service account needs to be able to read the folder: share it (or add the account to the shared drive) with the account's client_email, or set DRIVE_SUBJECT to a user whose Drive it is and give the account domain-wide delegation for the drive.readonly scope. No Google client library is carried — node:crypto signs the assertion and fetch makes the three calls. A Google Doc has no bytes, so it goes up as the Word file Drive exports it to, a Sheet as Excel, a Slides deck as PowerPoint, with the extension put on its name; a form or a drawing exports to nothing the index reads and is skipped. The variables are in the connector's README⁠.

⁠Every connector

…same as git…

⁠The product

…same as git… Tags: {version}, amd64 and arm64. ghcr.io/nacre-work/connectors/drive is the canonical address; this repository is a mirror pushed by the same build at the same version.

nacre.work⁠ · All connectors⁠ · This connector's README⁠ · Nacre quickstart⁠ · Releases⁠

Tag summary

Content type

Image

Digest

sha256:8dfff8cc5…

Size

59.5 MB

Last updated

about 14 hours ago

docker pull nacrecontextlayer/connector-drive:0.1.1