Skip to content

Option to create links to google documents instead of converting it #1349

Closed

Description

@pckapps

When syncing with Google Drive, would it be possible to add an option so that links to google documents are created instead of converting the files? Double clicking on the file should then open the browser with the relevant file. I believe this is how it works when using the official Drive client by Google. This should be similar to how "--drive-skip-gdocs" works.

Activity

  1. ncw commented on Apr 18, 2017

    @ncw
    Member

    How does that actually work? What type of file is created and what is in it? I suspect this intercepted by the google drive client somehow.

  2. pckapps commented on Apr 18, 2017

    @pckapps
    Author

    Yes, the Google Drive client creates a file called "WorkbookName.gsheet". Inside is simple json, something like this:

    {"url": "https://docs.google.com/open?id=aaabbbccc",
    "doc_id": "aaabbbccc",
    "email": "[email protected]",
    "resource_id": "document:aaabbbccc"}
    

    My suggestion is to create a similar file that natively opens the link in the browser. It's not ideal to edit my Google documents in Libre office and uploading it back to Google Drive.

    What do you think?

  3. agilmor commented on Feb 16, 2018

    @agilmor

    The solution/alternative that odeke-em/drive client does is to create a .desktop for all google docs with this fields:

    Type=Link
    URL=https://drive.google.com/...
    

    I guess that it's the same idea, but for Linux.

    This also works for other Drive but not Docs files like Zoho's ones, etc...
    I'm movimng from odeke-em/drive to rclone and I'm missing this feature... so +1 to this feature!!

    Thanks!

  4. added this to the Help Wanted milestone on Mar 1, 2018
  5. crysman commented on Jun 26, 2018

    @crysman

    👍 for this,
    as this is how the official Google Drive Stream client behaves on Windows (= double-clicking onto native Google file opens a web browser with the Google file).

    Would be great if this client behaved the same way! I am now looking for some good working alternative to Google Drive Stream, but not yet successfully because of this :(

  6. ncw commented on Jun 26, 2018

    @ncw
    Member

    Does anyone want to work on this issue?

    I'm happy to talk people through what needs to be done.

  7. B4dM4n commented on Jul 27, 2018

    @B4dM4n
    Collaborator

    I have looked a bit into this issue while working on Google documents uploads.

    It seems like there are different concepts of link files:

    Windows and macOS have .url files.

    [InternetShortcut]
    URL=https://rclone.org/

    Source: stackoverflow

    macOS also has .webloc files.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>URL</key>
        <string>https://rclone.org/</string>
    </dict>
    </plist>

    Source: stackoverflow

    Linux has .desktop files.

    [Desktop Entry]
    Encoding=UTF-8
    Name=rclone.org
    URL=https://rclone.org/
    Icon=text-html

    Source: stackoverflow

    A simple cross platform solution could use .html files:

    <html>
    <head>
    <meta http-equiv="refresh" content="0; url=https://rclone.org/" />
    </head>
    </html>

    Source: stackoverflow

    To be cross platform compatible we should implement at least .html files and probably .url and .desktop files for native users.

    I will try to integrate this into my current work at uploading documents.

  8. Fabian42 commented on Jul 28, 2018

    @Fabian42

    Comment history:
    Part 1: https://github.com/cjnaz/RCloneSync/issues/22
    Part 2: cjnaz/rclonesync-V2#1
    Part 3: #2413

    In short: Not having this option completely breaks Google Drive sync for me (which I need for other programs). RClone sees Google documents as having file size -1 and doesn't properly copy back and forth, that messes up RCloneSync, which fails to build a file index that is needed for two-way sync.

  9. ncw commented on Jul 31, 2018

    @ncw
    Member

    @Fabian42 there is always this flag

      --drive-skip-gdocs                      Skip google documents in all listings.
    

    which will make syncs work properly just skipping the google docs.

  10. B4dM4n commented on Sep 1, 2018

    @B4dM4n
    Collaborator

    There has been progress for this issue:
    #2479 is a work in progress rewrite of the drive documents handling.
    If anyone wants to help testing the new implementation, there is a beta branch containing the changes: https://beta.rclone.org/branch/v1.42-162-g6a66967c-drive-documents/

    Keep in mind this is not tested thoroughly yet and therefore be considered experimental.

    Please post any feedback in #2479. Updated releases will also be anounced there.

  11. modified the milestones: Help Wanted, v1.44 on Oct 4, 2018
  12. B4dM4n commented on Oct 4, 2018

    @B4dM4n
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions