GliderGeek / pocket2rm

get articles from read-later platform pocket to the remarkable paper tablet
MIT License
187 stars 15 forks source link

run on remarkable itself #2

Closed GliderGeek closed 4 years ago

GliderGeek commented 4 years ago

working example: https://github.com/Evidlo/remarkable_news

steps:

GliderGeek commented 4 years ago

articles saved under ~/.local/share/remarkable/xochitl/

for PDF (following https://github.com/nick8325/remarkable-fs/blob/master/remarkable_fs/documents.py):

when the remarkable is switched off and on, the file then appears (and more files are generated with thumbnails etc...)

so it seems some sort of update script is called. how to trigger this update? how does remarkable_fs do this?

it seems they do it be stopping the service: https://github.com/nick8325/remarkable-fs/blob/e322a3d0b0672c9a67730bfe5e148dbb704964df/remarkable_fs/connection.py#L34

GliderGeek commented 4 years ago

{UUID4}.content:

{
    "extraMetadata": {},
    "fileType": "pdf",
    "fontName": "",
    "lastOpenedPage": 0,
    "lineHeight": -1,
    "margins": 100,
    "orientation": "portrait",
    "pageCount": 1,
    "textScale": 1,
    "transform": {
        "m11": 1,
        "m12": 0,
        "m13": 0,
        "m21": 0,
        "m22": 1,
        "m23": 0,
        "m31": 0,
        "m32": 0,
        "m33": 1
    }
}

{UUID4}.metadata :

{
    "deleted": false,
    "lastModified": "1588012868000",
    "metadatamodified": false,
    "modified": false,
    "parent": {PARENT_UUID4},
    "pinned": false,
    "synced": false,
    "type": "DocumentType",
    "version": 1,
    "visibleName": {NAME}
}

commands to copy over files:

scp {UUID4}.pdf root@10.11.99.1:/home/root/.local/share/remarkable/xochitl/{UUID4}.pdf
scp {UUID4}.metadata root@10.11.99.1:/home/root/.local/share/remarkable/xochitl/{UUID4}.metadata
scp {UUID4}.content root@10.11.99.1:/home/root/.local/share/remarkable/xochitl/{UUID4}.content
GliderGeek commented 4 years ago

done