Code Monkey home page Code Monkey logo

rm-dl-annotated's Introduction

rm-dl-annotated

Export annotated PDFs from ReMarkable tablets.

I read lots of papers on my RM tablet. It's super cool to be able to scribble notes and highlight them, but later I want to go back and review the notes and unfortunately the interface on the actual RM sucks for that. I made this simple utility so I could scroll through the PDFs on my laptop and see my highlights and notes at a glance during review.

It also works for notebooks.

Tested with reMarkable tablet software version 2.3.0.16.

Example

rm-dl-annotated.sh "/Super Cool Research Paper I Scribbled All Over"

Generates ./"Super Cool Research Paper (exported).pdf" with the scribbles on top of the original PDF.

Dependencies

All these things need to be on your path, and you need to have given rmapi access to your ReMarkable Cloud account:

  • python
  • ImageMagick (convert)
  • pdfinfo (from poppler-utils)
  • pdfunite (from poppler-utils)
  • qpdf
  • rmapi
  • svgexport
  • rM2svg

If any of your PDFs have been cropped on your ReMarkable then you will also need:

  • pdftoppm (from poppler-utils)

And the following Python libraries:

As of this writing the reHackable rM2svg hasn't been updated to support new versions of the .lines file format for new version of the ReMarkable tablet OS, so I suggest using the fork by delaere.

Installation

On Ubuntu:

sudo apt install imagemagick poppler-utils qpdf
pip install opencv-python numpy

Follow the installation instructions on the project pages for rmapi, rM2svg (download the script and put it in a directory on your PATH like /usr/bin), and svgexport.

rm-dl-annotated's People

Contributors

jmpinit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rm-dl-annotated's Issues

Annotations not in right place if created with cropped view

Nice bringing together of a number of tools! And the script works very well generally. However, if you make annotations when the PDF is presented in a cropped view on the tablet, the annotations are not overlaid properly on the PDF when combined.

This may not be a problem with your script as such as. My guess is that the conversion to SVG from .lines does not offset the image using any crop information (assuming that information is available in the first place).

where to run the command?

I just wanted to make sure i understand the usage of this tool. is this command running on my laptop?
rm-dl-annotated.sh "/Super Cool Research Paper I Scribbled All Over"

KeyError: 'transform'

Hi @jmpint,

I wonder if you can help me with this. I get the following initial error (with RM1 2.12.1.527) when I run

rm-dl-annotated.sh "/MYDIR/MYSUBDIR/MYFILE

Traceback (most recent call last):
File "/home/user/git/rm-dl-annotated/is-transformed.py", line 40, in
main()
File "/home/user/git/rm-dl-annotated/is-transformed.py", line 27, in main
transform = content_data['transform']
KeyError: 'transform'

and the following final warnings

WARNING: 6f73712f-0bd1-45bb-b4cf-42c2df4a751e_annotations.pdf: reported number of objects (981) is not one plus the highest object number (1692)
WARNING: 6f73712f-0bd1-45bb-b4cf-42c2df4a751e.pdf (object 197 0): object has offset 0
WARNING: 6f73712f-0bd1-45bb-b4cf-42c2df4a751e.pdf (object 219 0): object has offset 0
WARNING: 6f73712f-0bd1-45bb-b4cf-42c2df4a751e.pdf (object 553 0): object has offset 0
WARNING: 6f73712f-0bd1-45bb-b4cf-42c2df4a751e.pdf (object 1670 0): object has offset 0
qpdf: operation succeeded with warnings; resulting file may have some problems>

Finally I cannot find any MYFILE (exported).pdf

Thanks for your time

Roberto

Install Instructions missing

Thanks for your work on such RM enhancements. I was thinking about using it but there are no install instructions. Can you please add a couple paragraphs that points users in the right direction? Would be great. Thanks in advance.

Landscape orientation

Thanks for your work on this script.

On a pdf which has been rotated in the UI to landscape orientation, this script doesn't perform the corresponding rotation in the markup layer to the exported pdf.

Not working with .lines version 5

Similar to #4, the tool exits with an error:

Not a valid reMarkable file: <header=b'reMarkable .lines file, version=5          '> <nlayers=1

Posting here, however this may be an issue with upstream, apologies if so.
Tested on reMarkable 1 version 2.0.2.0
rmapi 0.0.9
rm2svg 0.0.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.