-
Notifications
You must be signed in to change notification settings - Fork 30
repush.sh: Filetransfer broken due to new naming scheme #31
Comments
These fixes worked for me. The common Bash way to get the extension would make it Another issue is that the thumbnails did not show up for me -- they were all blank. This was quick to fix by deleting the thumbnails that were already there ( |
These changes aren't quite sufficient when the basename has a dot in it. For a file There's also some wackiness with EPUBs; I'm not exactly sure why. |
I've included your fixes (among others) in this branch: https://github.com/trou/scripts/tree/remarkable_2 I'll do a PR if I get to work around the dots problem. |
@trou I've run into this problem, and I'm trying to use your modified
That last chunk - from Clues welcomed, 'cos I have no idea what's broken here! I'm running the script on an Ubuntu 20.04 64-bit installation, standard Bash shell, and connecting to a Remarkable 2 running 2.5.0.27. |
I had the same bug, which was related to the "." problem @mb64 mentioned. |
Seems to be working here - the file transferred correctly, no infinite loop. Many thanks! |
Tell a lie, there's a new glitch: the file transferred correctly, but there's also an empty skeleton file with the same name on there. Tried it again with a second PDF, same thing happened: there's a working copy of the file, and an empty skeleton file which just opens up to a blank "Page 1 of 1". |
With version
2.5.0.27
, repush.sh is no longer able to transfer files onto the remarkable. The reason for this is a change in the setting of teh visibleName in the metadata field. While before this was the filename including the extension, now the metadata is generated with the filename without the extension in thevisibleName
-field. This causesrepush.sh
to hang indefinitely as internal checks fail.The fix for this has to be applied in two locations:
This line has to be changed to
placeholder_basename="$(basename "$1" .$extension)"
, as$extension
is available from a couple of lines above.The second location is this, in principle the same fix applies, however,
$extension
is not set. A quick test of mine using"$(basename "$f" | cut -f1 -d '.')"
works like a charm, however, this will fail the moment the filename contains another.
besides the one separating the extension. As I have just briefly investigated the problem, I am not sure what's the cleanest fix for this location, hence an issue describing the fix instead of pull requesting a fix. The hack withcut
, while working, is certainly not the optimal solution.Addendum: Due to the handling of directories (dropping a placeholder pdf and turning that into a directory), the aforementioned fix is likely not that straightforward. I currently settled for using basename twice at that very location to first remove a
.pdf
-extension and then removing a.epub
-extension, which works well enough for me. However, this is likely breaking directory pushing, so it likely needs to be implemented a little more carefully, with consideration for the directory pushing implementation.The text was updated successfully, but these errors were encountered: