This is a utility that converts Google Documents, Sheets, etc. to physical files. gpurge
can search in a local folder (typically a fully-synced Google Drive folder) recursively and convert all .godc
and gsheet
files to .docx
and xlsx
, respectively.
-
Python 3.6 or greater
pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
- Turn on Drive API. Save the
credentials.json
file ascreds/client_id.json
in the same folder as thegpurge.py
file.
Run ./gpurge.py -h
.
Here are some scenarios that make sense to do this:
-
You want to archive your files and guarantee that you have access to their content 20 years from now. Google killed a great many products in the past, and it is not unlikely that they will discontinue Google Docs at some point in the future.
-
Be able to perform bulk operations on these documents locally, such as searching.
-
You need to port your files to another system. How many applications out there can process
.gdoc
files, other than Google Docs?