Closed Utopiah closed 1 year ago
Yes, getting the positioning right needs proper parsing of the anchoring positions relative to the text. I’ve got a version nearly working that does this, hope can release it soon.
Super, happy to test it when it's out.
Luckily for me (sigh) the official keyboard for the reMarkable 2 seems to be quite delayed (some people receiving next week but otherwise website saying 30+ days) so I'm not in such a rush anymore.
Yes, getting the positioning right needs proper parsing of the anchoring positions relative to the text. I’ve got a version nearly working that does this, hope can release it soon.
Do you mean that the data in the anchoring blocks has been incorrect so far? No wonder nobody could make sense of how to use the data to draw when text was present
No, “parsing” was the wrong word, as far as I know the data is parsed correctly — it’s just that the coordinates of the pen strokes can be given relative to specific text characters, so to draw it properly you need to figure out where the text goes first. I’ve got a version that seems to work ok for doing this, just need to tidy up and get the page margins in the right place.
@Utopiah can you try the new version 0.2.0a0 of rmc? (e.g. using pipx install rmc
or pipx upgrade rmc
if you already have it, and check the version with rmc --version
).
Still some known issues such as
But the overall positioning should be about right now.
Unfortunately
(deck@steamdeck ~)$ pipx upgrade rmc
rmc is already at latest version 0.1.1 (location: /home/deck/.local/pipx/venvs/rmc)
but feel free to try directly from the test file if you want.
You may need to use pipx upgrade --pip-args '--pre' <pkg>
to allow prereleases, and/or specify the package version directly, or run directly from git.
I tried your test file thanks, just in case you want to see how it’s doing now.
Thanks, gave it a go via pipx upgrade --pip-args='--pre' rmc
thus version 0.2.0a0 but getting on rM2 3.2.3.1595 with Type Folio :
fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/rmc-test$ scp -r remarkable2:/home/root/.local/share/remarkable/xochitl/b6a18af6-2f88-4e5e-8758-39bfb49d44eb .
befa5448-bb6d-4fa4-8b7f-b69b02998562-metadata.json 100% 76 8.9KB/s 00:00
bcef4e58-8497-4ff4-b676-67f1bda581a9.rm 100% 1324 147.4KB/s 00:00
befa5448-bb6d-4fa4-8b7f-b69b02998562.rm 100% 8814 1.0MB/s 00:00
35c53c13-3984-4663-be42-229b5b835dbf.rm 100% 19KB 1.3MB/s 00:00
fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/rmc-test$ rmc b6a18af6-2f88-4e5e-8758-39bfb49d44eb/bcef4e58-8497-4ff4-b676-67f1bda581a9.rm -o test.pdf
WARNING:rmscene.tagged_block_reader:Some data has not been read. The data may have been written using a newer format than this reader supports.
Traceback (most recent call last):
File "/home/fabien/.local/bin/rmc", line 8, in <module>
sys.exit(cli())
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/rmc/cli.py", line 58, in cli
convert_rm(Path(fn), to, fout)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/rmc/cli.py", line 138, in convert_rm
tree = read_tree(f)
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/rmscene/scene_stream.py", line 761, in read_tree
build_tree(tree, read_blocks(data))
File "/home/fabien/.local/pipx/venvs/rmc/lib/python3.10/site-packages/rmscene/scene_stream.py", line 736, in build_tree
raise ValueError(
ValueError: Node does not exist for SceneGroupItemBlock: None
fabien@fabien-CORSAIR-ONE-i160:~/Prototypes/rmc-test$ rmc --version
rmc, version 0.2.0a0
Ah... maybe it was an empty page? I tried on the other 2 .rm files and seemed to work well, including typed text!
Works well :)
here is the source https://old.reddit.com/r/RemarkableTablet/comments/11mxyq4/usb_keyboards_work_now/jbowond/ and here is the log
so most of the content seems to be there but incorrectly positioned. Note that it comes from a reMarkable 1 running 3.2 and files are not mine but thought it could be interesting to verify before the official keyboards ship.