splitbrain / ReMarkableAPI

Docs and implementation of the reMarkable file sync API
https://www.splitbrain.org/blog/2018-02/02_file_sync_for_remarkable_tablet
MIT License
374 stars 27 forks source link

Feature request: include metadata in download #6

Closed ericsfraga closed 6 years ago

ericsfraga commented 6 years ago

I have scripts that use the metadata information to process the lines files from the tablet. It would be very helpful if the download, using the php script, could include the metadata file along with the others in the zip file created.

splitbrain commented 6 years ago

The API currently returns the zip as stored on the remarkable storage servers. It does not include the metadata because that is managed via the storage API server.

We would need to create the meta file from the item info we have. That part is easy, but the used zip library does not support amending zip files on the fly currently.

Process would be to unpack the zip, generate the metafile, create a new zip with everything. It would probably be easier to just download everything into a provided directory.

How are you using my code? As a command line script or as a library?

ericsfraga commented 6 years ago

Thanks for the explanation. I use your code as a command line script.

Given the above, don't worry about it. I can get what I need indirectly via your script: I'll update my scripts appropriately. It's basically the document name and folder information that I normally extract from the metadata file.

ericsfraga commented 6 years ago

Oh, one quick question (to avoid opening another issue): what are the first three characters on each line in the output from the "list" command? They are not UTF-8 and simply come out as unknown glyphs for me on Linux.

splitbrain commented 6 years ago

They are UTF-8. Here's how it looks on my Linux system right now:

2018-02-06-142943_566x96_scrot

ericsfraga commented 6 years ago

Thanks. I must have something configured badly on my system then.