I said this elsewhere, but thank you for this script.
I have it working to send pdf files from my mac to my tablet, and I'm very happy about that.
I can't send epub files, per #14 (which is fine with me)
Also, I can only send files that are .pdf, not .PDF.
if I send a .PDF file, a blank pdf is created in the root directory on reMarkable with the lower-case filename, and the script seems caught in an infinite loop.
Likely this should be caught by the error-catching code that I removed on my machine since my grep does not have -P
# elif [ -z $is_directory ] && ! echo "$1" | grep -qP "\.pdf$" && ! echo "$1" | grep -qP "\.epub$" ; then
# echo "repush: File extension invalid or missing: $1"
# return 0
The first thing I tried was naively rewriting the above to only check for "pdf" (since I disabled the epub issue to get up and running on a mac with no -P option in grep)
# added by krobinso
elif [ -z $is_directory ] && ! echo "$1" | grep -q ".pdf" && ! echo "$1"; then
echo "repush: File extension invalid or missing: $1"
return 0
# end addition
# elif [ -z $is_directory ] && ! echo "$1" | grep -qP "\.pdf$" && ! echo "$1" | grep -qP "\.epub$" ; then
# echo "repush: File extension invalid or missing: $1"
# return 0
#******
The result of this is somewhat interesting: when I send a file like filename.PDF,
- the script echos the filename
- a blank file filename.pdf (all lower case) is created on the reMarkable
- the reMarkable wifi disconnects. It needs restarting, and then I have to go enable the webui again.
I said this elsewhere, but thank you for this script.
I have it working to send pdf files from my mac to my tablet, and I'm very happy about that.
I can't send epub files, per #14 (which is fine with me)
Also, I can only send files that are .pdf, not .PDF.
if I send a .PDF file, a blank pdf is created in the root directory on reMarkable with the lower-case filename, and the script seems caught in an infinite loop.
Likely this should be caught by the error-catching code that I removed on my machine since my grep does not have -P
The first thing I tried was naively rewriting the above to only check for "pdf" (since I disabled the epub issue to get up and running on a mac with no -P option in grep)
The result of this is somewhat interesting: when I send a file like filename.PDF,