From 284495561acb8b1bfd79cd41c88dd478e7e871a5 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 8 Nov 2020 15:17:14 +0000 Subject: Expand docker authentication instructions --- README.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6ee330d..6892eaa 100644 --- a/README.md +++ b/README.md @@ -229,19 +229,31 @@ docker build -t p2r . ### Authorization -If you already have a `~/.rmapi` file, you can skip this section. Otherwise -we'll use `rmapi` to create it. +``paper2remarkable`` uses [rMapi](https://github.com/juruen/rmapi) to sync +documents to the reMarkable. The first time you run ``paper2remarkable`` you +will have to authenticate rMapi using a one-time code provided by reMarkable. +By default, rMapi uses the ``${HOME}/.rmapi`` file as a configuration file to +store the credentials, and so this is the location we will use in the commands +below. If you'd like to use a different location for the configuration (for +instance, ``${HOME}/.config/rmapi/rmapi.conf``), make sure to change the +commands below accordingly. + +If you already have a `~/.rmapi` file with the authentication details, you can +skip this section. Otherwise we'll create it and run ``rmapi`` in the docker +container for authentication: ```bash -touch ${HOME}/.rmapi -docker run --rm -i -t -v "${HOME}/.rmapi:/home/user/.rmapi:rw" --entrypoint=rmapi p2r version +$ touch ${HOME}/.rmapi +$ docker run --rm -i -t -v "${HOME}/.rmapi:/home/user/.rmapi:rw" --entrypoint=rmapi p2r version ``` -which should end with output like +This command will print a link where you can obtain a one-time code to +authenticate rMapi and afterwards print the rMapi version (the version number +may be different): ```bash ReMarkable Cloud API Shell -rmapi version: 0.0.5 +rmapi version: 0.0.12 ``` ### Usage -- cgit v1.2.3 From fc6702323f35b76ca85f984312de1ab98e884f6e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 9 Nov 2020 14:11:09 +0000 Subject: Add note on activating alias --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 6892eaa..ea602a5 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,8 @@ your ``~/.bashrc`` file to abstract away the Docker commands: alias p2r="docker run --rm -v \"${HOME}/.rmapi:/home/user/.rmapi:rw\" p2r" ``` -Then you can use ``paper2remarkable`` from the command line as ``p2r``! +After running ``source ~/.bashrc`` to activate the alias, you can then use +``paper2remarkable`` through Docker by calling ``p2r`` from the command line. # Notes -- cgit v1.2.3 From f2981af016370e04ec1e8cc886a64b9017970210 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 11 Nov 2020 20:09:42 +0000 Subject: Bump version and update changelog --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ea602a5..0c7694c 100644 --- a/README.md +++ b/README.md @@ -152,24 +152,28 @@ flags are self-explanatory, but if you'd like more information, please open an issue [on GitHub][github-url]. ``` -usage: p2r [-h] [-b] [-c] [-d] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] [-V] - [--filename FILENAME] [--gs GS] [--pdftoppm PDFTOPPM] [--pdftk PDFTK] - [--qpdf QPDF] [--rmapi RMAPI] +usage: p2r [-h] [-b] [-c] [-d] [-e] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] + [-V] [--filename FILENAME] [--gs GS] [--pdftoppm PDFTOPPM] + [--pdftk PDFTK] [--qpdf QPDF] [--rmapi RMAPI] input [input ...] -Paper2reMarkable version 0.7.3 +Paper2reMarkable version 0.8.1 positional arguments: - input One or more URLs to a paper or paths to local PDF files + input One or more URLs to a paper or paths to local PDF + files optional arguments: -h, --help show this help message and exit -b, --blank Add a blank page after every page of the PDF -c, --center Center the PDF on the page, instead of left align -d, --debug debug mode, doesn't upload to reMarkable - -n, --no-upload don't upload to the reMarkable, save the output in current working dir + -e, --experimental enable experimental features + -n, --no-upload don't upload to the reMarkable, save the output in + current working dir -p REMARKABLE_DIR, --remarkable-path REMARKABLE_DIR - directory on reMarkable to put the file (created if missing, default: /) + directory on reMarkable to put the file (created if + missing, default: /) -r, --right Right align so the menu doesn't cover it -k, --no-crop Don't crop the pdf file -v, --verbose be verbose -- cgit v1.2.3 From 2c3fea83a36483c0cad1be3a113b6dd256856f31 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 17 Nov 2020 22:18:34 +0000 Subject: Bump version and update changelog and readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0c7694c..be1879a 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ reMarkable from any of the following sources: * [PMLR](http://proceedings.mlr.press/) * [PubMed Central](https://www.ncbi.nlm.nih.gov/pmc/) * [SagePub](https://journals.sagepub.com/) +* [ScienceDirect](https://www.sciencedirect.com/) * [SemanticScholar](https://www.semanticscholar.org/) * [SpringerLink](https://link.springer.com/) * [Taylor & Francis](https://www.tandfonline.com/) @@ -148,8 +149,8 @@ Github][github-url]. ## Usage The full help of the script is as follows. Hopefully the various command line -flags are self-explanatory, but if you'd like more information, please open an -issue [on GitHub][github-url]. +flags are self-explanatory, but if you'd like more information see the [man +page](docs/man.md) (``man p2r``) or open an issue [on GitHub][github-url]. ``` usage: p2r [-h] [-b] [-c] [-d] [-e] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] -- cgit v1.2.3 From bdd9eed73d874522753d58841d6ec22c42eeb1b8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 20 Nov 2020 14:11:04 +0000 Subject: Add note on annotations and cropping to README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index be1879a..acf392e 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,12 @@ optional arguments: --rmapi RMAPI path to rmapi executable (default: rmapi) ``` +By default ``paper2remarkable`` makes a PDF fit better on the reMarkable by +changing the page size and removing unnecessary whitespace. Some tools for +exporting a PDF with annotations do not handle different page sizes properly, +causing annotations to be misplaced. If this is an issue for you, you can +disable cropping using the ``-k``/``--no-crop`` option to ``p2r``. + ## Alfred Workflow On MacOS, you can optionally install [this Alfred workflow][workflow]. Alfred -- cgit v1.2.3 From c1381594e70c5a3f678c83bc602d48dbac42df9f Mon Sep 17 00:00:00 2001 From: John Savage Date: Tue, 8 Dec 2020 11:12:37 +0000 Subject: Update README.md Need to use ro for readonly, otherwise get error ```docker: Error response from daemon: invalid mode: r``` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index acf392e..ce7ecd6 100644 --- a/README.md +++ b/README.md @@ -280,7 +280,7 @@ docker run --rm -v "${HOME}/.rmapi:/home/user/.rmapi:rw" p2r --help docker run --rm -v "${HOME}/.rmapi:/home/user/.rmapi:rw" p2r -v https://arxiv.org/abs/1811.11242 # to transfer a local file in the current directory -docker run --rm -v "${HOME}/.rmapi:/home/user/.rmapi:rw" -v "$(pwd):/home/user:r" p2r -v localfile.pdf +docker run --rm -v "${HOME}/.rmapi:/home/user/.rmapi:rw" -v "$(pwd):/home/user:ro" p2r -v localfile.pdf ``` For transferring local files using the Docker image, you may find [this helper -- cgit v1.2.3 From c016d13c065f47d99bda996474afb44461f1a719 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 27 Dec 2020 20:49:45 +0000 Subject: Bump version and update changelog and readme --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ce7ecd6..2a2a8b3 100644 --- a/README.md +++ b/README.md @@ -154,11 +154,11 @@ page](docs/man.md) (``man p2r``) or open an issue [on GitHub][github-url]. ``` usage: p2r [-h] [-b] [-c] [-d] [-e] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] - [-V] [--filename FILENAME] [--gs GS] [--pdftoppm PDFTOPPM] - [--pdftk PDFTK] [--qpdf QPDF] [--rmapi RMAPI] + [-V] [-f FILENAME] [--gs GS] [--pdftoppm PDFTOPPM] [--pdftk PDFTK] + [--qpdf QPDF] [--rmapi RMAPI] [--css CSS] [--font-urls FONT_URLS] input [input ...] -Paper2reMarkable version 0.8.1 +Paper2reMarkable version 0.8.3 positional arguments: input One or more URLs to a paper or paths to local PDF @@ -179,19 +179,30 @@ optional arguments: -k, --no-crop Don't crop the pdf file -v, --verbose be verbose -V, --version Show version and exit - --filename FILENAME Filename to use for the file on reMarkable + -f FILENAME, --filename FILENAME + Filename to use for the file on reMarkable --gs GS path to gs executable (default: gs) --pdftoppm PDFTOPPM path to pdftoppm executable (default: pdftoppm) --pdftk PDFTK path to pdftk executable (default: pdftk) --qpdf QPDF path to qpdf executable (default: qpdf) --rmapi RMAPI path to rmapi executable (default: rmapi) + --css CSS path to custom CSS file for HTML output + --font-urls FONT_URLS + path to custom font urls file for HTML output ``` By default ``paper2remarkable`` makes a PDF fit better on the reMarkable by changing the page size and removing unnecessary whitespace. Some tools for exporting a PDF with annotations do not handle different page sizes properly, -causing annotations to be misplaced. If this is an issue for you, you can -disable cropping using the ``-k``/``--no-crop`` option to ``p2r``. +causing annotations to be misplaced (see +[discussion](https://github.com/GjjvdBurg/paper2remarkable/issues/77)). If +this is an issue for you, you can disable cropping using the +``-k``/``--no-crop`` option to ``p2r``. + +For HTML sources (i.e. web articles) you can specify custom styling using the +``--css`` and ``--font-urls`` options. The default style in the [HTML +provider](https://github.com/GjjvdBurg/paper2remarkable/blob/a6e50d07748c842f1f0a09e4b173c87850c6ddee/paper2remarkable/providers/html.py#L36) +can serve as a starting point. ## Alfred Workflow -- cgit v1.2.3 From 124abeccedb3c89408c26acc4a40b2706e66a654 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 28 Dec 2020 00:59:54 +0000 Subject: Bump version and update changelog and readme --- README.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2a2a8b3..ffae1b9 100644 --- a/README.md +++ b/README.md @@ -156,9 +156,10 @@ page](docs/man.md) (``man p2r``) or open an issue [on GitHub][github-url]. usage: p2r [-h] [-b] [-c] [-d] [-e] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] [-V] [-f FILENAME] [--gs GS] [--pdftoppm PDFTOPPM] [--pdftk PDFTK] [--qpdf QPDF] [--rmapi RMAPI] [--css CSS] [--font-urls FONT_URLS] + [-C CONFIG] input [input ...] -Paper2reMarkable version 0.8.3 +Paper2reMarkable version 0.8.4 positional arguments: input One or more URLs to a paper or paths to local PDF @@ -170,8 +171,8 @@ optional arguments: -c, --center Center the PDF on the page, instead of left align -d, --debug debug mode, doesn't upload to reMarkable -e, --experimental enable experimental features - -n, --no-upload don't upload to the reMarkable, save the output in - current working dir + -n, --no-upload don't upload to reMarkable, save the output in current + directory -p REMARKABLE_DIR, --remarkable-path REMARKABLE_DIR directory on reMarkable to put the file (created if missing, default: /) @@ -189,6 +190,8 @@ optional arguments: --css CSS path to custom CSS file for HTML output --font-urls FONT_URLS path to custom font urls file for HTML output + -C CONFIG, --config CONFIG + path to config file (default: ~/.p2r.yml) ``` By default ``paper2remarkable`` makes a PDF fit better on the reMarkable by @@ -204,6 +207,13 @@ For HTML sources (i.e. web articles) you can specify custom styling using the provider](https://github.com/GjjvdBurg/paper2remarkable/blob/a6e50d07748c842f1f0a09e4b173c87850c6ddee/paper2remarkable/providers/html.py#L36) can serve as a starting point. +A configuration file can be used to provide commonly-used command line +options. By default the configuration file at ``~/.p2r.yml`` is used if it +exists, but an alternative location can be provided with the ``-C/--config`` +flag. Command line flags override the settings in the configuration file. See +the [config.example.yml](./config.example.yml) file for an example +configuration file and an overview of supported options. + ## Alfred Workflow On MacOS, you can optionally install [this Alfred workflow][workflow]. Alfred -- cgit v1.2.3 From 0a2e82fce24855eb854cd01a6a53f992319ab5b1 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 28 Dec 2020 01:13:22 +0000 Subject: Rename default configuration file to .paper2remarkable.yml --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ffae1b9..df3300e 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ optional arguments: --font-urls FONT_URLS path to custom font urls file for HTML output -C CONFIG, --config CONFIG - path to config file (default: ~/.p2r.yml) + path to config file (default: ~/.paper2remarkable.yml) ``` By default ``paper2remarkable`` makes a PDF fit better on the reMarkable by @@ -208,11 +208,11 @@ provider](https://github.com/GjjvdBurg/paper2remarkable/blob/a6e50d07748c842f1f0 can serve as a starting point. A configuration file can be used to provide commonly-used command line -options. By default the configuration file at ``~/.p2r.yml`` is used if it -exists, but an alternative location can be provided with the ``-C/--config`` -flag. Command line flags override the settings in the configuration file. See -the [config.example.yml](./config.example.yml) file for an example -configuration file and an overview of supported options. +options. By default the configuration file at ``~/.paper2remarkable.yml`` is +used if it exists, but an alternative location can be provided with the +``-C/--config`` flag. Command line flags override the settings in the +configuration file. See the [config.example.yml](./config.example.yml) file +for an example configuration file and an overview of supported options. ## Alfred Workflow -- cgit v1.2.3 From c03ee58c647a5aba7b8d9a2026b68d5d446b940a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 28 Dec 2020 01:16:28 +0000 Subject: Bump version and update changelog and readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index df3300e..05b73ad 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ usage: p2r [-h] [-b] [-c] [-d] [-e] [-n] [-p REMARKABLE_DIR] [-r] [-k] [-v] [-C CONFIG] input [input ...] -Paper2reMarkable version 0.8.4 +Paper2reMarkable version 0.8.6 positional arguments: input One or more URLs to a paper or paths to local PDF -- cgit v1.2.3