remarkable_syncthing
remarkable_syncthing copied to clipboard
Is that possible to using this to update pdfs to the remarkable?
Thank you for your excellent job! I want to use this to manage my books and notes. But I still do not figure out how to using the syncthing to update the pdfs to the remarkable. Could you teach me how to do this? Thank you again.
I tried this yesterday and I don't think it's possible. The ReMarkable creates it's own metadata file and renames the pdf file. If you just sync it with Syncthing there will be no metadata file and therefore the ReMarkable won't show the file, unfortunately.
You could write a script that generates the metadata file automatically. E.g.
re_pdfgen.sh
#!/bin/bash
set -e
if [[ $# != 2 ]]
then
echo "Expected 2 arguments: INPUT.PDF OUTPUT_DIR"
exit
fi
uuid=$(uuidgen)
cp $1 $2/${uuid}.pdf
cat << EOF > $2/${uuid}.metadata
{
"deleted": false,
"lastModified": "$(date +%s000)",
"metadatamodified": true,
"modified": true,
"parent": "",
"pinned": false,
"synced": false,
"type": "DocumentType",
"version": 0,
"visibleName": "$(basename $1)"
}
EOF
echo "Created $2/${uuid}.pdf"
echo "Created $2/${uuid}.metadata"
Then you would call it like so
re_pdfgen.sh /path/to/input.pdf /path/to/syncthing/xochitl
Then reboot the device so xochitl rescans for new metadata files.
Great idea, is it possible to combine this somehow with syncthings API so that everytime a change accours the file system of the reMarkable is refreshed or forced to rescan the specific folder? That would make tjis automatic and completely replace reMarkables Cloud. Maybe other API projects can help there. As an idea :)
Relevant: https://github.com/syncthing/syncthing/issues/5601
I'm also interested in this.
Until this is possible, you may way to consider programmatically interacting with reMarkable's Cloud.
https://github.com/splitbrain/ReMarkableAPI
https://github.com/reHackable/awesome-reMarkable#cloud-api