Skip to content
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

Update for new format in version 1.6 of the tablet #27

Open
ericsfraga opened this issue Nov 9, 2018 · 14 comments
Open

Update for new format in version 1.6 of the tablet #27

ericsfraga opened this issue Nov 9, 2018 · 14 comments

Comments

@ericsfraga
Copy link

The latest update to the reMarkable operating system has introduced single page lines files (NN.rm) and these lines files have a different format than the old .lines files used. Is there a plan to update the rM2svg script? More to the point, does anybody have a pointer to a description of the contents of these .rm files?

Thank you.

@edupont
Copy link
Member

edupont commented Nov 9, 2018

I am still waiting for the version 1.6 of the software to hit my device. There is not a lot I can do until then.

I am expecting changes in the way the eraser strokes are saved, I hope there are not too many other changes.

@ericsfraga
Copy link
Author

Thanks. 1.6 hit my tablet the day before yesterday. Each notebook (and PDF annotations) is now stored with each page as a separate file. The format has definitely changed but maybe only the header information (header string, number of pages, ...). I'm playing with it and will post here if I figure anything out. Otherwise, I will be patient and wait for you!

@ericsfraga
Copy link
Author

I've been playing and figured out the following which seems to be correct with some minimal testing:

#  header: 'reMarkable .lines file, version=3          '
#  4 bytes integer: number of layers
#  for each layer: 
#      4 bytes integer: number of strokes
#      for each stroke:
#          4 bytes integer: pen
#          4 bytes integer: colour
#          4 bytes: unknown
#          4 bytes floating point: width
#          4 bytes integer: number of segments
#          for each segment:
#              6 floating point numbers: x, y, pressure, title, unknown, unknown

@ericsfraga ericsfraga reopened this Nov 9, 2018
@ericsfraga
Copy link
Author

ericsfraga commented Nov 9, 2018

Sorry about that: clicked wrong key. Wanted to say that the biggest changes are 1. (obvious) single page and 2. (less obvious) 6 floating point number per stroke and I'm not sure what the extra value might be.

Edit: A working script has been made available if you want to incorporate my changes.

@edupont
Copy link
Member

edupont commented Nov 9, 2018

Thanks for the investigations,

Do you have a way to patch the original script by acting depending on the version of the file from the header? Could be as easy as

  • No reading the number of pages in the document, and
  • Reading 1 additional float on each stroke.

What can be encoded in the segments, besides position and pressure:

  • Tilt, along 3 different axes
  • Speed of the movement

But doesn't the version 1.6 feature built-in SVG exportation?

@ericsfraga
Copy link
Author

I don't unfortunately have an easy way to patch your script from mine as mine has diverged significantly. However, it should be quite straightforward to have a check for the different header lines and set appropriate flags?

I've not played with 1.6's SVG export yet. Just wanted to make sure my existing setup continues to work as I rely on it quite a bit for daily use. I'll get around to trying it at some point.

@edupont
Copy link
Member

edupont commented Nov 9, 2018

I don't unfortunately have an easy way to patch your script from mine as mine has diverged significantly.

Is there anything in the differences that everyone else could benefit from?

@ericsfraga
Copy link
Author

Not really: I have simply deleted the whole multi-page support from what you have. You're welcome to all changes I have made (see link in several comments back).

@ericsfraga
Copy link
Author

One more thing: I have tested out the export to SVG (beta) feature. It does work but your code (and my adaption) is nicer in that it does colour. The SVG export only exports in black & white.

@ericsfraga
Copy link
Author

I wrote to reMarkable support and got the following response: It's float x; float y; float speed; float direction; float width; float pressure;» in the point struct now, other than that, they are the same as before.

@ax3l
Copy link

ax3l commented Feb 9, 2019

@ericsfraga did you by coincidence inquire what the third value in each stroke stands for? (pen, colour, unknown, width, number of segments) It's probably something selection or copy related.

@ericsfraga
Copy link
Author

I did not ask about that unfortunately. They're very responsive so maybe just email reMarkable support and ask? By the way, I like the slides in your presentation on your github page!

@ax3l
Copy link

ax3l commented Feb 10, 2019

Thanks!
I will ask then and report back :)

@cobalamin
Copy link

Hey, thanks for your work :) Has anyone in this thread maybe also updated exportNotebook to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants