Initially, I didn't wanna even worry about that, because personally don't use them in my syncroised forlders. Sync scripts have troubles with handling extension-less non-googledocs files.So if you have changes on both local storage and Google Drive, you may lose part of your data. Only full path to folder allowed now (you can't put your script near folder and use it's relative path).(or see this installation page for more information)Īll of these items are extremely important because if you won't have at least one of then, nothing will work :(' TO-DO and known problems/issues/features: Sudo pip install -upgrade google-api-python-client To run this amazing project, you will need: (Optional) put script that you need to cron or any other task planner that you use.Run drive_sync.py script, if you want to apply changes made on local storage to specific Google Drive folder, and run download_from_drive.py if you want to apply changes from that Google Drive folder to your local storage.First time you run upload_to_drive.py or download_from_drive.py, it will open browser/new tab, and you will need to authenticate the script (or if it doesn't redirect you, copy the link and do authentification manually).In upload_to_drive.py and download_from_drive.py file scripts change global variables FULL_PATH and DIR_NAME to your's full folder path and folder's name, which you want to upload/download/synchronize, respectively.json client secret config file in and put it in working directory (don't forget to save it as client-secret.json) Turn on Google Drive API here (if you have any troubles, check Python Quickstart guide).So, it's two-way synchronization of selected folders, which you can run at any time (in any 'direction') you want (isn't this a dream, yeah?). Check and synchronize changes on Drive with its local storage instance.Check and synchronize changes on local storage with (same) Google Drive folder.Upload folder and all it's content from local storage to Google Drive.A Python script to automatically synchronize your Google Drive content with local storage files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |