Open stevenbell opened 3 years ago
Hi @stevenbell sorry for the radio silence. Have you solved this? It would be pretty easy to do this:
store
and upload
functions (signature as found in LiveFileSourceSSH
Thanks, I'll take a shot at this and send a PR soon!
Just a heads up: there's a new devel branch, you probably want to use that one as a base for the PR.
Any update on this? I like the idea a lot.
I hacked on it a bit but didn't get to the point of being ready to submit a PR. From what I recall, it was very easy to set up, but the syncing wasn't working immediately (due to some combination of Remy + Syncthing + reMarkable) and I didn't have time to debug further.
Another catch is that xochitl doesn't recognize that new files have been added in the background, so you have to have some way to restart it before you can see anything you've synced. Rebooting the tablet is a bit tedious and I haven't taken time to install another launcher.
@stevenbell Thanks for the heads-up. It sounds promising so far. I think a good first step was to simply accept the requirement of a restart. A full restart takes too much time, a different launcher is a burden.
Wouldn't it be enough to run systemctl restart xochitl
on the device?
Yes, I think that would work. The issue is that if stuff is syncing in the background there's not an obvious mechanism for triggering a systemctl
command. If I have to explicitly connect to the tablet, that sort of defeats the point of having the sync happen automatically in the background.
@stevenbell You are right. You would need something like a hook that needs to run on the reMarkable. It would need to have a proper time out and it should not restart when a notebook is open.
This is challenging, because the hook must only fire when syncthing is done and the device is idle, or it should at least delay the restart until that point.
I've been using syncthing on my rM1 to keep a continuous backup of my files on my computer, and I can use reMy to view those files. I'd like to be able to use reMy to upload files to that "backup" directory, which would then get synced over to the tablet.
1) Is there any reason not to do this? Perhaps the JSON config file should specify that a local source can be written to, to avoid the case of accidentally overwriting a backup?
2) I'm happy to submit a PR; does this just require changes in the
LocalFileSource
class? https://github.com/bordaigorl/remy/blob/9c5d6897c3ee40c1067aaff2d02e694854d90400/remy/remarkable/filesource.py#L101