-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for .lines file, version=6 (rM v3.0) #49
Comments
First off: I am not on beta and I haven't had the chance to try v3.0. With the addition of text input, they seem to have radically redesigned the (undocumented) internal file format. I know this sucks; I spent all this time writing Remy and now it will become obsolete. Edit: |
Thank you! "radically redesigned" - not good :-( I was hoping for a quick solution to render files without using new features. Promising though ddvk is addressing this. |
The closest to a documentation is https://remarkablewiki.com/tech/filesystem#lines_file_format and the linked pages. |
Ah, totally forgot about the wiki 🫢 Maybe I'll briefly look into it. Learning about the python struct lib can't be wrong :) |
Just found this. Not sure how functional this is but maybe it helps? https://github.com/ricklupton/rmscene |
One main problem for me is that upgrading to v3 would completely disrupt my current Remy-based workflow; Ideally I'd need:
Any volunteers? |
Just send a sample Notebook by mail. Will try create a pdf later. |
Maybe this helps: https://github.com/chemag/maxio/blob/master/version6.md |
Pretty much in an early stage. I've emailed him, pointing to this discussion here :) |
Looks like a well-structured python version from the ddvk go source plus more. |
On a side note: also the .content file has changed. At first I thought "um, lots of timestamps in there". Now with that LWW-CRDT in mind, this seems to make sense, to sync not only the actual lines file but also some of the notebook's metadata. Excerpt from a .content with significant changes to the page list:
|
Maybe you can use this as it is to read the files to avoid having to re-implement all the low-level reading? And then feed the stroke data into the same rendering you do now. See also ricklupton/rmscene#2 The rmscene code is fairly complete for reading the "blocks" of data. I was mostly interest in accessing the text data, so haven't looked at the stroke data much, but I think it's fairly straightforward to extract the same kind of data as in the old format. |
[I forgot to mention it here] I mixed rmscene's parser with maxio's SVG renderer, and now I can convert version=6 lines (.rm) files into PDF.
Wow, this is a full version=6 parser :). This was great, and saved me lots of effort. I added an rm2svg (and rm2pdf) converter to rmscene (see pull request here), and then added glue for maxio (the package I use for conversion) to resort to rmscene for version=6 files (see pull request here). The setup is cumbersome (you need to download both repos in the same root directory, as maxio will look for ../rmscene/), but I'm not sure whether the upstream repo owners are interested in any of this work, or whether they're willing to unify their repos (which IMO is the right solution). tl;dr: Now I get PDFs of all the .rm files, either version=5 or version=6. This works for me: (1) setup
(2) sync all your files to ~/raw/
(3) convert the raw files to pdf.
Some caveats:
|
I've hacked together a quick proof-of-concept support for the version 6 file here: https://github.com/lonvia/remy/tree/support-for-version-6. It is using https://github.com/ricklupton/rmscene for reading the lines files. Simply 'pip install rmscene' to make it work. This is very rudimentary. Only strokes are supported, not the new text annotations. It can read the page info from the new cPages structure in the .content file to get the page UUIDs and templates. There is other interesting information there. At least the VerticalScroll should be used to determine the actual page size. It currently segfaults on loading PDFs. So still a bit immature for a PR but maybe still a useful starting point for others. |
@lonvia thanks so much for sharing your efforts! Much appreciated. |
It's good to hear the project is not dead. Remy is just the right piece of software for me and I discovered too late that updating my Remarkable would break it. So I'm just glad I have it working again for what I need. If you are still active and interested, I'm willing to contribute a few PRs towards Remarkable version 3. However, it would have to be in smaller steps with gradually growing support for the new format because I'm pretty much in the same situation as you (very limited time and mostly doing this to support my own workflows). As far as I can see, it can be done without breaking 2.15 (although I can't really test that for obvious reasons). It might give you a version of remy that gets you out of the current deadlock, i.e. a version that allows you to update your remarkable without crippling your workflow for weeks while you readd the basic support to remy. |
If you don't mind me asking (and somewhat hijacking this thread), I added support to the newer versions to https://github.com/benneti/rmrl , however I did not figure out how I could transform the annotations to correctly align with a pdf. Do you have more information or ideas about how to use the VerticalScroll for this? |
I tested the work of @lonvia after updating to v3.11 from v2.15. The software is good enough to keep the workflow for me, in particular: 👍 Strokes in new and previous notebook work
In conclusion, provided that you use the reMarkable with remy in the same way as v2.15 (no typed-text, no down scrolling) everything should work. And even if you mess something up, there is a simple way to fix it. |
It seems reMarkable have changed the .lines file format with their recent v3.0 software.
It now says version=6 and even if remy's version check is bypassed there's errors (of course),
example from lines.py:
readStruct
return fmt.unpack(buff)
struct.error: unpack requires a buffer of 24 bytes
Any idea how to fix this?
The text was updated successfully, but these errors were encountered: