bsdz / google-drive-remarkable-sync

Apps Script library for synchronising Google Drive folder with Remarkable reader.
MIT License
118 stars 17 forks source link

Sync multiple GDrive folders #2

Closed julianprester closed 4 years ago

julianprester commented 4 years ago

Thank you for this! I was wondering whether it's possible to sync multiple folder in my GDrive with the reMarkable? I can put them as subdirectories into the synced folder, but can I also sync multiple top-level directories? I tried changing gdFolderSearchParams to a or condition "(title = 'Books' or title = 'Papers') and mimeType = 'application/vnd.google-apps.folder'" but that only syncs one of the two. I have the sync mode set to mirror.

bsdz commented 4 years ago

Currently, it uses gdFolderSearchParams to search for a single matching folder. As a workaround you should be able to call syncGoogleDriveWithRemarkableCloud twice in your run_sync function. One for each folder. I haven't tested this yet but I can't foresee any issues with calling it twice.