![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Why not use the sleep command to wait for a predetermined time period rather than a while loop?
|
![]() |
![]() |
![]() |
#17 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 536
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
|
instead of your for loops.
Oh. PeterT made the same suggestion. Though there probably is (or should be) a better way to query the Dropbox software directly instead of waiting some arbitary time. You might also consider using rclone which is similar to rsync but for cloud storage services like Dropbox and OneDrive. I have used rclone for replication against OneDrive. It worked. |
![]() |
![]() |
![]() |
#18 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,241
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#19 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,241
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Also, please delete your existing script or others will use it and corrupt their library. |
|
![]() |
![]() |
![]() |
#20 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 536
Karma: 5060708
Join Date: Oct 2016
Device: Forma, iPad Air 4
|
rclone is the superior tool. It is designed specifically to work with cloud storage providers like Dropbox and OneDrive.
|
![]() |
![]() |
![]() |
#21 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: calibre
|
Yes, corrected script follows:
Code:
#!/bin/bash dropbox start dropbox status echo -n "SYNCING CALIBRE" wait_time=15 i=0 while [ $i -le $wait_time ]; do sleep 1 echo -n . ((i++)) done dropbox stop echo -n "STOPPING DROPBOX" i=0 while [ $i -le $wait_time ]; do sleep 1 echo -n . ((i++)) done calibre echo - n "SYNCING DROPBOX" i=0 while [ $i -le $wait_time ]; do sleep 1 echo -n . ((i++)) done dropbox start dropbox status i=0 while [ $i -le $wait_time ]; do sleep 1 echo -n . ((i++)) done dropbox stop Last edited by sheepdog; Today at 10:21 AM. Reason: Adding information. |
![]() |
![]() |
![]() |
#22 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Umm.. why not replace
Code:
i=0 while [ $i -le $wait_time ]; do sleep 1 echo -n . ((i++)) done Code:
sleep $wait_time |
![]() |
![]() |
![]() |
#23 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,241
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#24 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
|
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,444
Karma: 74317824
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
|
![]() |
![]() |
![]() |
#26 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2024
Device: calibre
|
The key to using Dropbox with Calibre is to realize that, so long as Calibre and the Dropbox daemon are never running at the same time, the risk of corruption is no greater than with one or the other alone. That said, be aware that Calibre is still running even when the main window is closed if there is a viewer window open. I could not find an option in Calibre to close the viewer windows automatically whenever the main window is closed. So to use Dropbox you need to be sure to close all Calibre viewer windows and the main window before running the Dropbox daemon. I have scripted this condition in linux as well, for myself. The code will be very system dependent, so not including it here.
|
![]() |
![]() |
![]() |
#27 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 20,781
Karma: 27405072
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I don't know of any easy way to determine if a folder (e.g. a calibre library) or it's contents are in use. BR |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Calibre on multiple computers | Waitingforatrain | Library Management | 2 | 09-19-2016 07:12 PM |
calibre and multiple computers | aielloj | Calibre | 4 | 06-26-2011 02:10 AM |
How to Duplicate My Calibre Library on Multiple Computers? | Sydney's Mom | Related Tools | 101 | 03-10-2011 12:14 PM |
Using one Calibre Library (via Dropbox) on Multiple Computers | PocketGoddess | Related Tools | 14 | 02-20-2011 04:15 AM |
Multiple computers and Calibre | starrigger | Calibre | 11 | 03-19-2009 12:14 PM |