File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change 57
57
# * Beyond core utilities (date, basename,...), the following software
58
58
# has to be installed on the host computer:
59
59
# - uuidgen
60
- # - imagemagick (or graphicsmagick)
61
60
62
61
# This is where ssh will try to copy the files associated with the document
63
62
REMARKABLE_HOST=${REMARKABLE_HOST:- remarkable}
151
150
# Add thumbnails directory
152
151
mkdir ${tmpdir} /${uuid} .thumbnails
153
152
154
- # Generate preview thumbnail for the first page
155
- # Different sizes were found (possibly depending on whether created by
156
- # the reMarkable itself or some synchronization app?): 280x374 or
157
- # 362x512 pixels. In any case the thumbnails appear to be baseline
158
- # jpeg images - JFIF standard 1.01, resolution (DPI), density 228x228
159
- # or 72x72, segment length 16, precision 8, frames 3
160
- #
161
- # The following will look nice only for PDFs that are higher than about 32mm.
162
- convert -density 300 " $filename " ' [0]' \
163
- -colorspace Gray \
164
- -separate -average \
165
- -shave 5%x5% \
166
- -resize 280x374 \
167
- ${tmpdir} /${uuid} .thumbnails/0.jpg
168
-
169
153
elif [ " $extension " == " epub" ]; then
170
154
171
155
# Add content information
175
159
}
176
160
EOF
177
161
else
178
- echo " Unknown extension: $extension "
179
- exit
162
+ echo " Unknown extension: $extension , skipping $filename "
163
+ rm -rf ${tmpdir} /*
164
+ continue
180
165
fi
181
166
182
167
# Transfer files
You can’t perform that action at this time.
0 commit comments