Skip to content

full directory conversion functionality #46

@chemag

Description

@chemag

Right now rmc will take a single .rm file, and convert it to pdf (or svg, or whatever). It works well (I stopped using anything else).

IMO it has 2x limitations:

  • (1) Documents on the other hand are composed of several .rm pages, and some metadata (e.g. the path and name of the actual document). rmc forces the user to convert one page at a time, and then unite the files.
  • (2) On top of that, a remarkable device typically keeps lots of documents organized. This forces the user to manually organize the output files.

My main workflow right now consists of syncing all the files from a remarkable device, and converting them to pdf. It works in 2 stages:

(1) copy the raw files and metadata

$ rsync -avut --progress --rsync-path=/opt/bin/rsync remarkable:/home/root/.local/share/remarkable/xochitl/ ~/raw/

(2) convert all the raw files into PDF documents, organized using the same path structure than in the device.

$ rmc-dir.py convert-all --root ~/raw/ --outdir ~/pdf -dd

My rmc-dir.py script goes through all the remarkable files in ~/raw/, and renders them into a PDF in the ~/pdf/ directory. It keeps the names and paths of the original files:. For example, the document that in the device is personal/foo/bar will end up as ~/pdf/personal/foo/bar.pdf.

The script does a couple of metadata things:

  • analyzes the per-document metadata, getting the pages in each doc (ordered).
  • checks metadata and output timestamps to decide whether to re-render a file.

And then it calls rmc.

Now, my current script (rmc-dir.py) would be better integrated as part of the rmc command. Note that it accepts input and output dirs, instead of files, so using -o for the output (and nothing for the input) may not be the right approach.

A couple of questions for you:

  • (1) Are you interested in the functionality for this workflow?
  • (2) Are you interested in this script? I'd be happy sending it as a separate script, and then you decide how to integrate it.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions