hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.55k stars 439 forks source link

Dropbox sync #92

Open Dimentium opened 11 years ago

Dimentium commented 11 years ago

Hello. Can you add a native "dropbox sync" support or any other online sync feature? I mean a "portable use" - without installed dropbox client on PC.

Thank you for pretty tool!

hluk commented 11 years ago

I did some research on Dropbox.

Possible problems:

Anyway, one way to do this is to create plugin to save/retrieve items from Dropbox.

Some sort of synchronization would be very useful -- still not sure whether to use Dropbox.

hluk commented 11 years ago

Scratch that about automatically creating a new account on Dropbox. I'm pretty sure that it is actually evil thing to do :).

hluk commented 11 years ago

I'm thinking about using Google Drive instead of Dropbox. (You'll need to have an account there.) Any thoughts on that?

API Reference: https://developers.google.com/drive/v2/reference/ Google APIs Terms of Service: https://developers.google.com/terms/

Dimentium commented 11 years ago
  1. its should be fine to have choice: sync "text / hypertext / media" content separately. may be only text in first step.
  2. there are many apps on iOS/android use dropbox for datastore https://www.dropbox.com/developers/datastore/sdks/other is it possible use dropbox this way?
  3. or this: https://www.dropbox.com/developers/dropins
  4. may be just add a "sent through email" feature in "export" or "ftp upload".
hluk commented 11 years ago

ad 1. That's actually good point -- you could be able to browse/view the files on sync server (but ... see below).

ad 2. and 3. It would be useful to have a C++ library. Unfortunately you won't be able to browse the files on Dropbox if they're encrypted or if the file doesn't contain only text (serialized item is just a data blob because the data contains all formats available). I'm not sure how safe it would be not to encrypt the items.

ad 4. Sending to e-mail would be nice feature, but it's not synchronization per se. You can do this manually with one tab even now -- export tab, send on mail, import elsewhere. Actually, it could be nice to extend tabs so you can drag them to file browser or e-mail client and they're exported to a file and vice versa (drop exported files to tab bar) -- I've created feature-request #93.

Dimentium commented 11 years ago

i mean an 1-click feature for "export to email" with predefined settings - e.g for use with https://sendtodropbox.com

hluk commented 10 years ago

There is feature (in master; planned for next release) that allows to synchronize items with files in a directory. I hope this would help even though you'll need to have Dropbox installed.

hluk commented 10 years ago

Beta release contains the new synchronization plugin (https://groups.google.com/forum/#!topic/copyq/SYe_sLiKkvg). You'll need Dropbox or something to be installed but that way the plugin is very powerful per se.

reagle commented 10 years ago

I tried this with VMWare's built-in clipboard disabled (because it is buggy when used with the app WriteMonkey). I directed CopyQ items/synchronization on both my host (Kubuntu 14.04) and guest (W8.1) to a shared network drive.

Clipboard from guest was written to a file which appeared in host's tab. However, the selector for the host clipboard always stayed on the last use host copy. To use the item from the guest, I'd have to open the tab and manually go to the top of the queue and select that item.

Clipboard from host was written to a file which did not appear in guest's tab. Guest does not seem to be reading changes to the directory.

hluk commented 10 years ago

I'm using Qt to check if directory changed (QFileSystemWatcher class). The problem is that it doesn't work in some cases, especially on network drives (bug) or without proper kernel support.

Maybe I should try different library to monitor files (e.g. simplefilewatcher).

reagle commented 10 years ago

On 06/20/2014 03:31 AM, Lukas Holecek wrote:

I'm using Qt to check if directory changed (QFileSystemWatcher class). The problem is that it doesn't work in some cases, especially on network drives (bug https://bugreports.qt-project.org/browse/QTBUG-23847) or without proper kernel support.

Ah yes, network share file detections are tricky. I just wanted to document it wasn't working on virtual machine network shares in case it was supposed to work.

Maybe I should try different library to monitor files (e.g. simplefilewatcher https://code.google.com/p/simplefilewatcher).

Not sure, but if you do try anything I'm happy to test.

apple-corps commented 9 years ago

Hi,

I'm using copyq on my laptop and desktop and I love it :) . The one thing I have not figured out is how to sync the data between the devices. I had tried just copying the application directory which contains the data to my laptop, but wasn't able to trick the application into reading this on it's instance. I gave this an hour or so.

I notice there is also a export / import tab option. I haven't yet tried it, but what about all tabs?

Today I was trying to use the synchronize plugin. I made a sshfs mount on my desktop from my laptop, and attempted to synchronize a few tabs. At first I made the mistake of trying to synchronize my clipboard, and may have lost all it's content. Anyhow, I then created a test tab with a single item inside it. I choose to synchronize the tab, with the remote file system. However, after syncing I see two funny icons.

copyq_sync

I don't seem to see the user options listed above in my Synchronize menu..

User options:

sync all tabs or select tabs to sync (don't save whole tabs again; see above), never sync the first tab (it's updated from clipboard), sync configuration (could be tricky)

An aside, my network tab somehow at some point got swapped with my clipboard, and now is acting as the clipboard.

apple-corps commented 9 years ago

sorry for the sparse notes. What I had tried before was copying the .config/copyq folder to the laptop, since it contains the .dat files...

hluk commented 9 years ago

Item data files (copyq*_tab_*.dat in config directory) should be portable. Does CopyQ print any warnings or errors on console when trying to load the new files on different computer?

Synchronize feature is more centered around the idea that each format in an item is one file. So *.txt files are shown as text, *.html as rich text. Additionally custom icon and base name of the file are shown at the to of each item.

If you edit an item in a synchronized tab it should be written to the file and vice versa. This way it should be possible to share items with multiple instances of CopyQ or sync them with Dropbox.

I use that feature mainly to view and manipulate downloaded files and run scripts.

Tab order in tab tree is confusing. If you create "network/clipboard" tab, you'll see it as single tab in tab bar but in tab tree there will be additional tab group "network" (this is not tab since items cannot be created there). Creating "network" tab will place the tab at the end of tab bar but the visual order is now different in tab tree since item "network" already exists in the tab list. I've created issue #303 for this.

Thanks for the input.

gooddadmike commented 7 years ago

I love CopyQ and I am trying to figure out how to use sync to backup with dropbox on windows. The docs say you have to install the Synchronize Plugin. Any way to add a step by step here? I can't seem to make anything show up in the directory path I've added.

hluk commented 7 years ago

The synchronization plugin is installed on Windows by default (you can disable it only when installing the app with setup.exe) -- if you see the Synchronize in configuration, everything should work.

Verify that the tab name matches and the folder exists.

Lukas

On Fri, Jul 14, 2017 at 6:54 AM, mike searcy notifications@github.com wrote:

I love CopyQ and I am trying to figure out how to use sync to backup with dropbox on windows. The docs say you have to install the Synchronize Plugin. Any way to add a step by step here? I can't seem to make anything show up in the directory path I've added.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hluk/CopyQ/issues/92#issuecomment-315269653, or mute the thread https://github.com/notifications/unsubscribe-auth/AACUpoD0zpUzD2V0bQTCAhcmP_7KyfCHks5sNvSagaJpZM4A98gq .

gooddadmike commented 7 years ago

What could I be doing wrong? image

gooddadmike commented 7 years ago

I also had just clipboard in my tab name.

gooddadmike commented 7 years ago

I'm wanting to be able to just copy some text on my clipboard and it would show up in this folder somehow.

hluk commented 7 years ago

"Tab name" column in configuration must contain exact tab name. In your case it's actually &clipboard (notice the underlined "c" in tab label in main application window).

I'll try to improve the synchronization settings when I have the time.

ipleten commented 7 years ago

Would be great to have encrypted synchronization. It seems broken now. I set &clipboard to \~/copyq/clipboard and enabled encryption for it ("&clipboard") but "\~/copyq/clipboard" is empty now. After i disabled encryption for specific tab all work fine.

hluk commented 7 years ago

@ipleten Synchronization plugin encrypts and decrypts the whole file with tab data (for better performance); so unfortunately it's incompatible with encryption plugin.

You should still be able to encrypt/decrypt each file separately in the synchronized tab.

gooddadmike commented 7 years ago

@hluk BTW I got this working. Thanks for your help

VGrol commented 6 years ago

@hluk Is this still the case? When syncing tabs I get a copyq_0000.txt file, but it stores the contents of the tab in raw text. Is there a config option I am missing?

hluk commented 6 years ago

When syncing tabs I get a copyq_0000.txt file, but it stores the contents of the tab in raw text. Is there a config option I am missing?

@VGrol Not sure what you want to achieve. The *.txt files will only contain plain text.

Can you open new issue if this is not related to Dropbox synchronization?

amsaravi commented 6 years ago

I think its better to enhance sync feature to sync tabs' data not as a usual work. if network goes down then the copyq may not respond. so its better that i could choose when to synchronize data not the program. some times the local synchronization doesn't work, and in the log we have (for example): Cannot save tab “pythons” to “C:/Users/Mahdi/AppData/Roaming/copyq/copyq_tab_cHl0aG9ucw==.dat” (The process cannot access the file because it is being used by another process.