Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Metadata json file not added to zip file #36

Open
alpianon opened this issue May 14, 2023 · 0 comments
Open

Metadata json file not added to zip file #36

alpianon opened this issue May 14, 2023 · 0 comments

Comments

@alpianon
Copy link

alpianon commented May 14, 2023

I just started using my brand new Remarkable and I would like to set up a solution in order to avoid using remarkable cloud, and use my own private cloud instead.

I started playing with rmapy, it seems an excellent project with almost all I need, thanks for the awesome work!

Just, I noticed that when dumping a zip file (eg. created from a pdf file), rmapy does not include the metadata json file. This prevents xochitl from "seeing" the notebook when I manually upload its (uncompressed) contents into ~/.local/share/remarkable/xochitl. But if I add the following line to rmapy.document.ZipDocument.dump():

            zf.writestr(f"{self.ID}.metadata", json.dumps(self.metadata))

it works as expected (i.e. I see the file in xochitl).

Moreover the VissibleName key in metadata dict created by rmapy.document.ZipDocument seems to be wrong, and actually if I leave as it is, I see the uploaded file but it has an empty name in xochitl. If I change it to visibleName it works as expected (i.e. I see the file with its name).

Are these two things on purpose (eg. they are needed to make things work with remarkable cloud) or are they bugs/typos?

(I already answered myself to the second question having a look at https://github.com/splitbrain/ReMarkableAPI/wiki/Storage 🙂 : it's not a bug, the typo is in the remarkable cloud API; the metadata json schema is slightly different from the one used within the device...)

@alpianon alpianon changed the title Metadata json file not added to zip file + metadata key typo Metadata json file not added to zip file May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant