Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

repush: uppercase extension PDF does not work #21

Description

@karenerobinson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions