bio-guoda / preston

a biodiversity dataset tracker
MIT License
25 stars 1 forks source link

tracking google drive documents, sheets, and presentations #284

Closed jhpoelen closed 2 months ago

jhpoelen commented 2 months ago

Many folks use Google Drive to keep, collaborate on, and share documents/spreadsheets/presentations.

However, keeping track of these google docs/sheets/slides outside of Google Drive requires clicking on export buttons.

Suggest to implement a preston tracker feature that allows for tracking of google drive resources, and exporting them is suitable formats.

For instance, given a google doc at https://docs.google.com/document/d/1LMnC0lUw_DGIQV5Pa4lZhe_7-SIR-otgHSHDNkAwD7Q/edit , I'd like to be able to say:

preston track "https://docs.google.com/document/d/1LMnC0lUw_DGIQV5Pa4lZhe_7-SIR-otgHSHDNkAwD7Q/edit"

and preston would take the current version of the documents and export it in available formats.

jhpoelen commented 2 months ago

A first pass at Google Drive resource tracking is now available via -

preston track [google drive resource url]

for instance,

preston track "https://docs.google.com/document/d/1LMnC0lUw_DGIQV5Pa4lZhe_7-SIR-otgHSHDNkAwD7Q/edit"

produced attached data.zip with provenance hash hash://sha256/8d06be909b45d5cc906d879eb9c5a21bbfd7e89904148eb1b630384cea39a84c .

data.zip

for extracting specific resources, you can say things like:

preston ls\
 --anchor\
 hash://sha256/8d06be909b45d5cc906d879eb9c5a21bbfd7e89904148eb1b630384cea39a84c\
 | grep pdf\
 | grep hasVersion\
 | preston cat\
 > doc.pdf 

to produce attached doc.pdf .

doc.pdf

fyi @zedomel @filipi-soares . . . ready to track all the google drive documents / sheets you'd like to keep and cite?

jhpoelen commented 2 months ago

google sheets / doc / presentation tracking is now available via Preston v0.5.8 .

fyi @daniel-mietchen - I wonder how we can tie the many google docs to wikidata entries in a secure and verifiable way .

Perhaps a citation with provenance provided by Preston history.