{"action":"opened","issue":{"url":"https://api.github.com/repos/cjnaz/RCloneSync/issues/22","repository_url":"https://api.github.com/repos/cjnaz/RCloneSync","labels_url":"https://api.github.com/repos/cjnaz/RCloneSync/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/cjnaz/RCloneSync/issues/22/comments","events_url":"https://api.github.com/repos/cjnaz/RCloneSync/issues/22/events","html_url":"https://github.com/cjnaz/RCloneSync/issues/22","id":341346250,"node_id":"MDU6SXNzdWUzNDEzNDYyNTA=","number":22,"title":"Handling Google Documents","user":{"login":"cjnaz","id":14854881,"node_id":"MDQ6VXNlcjE0ODU0ODgx","avatar_url":"https://avatars2.githubusercontent.com/u/14854881?v=4","gravatar_id":"","url":"https://api.github.com/users/cjnaz","html_url":"https://github.com/cjnaz","followers_url":"https://api.github.com/users/cjnaz/followers","following_url":"https://api.github.com/users/cjnaz/following{/other_user}","gists_url":"https://api.github.com/users/cjnaz/gists{/gist_id}","starred_url":"https://api.github.com/users/cjnaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjnaz/subscriptions","organizations_url":"https://api.github.com/users/cjnaz/orgs","repos_url":"https://api.github.com/users/cjnaz/repos","events_url":"https://api.github.com/users/cjnaz/events{/privacy}","received_events_url":"https://api.github.com/users/cjnaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-15T19:43:14Z","updated_at":"2018-07-15T19:43:14Z","closed_at":null,"author_association":"OWNER","body":"Goggle document files are created via the web interface to Google Drive, and appear without any file \r\nextension on the web interface.  They are not stored as standard files, and thus cannot be natively \r\ncopied off of and back onto the Google Drive directory tree.  A native Google document file can only \r\nexist on the Google Drive.  Instead, they may be exported in various formats that are supported by \r\nthird party tools, such as Microsoft Excel (.xlsx), or OpenDocument format (.odt).  Within the \r\nweb-based Google document tool (such as Google Sheets) the document may be saved to a normal file \r\nin various formats via File > Download as > …, which creates a real file in the browser's download \r\ndirectory.  \r\n\r\nAn rclone lsl of the Google Drive for a native Google document will show up as having an extension \r\nappropriate for the document type, such as .xlsx, .docx, etc (based on the --drive-formats switch), \r\nwhile the Google Drive web interface shows no file extension.  Also, the Google document will show \r\nno size on the web interface, while rclone lsl returns a size of -1.  An rclone copy of a Google \r\ndocument will effectively export the document to a normal file, again based on the --drive-formats \r\nswitch.  The exported file will have a real size and have the exact same date-stamp as the original \r\nGoogle document file.  \r\n\r\nThe problem comes up if we attempt to upload a modified exported document, with the same name, \r\nback to Google Drive:  \"Failed to copy: can't update a google document\".  Similarly, deleting the \r\nlocal copy and then rclone syncing local to Drive: results in \"Couldn't delete: can't delete a google \r\ndocument\".\r\n\r\n**Proposed behavior for rclonesync:**\r\n- A new --export-google-docs switch will export (copy to Local) every found Google document as \r\n<docname>_export.<ext>.  The final rclone sync will put a copy of the exported document on Google \r\nDrive as well.  The date-stamp on the file will match the original Google document.\r\n\r\n- Later, with --export-google-docs, If the native Google document datestamp is newer, and the \r\nexisting exported file is unchanged (relative to the prior rclonesync), then the document will \r\nbe exported again, replacing the current _export file.\r\n\r\n- If the exported file is changed (newer) then it will be synchronized as usual/normal, but the \r\nnative Google document cannot be updated.  Effectively, the file version and the native version \r\nare out of sync.\r\n\r\n- If the exported file had previously been changed, and now the native Google document is changed, \r\nthen --export-google-docs will blast/replace the file version.  User beware.  There is no reliable \r\nway to detect that the file version and the native Google document version have both been \r\nmodified.  The user is advised to rename the modified file version if he/she plans to subsequently \r\nedit the native Google document via the web interface.\r\n\r\n- If --export-google-docs switch is not set then all Google document files (as indicated by \r\nfile size -1) will be ignored.  Previously exported documents (which are now regular files) \r\nwill be synchronized as usual.\r\n\r\n**DOES THIS LOOK LIKE THE BEST / PROPER HANDLING?  COMMENTS PLEASE.**"}}
{"actor":{"display_login":"cjnaz"}}