Open ericsfraga opened 5 years ago
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.
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!
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
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.
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
What can be encoded in the segments, besides position and pressure:
But doesn't the version 1.6 feature built-in SVG exportation?
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.
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?
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).
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.
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.
@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.
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!
Thanks! I will ask then and report back :)
Hey, thanks for your work :) Has anyone in this thread maybe also updated exportNotebook
to work?
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.