A recent discussion in the DEVONthink To Go forum inquired about making available on Dropbox a sub-set of documents from a database where the documents are contained (imported) into the database. The documents need be available on Dropbox for editing/annotation in other applications/operating systems. Ideally, the external changes would then be updated in the database while maintaining the documents’ metadata and location/replication in the database.
The following workflow accomplishes these goals for me, but may or may not work for you, so first test on a small set of data at your own risk. I believe I posted something similar to this here in the past, but I did not go searching for it today. Feel free to discuss how it works, or does not work, for you along with any suggestions to improve the workflow.
-
Create a folder on your desired cloud drive (e.g. Dropbox, etc.) and index this folder into your DEVONthink database (File menu, Index…).
-
Create the following Applescript created by forum member korm, save it to your local hard disk. Name it anything you want-I’ve named mine Full Sync Indexed Folder.
on triggered(theRecord)
try
tell application id "com.devon-technologies.thinkpro2"
deconsolidate record theRecord
-- synchronize record theRecord
-- The synchronize Applescript command was depreciated in triggered scripts beginning with DEVONthink 2.6.
-- Indexed groups are now synchronized automatically when selected in DEVONthink 2.6
end tell
end try
end triggered
- Attach the full sync script created above to the indexed group in the database by linking to the script in the group’s info pane.
In the future, when this group is selected 2 things happen. Any documents added to the group in the database are exported to the Finder cloud drive folder and any changes/additions that have been made to the contents of the Finder cloud drive folder are updated/indexed to the database.
-
Now to put this into use, try the following. First, continue to tag and replicate documents in the database as needed as this group structure and document metadata will be preserved. To make documents available in the Finder cloud folder, replicate them to the indexed cloud group in the database. You could move them to the indexed group, but then you would have to manually move them back to the original location once you no longer need them on the cloud drive.
-
Select the indexed cloud drive group in the database to activate the attached script. All the documents added to the folder have now been exported out of the database, into the Finder cloud folder. The documents can now be accessed outside the database, and the replicants in the database will still be active.
-
Edit/annotate the document content outside the database as needed by accessing them from the cloud drive. You do not want to rename or move the documents as the link to the indexed group in the database will be broken. Note also that DEVONthink allows you to name documents in the database with characters that are not permitted in Unix and/or Windows file names (e.g. colon). The files in the Finder will be named automatically with legal names, so you will see a dash replacing a colon, etc. This will not create any problems when working with these documents, and the documents will not be renamed in the database (although it is a good practice to use legal Unix names in the database to begin with). I have no experience using documents on Android, so I don’t know what the Android OS file naming conventions are-you’ll want to research that yourself if trying this with the Android.
-
Once you have edited/added documents that you want to be reflected in the database, select the indexed cloud drive group as described in step #5 and all the changes/additions will be added to the database.
-
Once you no longer want the documents on the cloud drive, you need to change them from indexed to imported into the database. Right-click on them and choose ‘Move into database’ (you can first shift- or command-click on multiple documents to act on all selected documents at once). Confirm that the documents are now contained in the database as the indexed document arrow indicator should now dissapear from the documents.
For documents that are replicated in the database (i.e. the documents you worked with in step #4 above), you can now delete the documents from the indexed cloud folder. The replicants in the database will be preserved. For new documents added to the indexed group, you will need to move the documents to another location in the database. If they remain in the indexed cloud group, they will be re-exported back to the Finder indexed folder as described in step #2.
As an important note, when performing step #8 you must act on all the files in this indexed group before again selecting the indexed group’s icon. By selecting the indexed group, the full sync script will again be triggered and all documents in the group will be re-exported back to the Finder indexed folder. If this happens, you will need to start step #8 over again.