simonw / google-drive-to-sqlite

Create a SQLite database containing metadata from Google Drive
https://datasette.io/tools/google-drive-to-sqlite
Apache License 2.0
152 stars 13 forks source link

Google Drawings shortcuts plus fixed file extensions on exports #31

Closed simonw closed 2 years ago

simonw commented 2 years ago

https://docs.google.com/drawings/ are actually quite neat, and support a bunch of export formats: https://developers.google.com/drive/api/v3/ref-export-formats

image

I'm going to add svg, jpeg and png shortcuts - pdf works already.

Refs:

simonw commented 2 years ago

Thesvg one resulted in this:

google-drive-to-sqlite export svg '1iX5GVs7TaKASlx7xAvIoJz-HlOxYAaiIyvF6Lf2_rI8'
Writing to 1iX5GVs7TaKASlx7xAvIoJz-HlOxYAaiIyvF6Lf2_rI8-export.svg+xml

id-export.svg+xml isn't a good filename, because on macOS open ... doesn't know which app to open it with.

So I should fix it so .svg-xml becomes .svg.

simonw commented 2 years ago

I'm also going to change word to just doc - I think that's clearer, especially since it produces the .doc file extension.

simonw commented 2 years ago

Also renaming excel to xls and powerpoint to ppt for the same reason.

simonw commented 2 years ago

I manually tested these on my Mac - the .xls export opens in Numbers, the .ppt one opens in Keynote, the .doc one opens in pages.