The script requires rmapi.
Nextcloud must contain Annotations and Trash directories and reMarkable a Cloud directory.
Annotations
Trash
Cloud