Git Product home page Git Product logo

rmapi's Introduction

rMAPI

Note: rMAPI is effectiviely unmaintaied at this point, and this repo will be archived in the next few weeks. Please see this discussion for more info.

Actions Status

rMAPI is a Go app that allows you to access the ReMarkable Cloud API programmatically.

You can interact with the different API end-points through a shell. However, you can also run commands non-interactively. This may come in handy to script certain workflows such as taking automatic backups or uploading documents programmatically.

Console Capture

Some examples of use

Tutorial on how to directly print to your reMarkable on Mac with rMAPI

Warning: experimental support for the new sync protocol

If rmapi stopped working for you in a such way that gets were working fine but puts didn't seem to work, this is relevant for you.

A few months ago, the Remarkable folks introduced a new sync protocol. This new protocol is being rolling out incrementally. Some users are being forced to use it, and some other users are still using the old protocol that rmapi has supported well for a few years now.

Unfortunately, the rmapi contributors are still on the old protocol and this makes it more difficult to test the new protocol's implementation. However, as we know that there are many users who would like to use rmapi with the new protocol, we have added experimental support for it. The always awesome @ddvk did all the work here!

Although rmapi will warn you if it needs to use the new protocol, we'd like to take this opportunity again to reiterate that the support for the new protocol is experimental, and you should make sure you have a back-up of your files in case something goes wrong.

Install

From sources

Install and build the project:

git clone https://github.com/juruen/rmapi
cd rmapi
go install

Binary

You can download an already built version for either Linux or OSX from releases.

Docker

First clone this repository, then build a local container like

docker build -t rmapi .

create the .config/rmapi config folder

mkdir -p $HOME/.config/rmapi

and run by mounting the .config/rmapi folder

docker run -v $HOME/.config/rmapi/:/home/app/.config/rmapi/ -it rmapi

Issue non-interactive commands by appending to the docker run command:

docker run -v $HOME/.config/rmapi/:/home/app/.config/rmapi/ rmapi help

API support

  • list files and directories
  • move around directories
  • download a specific file
  • download a directory and all its files and subdiretores recursively
  • create a directory
  • delete a file or a directory
  • move/rename a file or a directory
  • upload a specific file
  • live syncs

Annotations

  • Initial support to generate a PDF with annotations.

Shell ergonomics

  • autocomplete
  • globbing
  • upload a directory and all its files and subdirectories recursively

Commands

Start the shell by running rmapi

List current directory

Use ls to list the contents of the current directory. Entries are listed with [d] if they are directories, and [f] if they are files.

Change current directory

Use cd to change the current directory to any other directory in the hierarchy.

Find a file

The command find takes one or two arguments.

If only the first argument is passed, all entries from that point are printed recursively.

When the second argument is also passed, a regexp is expected, and only those entries that match the regexp are printed.

Golang standard regexps are used. For instance, to make the regexp case insensitve you can do:

find . (?i)foo

Upload a file

Use put path_to_local_file to upload a file to the current directory.

You can also specify the destination directory:

put book.pdf /books

Recursively upload directories and files

Use mput path_to_dir to recursively upload all the local files to that directory.

E.g: upload all the files

mput /Papers

Console Capture

Download a file

Use get path_to_file to download a file from the cloud to your local computer.

Recursively download directories and files

Use mget path_to_dir to recursively download all the files in that directory.

E.g: download all the files

mget .

Download a file and generate a PDF with its annoations

Use geta to download a file and generate a PDF document with its annotations.

Please note that its support is very basic for now and only supports one type of pen for now, but there's work in progress to improve it.

Create a directoy

Use mkdir path_to_new_dir to create a new directory

Remove a directory or a file

Use rm directory_or_file to remove. If it's directory, it needs to be empty in order to be deleted.

You can remove multiple entries at the same time.

Move/rename a directory or a file

Use mv source destination to move or rename a file or directory.

Stat a directory or file

Use stat entry to dump its metadata as reported by the Cloud API.

Run command non-interactively

Add the commands you want to execute to the arguments of the binary.

E.g: simple script to download all files from the cloud to your local machine

$ rmapi mget .

rMAPI will set the exit code to 0 if the command succeedes, or 1 if it fails.

Environment variables

  • RMAPI_CONFIG: filepath used to store authentication tokens. When not set, rmapi uses the file .rmapi in the home directory of the current user.
  • RMAPI_TRACE=1: enable trace logging.
  • RMAPI_USE_HIDDEN_FILES=1: use and traverse hidden files/directories (they are ignored by default).
  • RMAPI_THUMBNAILS: generate a thumbnail of the first page of a pdf document
  • RMAPI_AUTH: override the default authorization url
  • RMAPI_DOC: override the default document storage url
  • RMAPI_HOST: override all urls
  • RMAPI_CONCURRENT: sync15: maximum number of goroutines/http requests to use (default: 20)

rmapi's People

Contributors

abmantis avatar andrew-d avatar arachnegl avatar artagnon avatar azure-pipelines[bot] avatar brevetlamersports avatar claytonjy avatar cmars avatar ctrlaltf2 avatar ddvk avatar dependabot[bot] avatar gjjvdburg avatar hboon avatar hemanthmalla avatar j6k4m8 avatar jasdev avatar jebw avatar juruen avatar kevin-cantwell avatar lobre avatar myersjustinc avatar natebrennand avatar nick8325 avatar pcl avatar peerdavid avatar rlafuente avatar satyajithj avatar siraben avatar timjb avatar tmcarr 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  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  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

rmapi's Issues

Building version 0.0.6

Hi @juruen,

We the new package api.v2, I was wondering if we could create a new version of the module with this package included (from master). Otherwise, we cannot use it in external modules because the automatic most recent version of the module github.com/juruen/rmapi is 0.0.5.

And at the same time, maybe you can explain the process to create a new release? Is it manual?

Thanks a lot,
Loric

Getting one-time codes

Hi, I logged in to my remarkable, but there is no way to get a one time code. How did you manage to get the code? It reads: Only one tablet can be connected to my account.

failed to create new device token

Hi,
I get the following error, when I try to connect to the remarkable service:

mark@thukydides ~$ rmapi 
Enter one-time code (go to https://my.remarkable.com): xxxxxxxx
ERROR: 2018/10/09 08:23:54 auth.go:82: failed to create a new device token

Can you help me out here?

Thanks, Mark

rmapi broken on OS X for cups printing

Hi,

There is a cups backend script that uses rmapi to "print" documents to your remarkable (https://ofosos.org/2018/10/22/printing-to-remarkable-cloud-from-cups/).

However this script runs in a restricted environment protected by OS X's SIP. As such the rmapi executable (located in /usr/local/bin, or it may not be executed) may not open /var/spool/cups/.rmdir; the operation is denied by SIP.

WARNING: 2019/06/27 11:47:05 config.go:40: failed to open /var/spool/cups/.rmapi with open /var/spool/cups/.rmapi: operation not permitted/n
Enter one-time code (go to https://my.remarkable.com): ERROR: 2019/06/27 11:47:05 auth.go:62: Code has the wrong length, it should be 8
Enter one-time code (go to https://my.remarkable.com): ERROR: 2019/06/27 11:47:05 auth.go:62: Code has the wrong length, it should be 8
Enter one-time code (go to https://my.remarkable.com): ERROR: 2019/06/27 11:47:05 auth.go:62: Code has the wrong length, it should be 8
Enter one-time code (go to https://my.remarkable.com): ERROR: 2019/06/27 11:47:05 auth.go:62: Code has the wrong length, it should be 8

(infinite loop here, please also fix)

HOME for user "_lp" is /var/spool/cups. Note SIP is not based on POSIX permissions (SELinux but for OS X), and I do not want to disable it. I would rather have rmapi read from a permitted location.

Please allow one to override this files location with an environment variable (RMAPI_CONF or RMAPI_TOKEN etc) or a command argument. So one could open a file path that is allowed by SIP.

Thanks,
Thorben

Put fails if entry exists in top-level directory

This issue was raised in GjjvdBurg/paper2remarkable#22, but I believe the problem lies with rmapi.

If a file is uploaded with put and a destination directory is provided, the upload fails if a file with the same name already exists in the top-level directory.

Steps to reproduce:

  1. rmapi put test.pdf
  2. rmapi mkdir Test
  3. rmapi put test.pdf Test/ fails with "entry already exists"

This bug seems to be due to the fact that the put command checks if the entry exists before figuring out the destination directory, instead of the other way around.

Thanks for the help!

Upload zip

Besides uploading a PDF, it would be useful to allow uploading remarkable zip files, e.g. ones that were downloaded with rmapi before and contain the .content, .pagedata and lines files next to the PDF.

A use-case could be to store some files only locally on the computer, but allow to transfer them back to the remarkable if needed in the future. Some more automation would be necessary to make it really useful, but enabling uploading of zip files would be a first step. What do you think?

epubs still corrupted

Hi!

Even after the current change the rM complains about corrupted files, sigh.

I've compared the current upload and the official client upload, by downloading it back, and found the following differences:

  • different uuid
  • epub is binary equal (actually same md5sum) for both clients, but different from the original epub uploaded.
  • the content file is pretty printed for the official client, and it has a transform key:

"transform": { "m11": 1, "m12": 0, "m13": 0, "m21": 0, "m22": 1, "m23": 0, "m31": 0, "m32": 0, "m33": 1 }

  • pagedata is the same again (md5sum)
  • the official client zip file contains a uuid.thumbnails folder with 20 page thumbnails.

57f16dca-8746-426b-9a06-b3a5d14e1e66.zip
Bonesetter - Laurence Dahners.zip

get pdf with annotations

When I 'get' a pdf I've annotated I get instead a zip file with 4 files in it (a .content, .lines, .pdf, and .pagedata). How do I get instead a pdf I can read with the line annotations in.

runtime error: invalid memory address on tab-completion for ls on file

when using tab completion for the lscommand inside the shell on a file I get the following error:

[/eBooks]>ls
[f]     A..............
[f]     D.................
[f]     c.............
[f]     ct.............
[f]     c.............
[f]     c.............
[/eBooks]>ls Apanic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x72716f]

goroutine 43 [running]:
github.com/juruen/rmapi/shell.shellPathCompleter.getWords(0xc0003d07b0, 0xc0002aa3a0, 0x1, 0x2, 0xc00027a798, 0x1, 0x0, 0x10, 0xc00027a770)
        /home/tiziano/.local/go/src/github.com/juruen/rmapi/shell/custom_completer.go:57 +0x15f
github.com/juruen/rmapi/shell.shellPathCompleter.Do(0xc0003d07b0, 0xc00027a770, 0x4, 0x4, 0x4, 0xc0000687e0, 0xc000097501, 0xc000135200, 0xc0000b9d90)
        /home/tiziano/.local/go/src/github.com/juruen/rmapi/shell/custom_completer.go:24 +0x529
github.com/juruen/rmapi/vendor/github.com/chzyer/readline.(*opCompleter).OnComplete(0xc00042c3f0, 0xc0004b6480)
        /home/tiziano/.local/go/src/github.com/juruen/rmapi/vendor/github.com/chzyer/readline/complete.go:87 +0x140
github.com/juruen/rmapi/vendor/github.com/chzyer/readline.(*Operation).ioloop(0xc00042c230)
        /home/tiziano/.local/go/src/github.com/juruen/rmapi/vendor/github.com/chzyer/readline/operation.go:178 +0xe0a
created by github.com/juruen/rmapi/vendor/github.com/chzyer/readline.NewOperation
        /home/tiziano/.local/go/src/github.com/juruen/rmapi/vendor/github.com/chzyer/readline/operation.go:88 +0x2b1

it works for the mv command, though.

This is with go 1.11.4 and rmcli 0.0.4 (07cf6cb)

Spurious Unauthorized Error

After one day has passed between two consecutive logins (not sure whether it is related, though), I get the following error when connecting:

ERROR: 2019/01/22 22:42:48 api.go:34: failed to fetch documents 401 Unauthorized Error
ERROR: 2019/01/22 22:42:48 main.go:30: retrying...
ReMarkable Cloud API Shell

I also saw the same error the first time I connected when I had to enter the token (on 2 different machines).

this is with version 0.0.4 (07cf6cb) with go 1.11.4

Uploaded PDF doesn't open on reMarkable

First of all, thanks for this project, it's really great!

This is an issue since version 1.7 of the reMarkable software. PDFs that are sent to the reMarkable can no longer be opened and are stuck on loading. They are also shown as having "Page 1 of 0". The same issue was reported here, but I don't know if the fix can be ported to rMAPI.

I've tried different ways of editing the zip file that is created by rMAPI to see if I could fix it, but haven't found a solution yet.

Any help would be greatly appreciated, thank you!

mget command only gets directories

Great tool, thanks a lot for making this!

I'm trying to use the mget command to download all the files, but I only seem to get the directories. No errors occur and each file does get a line stating it was downloaded okay:

downloading [./Quick sheets]... OK

However, after the processes finishes, I only have the directory structure, not the files. (I checked, but they're not hidden either). Any thoughts?

Pdf rendering of rM handwritten notes

Hello,

Thanks for starting this golang utility around the rM tablet. The rM official ecosystem is quite closed while this tablet has a great potential!

I know the aim of this project was simply to interact with the rM api to get or put files from the device's cloud.

However, I have seen you have started an implementation of pdf rendering for annotations. I started something similar for rendering regular notes a while ago and I did not go farther due to lack of time.

But as the scope of rmapi is expanding a little, maybe it could be a good idea to render as well regular handwritten notes from the rM format to pdf? As far as I understand, the format is quite the same for notes as for annotated pdf.

Having all the downloading/rendering in golang with a single binary would be rather interesting. If you agree with this, I could try to find some time to contribute and adapt the annotations implementation toward a more general one including both annotations and regular notes.

Did you notice any technical issues / conception problems that would make this task difficult to implement?

Thanks,
Loric

Printing pdf-files directly to rM

I am new on this platform so my excuses if this is not the right place to post this question. After a succesfull installatio of the pluging juruen made I tried to print a pdf-file from Adobe Acrobat. Without success. I got the message that printing is not able at the same time as saving. Is there a way to print directly from Adobe Acrobat to rM?

Make archive.Zip a proper io.Reader/ io.Writer

I think it would improve the API ergonomics if archive.Zip would implement an io.ReadWriter.

That way, you can still use intermediate buffers for downloading / caching, but can then chain these using the standard io methods. Also, the following would be possible:

zip := archive.NewZip()
client.Download(doc.ID, zip)

From what I can tell, the zip.Read()/zip.Write() functions have an internal buffer already, so making it an io.ReadWriter should not have any negative effects in that regard.

Code has the wrong length error message

Hi there,

I'm attempting to follow the instructions here, but my CUPS endpoint fails with the error message "Idle - "2019/10/07 17:19:46 auth.go:62: Code has the wrong length, it should be 8""

ofosos/scratch#6

$ rmapi version
ReMarkable Cloud API Shell
rmapi version: 0.0.6

Add optional path to `ls` command

The ls command only lists the files in the current directory. This means that we can only list contents of the root directory from the command line, from where it would actually be interesting to specify a path to a directory to list the contents of.

Directory creation is broken

We are not following the expected workflow to create directories and the result is that we end up with a directory that shows up for brief moment on the rM.

The workflow that we need to implement is similar to uploading a file.

Incremental sync

Is it possible to get all files incrementally, i.e. only get files that aren't already downloaded? Like rclone or rsync. Would make it much nicer to user for backup

proxy issue ?

Hello,
I'm back to my keyboard after some (good) time spent away from it.
thank you for having fixed the issue on the trailing \r\n, I can go one step further.
Now here's the new issue. I'm not familiar to GO language, but more to Python, Java, C, … and I read that GO was supporting proxy if the environment variable was set. Then I tried this: "set http_proxy=proxy.priv.atos.fr:3128 && rmapi.exe" [on Windows 7], and I get this output:
Enter one-time code (go to https://my.remarkable.com): oavbeysl
ERROR: 2018/03/13 16:18:03 transport.go:174: http request failed with%!(EXTRA *url.Error=Post https://my.remarkable.com/token/device/new: proxyconnect tcp: dial tcp :0: connectex: The requested address is not valid in its context.)
ERROR: 2018/03/13 16:18:03 auth.go:82: failed to create a new device token
Checking if the var is ok seems correct, see below:

C:\Utilisateurs\FR20340\go\bin>set http_proxy
http_proxy=proxy.priv.atos.fr:3128
C:\Utilisateurs\FR20340\go\bin>
any clue ?
cheers
Christophe

Add Dockerfile?

Would there be any interest in having a Dockerfile for this project?

Go & rmapi are quite easy to install directly, but I recently made a dockerfile for a python project which leverages rmapi, and it gets a little messier: GjjvdBurg/paper2remarkable#5

It may benefit the rmapi-based ecosystem to have an "official" Dockerfile they can start from.

I'd be happy to submit a PR, and rather than the python-base approach I used above I'd aim for something more like https://github.com/jessfraz/morningpaper2remarkable: multi-stage, alpine-based, etc. Also happy to help setup pushing to Dockerhub via CI (azure?) and whatever else seems related and useful.

Make the archive package more useful

Just to mention that I am currently working on a better implementation of the archive package.

Alongside with the API v2, we need a really simple way to create a new Remarkable archive or to decode/read an freshly fetched one from the API.

The current design is quite cumbersome and not super handy.

It would be nice to have for instance explicit structs for files in the archive that are in the json format.

That would help with requests like "wanting to get the last tool used for a note", or "giving the background template used for page 3".

That would help also to simply create an archive for a new empty note with only a PDF attached (before sending it using the api.v2 package).

If I find the time to finish this implementation, I'll drop a PR linked with this issue.

Have a nice day,
Loric

Getting a one-time code

Is there a little more detail on how to retrieve a one-time code? I've logged into my rM account, that does not produce one.

Unable to retrieve user token

I am unable to retrieve the user token from the API.
In order deviceBearer, newUserDevice, resp, err:

ERROR: 2018/02/21 15:58:48 auth.go:89: 1
ERROR: 2018/02/21 15:58:48 auth.go:90: https://my.remarkable.com/token/user/new
ERROR: 2018/02/21 15:58:48 auth.go:91: {}
ERROR: 2018/02/21 15:58:48 auth.go:92: request failed with status %!i(int=403)
ERROR: 2018/02/21 15:58:48 auth.go:94: failed to create a new user token

Search / `find` utility

It would be nice to have support for the unix find utility or some other, possibly fuzzy search by document names. (This would be addressed "automatically" once the fuse support is ready).

Thanks for your work on rmapi!

Failure to build in Debian

In Debian stable (Linux cirrus 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux) I get the following errors:

nicola@cirrus:~/share$ go get -u github.com/juruen/rmapi
# github.com/juruen/rmapi/encoding/rm
../go/src/github.com/juruen/rmapi/encoding/rm/rm.go:136: undefined: strings.Builder
# github.com/juruen/rmapi/archive
../go/src/github.com/juruen/rmapi/archive/reader.go:132: undefined: strings.Builder
# github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf
../go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3335: undefined: sort.SliceStable
../go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3385: undefined: sort.SliceStable
../go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3484: undefined: sort.SliceStable
../go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3564: undefined: sort.SliceStable
../go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3598: undefined: sort.SliceStable
nicola@cirrus:~/share$

Any idea how to proceed? Thanks, Nicola

API v2 - Future design

Hello @juruen,

I was interested about trying to build a second version of the API. I feel like the two packages shell and api are quite dependant, as well as the log package. When used externally (e.g. @jessfraz has built https://github.com/jessfraz/morningpaper2remarkable), we need to init the log log.InitLog() and even if we just want to put a file on the device for instance, I feel like we need to import multiple rmapi packages.

For instance, as far as I understand, the ApiCtx has a notion of FileTree but for me the FileTree is mostly related to the shell. The API could only have the responsibility of authentication and interaction with the Remarkable Cloud with simple functions that would build a simple interface seen from the outside (more or less CRUD operations like CreateFile, GetFile, UpdateFile, DeleteFile).

The shell package would only become an "implementation" using the api the same way other external clients might do.

And speaking about authentication, the only way to authenticate with the current implementation is to have the .rmapi file with credentials inside. If I just want to upload a file into the Remarkable Cloud from my external Golang tool, I would have to create this file. I think that could be done more easily using some sort of other mecanisms.

All of this is just me trying to reflect about the different packages structure and role in this project :D). This is not super important as the current implementation works actually well. But I am thinking that maybe if we improve little things like this, the tool would become even more powerful in the Golang community.

Don't know what you think of all of this but it would be nice to have your mindset about it ;).
And maybe if that can make sense, that could be interesting to try to think about a future design or about how the tool can evolve! (not sure if many people have time to spend for all of this but I still find the challenge interesting).

Maybe I am also wrong on my assumptions and I don't fully understand the architecture and purposes of this project... Let me know!

Thanks,
Loric

Purify output: remove informative output from stdout

It would be nice to purify the output, so that the output on stdout is purely output. Right now it also contains informative data. E.g.

$ rmapi ls
INFO: 2018/10/02 14:13:46 main.go:57: [rmapi ls]
ReMarkable Cloud API Shell
[f]     Scribbles

Thus rmapi ls | wc -l yields 3 instead of the desired 1. Pure output would make rmapi more suitable for (shell) scripting.

I see two approaches. The first is to print the informative output to stderr instead of stdout. The second is to silence it and add a verbosity option.

Return code is not set

rmapi does not currently set an exit code, which makes it difficult to check whether a command succeeded when scripting.

$ go/bin/rmapi put file_does_not_exist     
ReMarkable Cloud API Shell
uploading: [file_does_not_exist]...
ERROR: 2018/03/29 10:54:56 zipdoc.go:27: failed to open source document file to read open file_does_not_exist: no such file or directory
ERROR: 2018/03/29 10:54:56 api.go:211: failed to create zip doc open file_does_not_exist: no such file or directory
Failed to upload file: %s open file_does_not_exist: no such file or directory

$ echo $?
0

$ go/bin/rmapi put some_file_that_does_exist
...

$ echo $?
0

Is it possible to exit with a non-zero code when an error is encountered, so that this can be checked for from within a calling script?

Client timeout for large files

I'm running into a timeout when I try to upload a pdf file with 30MB:

[/]>put large.pdf
uploading: [large.pdf]...ERROR: 2018/10/02 17:22:02 transport.go:174: http request failed with [...] net/http: request canceled (Client.Timeout exceeded while awaiting headers))

Is it possible to increase the timeout -> I think its currently 60 seconds right?

var httpClient = &http.Client{Timeout: 60 * time.Second}

Software update 1.8

Hello,

Creating this issue in anticipation. Apparently Remarkable is improving the software (somehow, it is a good news!).

https://blog.remarkable.com/software-update-1-8-improved-brushes-better-syncing-and-a-smoother-reading-experience-ef0cc581a77a

But seen the content of the update (new brushes, improvment in the epub reader and improved syncing), we can expect some regressions in the api (+api.v2), archive and rm packages.

I'll try to establish a state of the changes as soon as I succeed to upgrade my device.

Loric

wsl installation issue

xfang@DESKTOP-693OACN:~$ go get -u github.com/juruen/rmapi

# github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf
go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3335: undefined: sort.SliceStable
go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3385: undefined: sort.SliceStable
go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3484: undefined: sort.SliceStable
go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3564: undefined: sort.SliceStable
go/src/github.com/juruen/rmapi/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3598: undefined: sort.SliceStable

Printing to rM requires device reset to download

Hi - great tool, thanks very much.

I recently upgraded to the latest rM version 1.7.2.3 before trying your api so this may be related to the upgrade or it may not, I'm afraid I don't know.

Anyway, I followed the print to reMarkable tutorial and it works really well, except that the file doesn't actually download to the tablet unless I turn it off and on again (and equally, isn't available in the rM cloud client without restarting it). The file does appear very promptly, but generally says 'Page 1 of 0' and then we you select it, there's nothing there.

Any advice much appreciated.

Best wishes

James

Reset rmapi

Hi,
how can I reset the rmapi in order to ask a new code? I think I have 2 accounts on remarkable so I can't see the right folders and I want to reset it. Thanks

Compressing before uploading

Hi,
Thanks for the tools!
In the "Printing to reMarkable" script I have added a pdf compression step (with ghostscript). It looks like this:

for f in "$@"
do
	cp "$f" /tmp/rmk$$.pdf
	/usr/local/bin/gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
		-dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH \
		-sOutputFile=/tmp/ormk$$.pdf /tmp/rmk$$.pdf
	cp /tmp/ormk$$.pdf "$f"
	/usr/local/bin/rmapi put "$f"
done

The temp files are required because GS doesn't handle unicode file names transparently. Also an if statement should be added to check if GS is properly installed.

incorrect error message "Code has the wrong lenth, it should be 8"

after having locally rebuilt the exec file (RMAPI.EXE) from the github sources:

C:\Utilisateurs\FR20340\go\bin>rmapi.exe
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:18 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:24 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:25 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:26 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:26 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): uitaahkl
ERROR: 2018/02/26 19:27:27 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com): 12345678
ERROR: 2018/02/26 19:27:31 auth.go:59: Code has the wrong lenth, it should be 8
Enter one-time code (go to https://my.remarkable.com):

Windows installation issue (undefined: Attr)

Attempting to install with go get -u github.com/juruen/rmapi on Windows gives

# github.com/juruen/rmapi/vendor/github.com/hanwen/go-fuse/fuse
go\src\github.com\juruen\rmapi\vendor\github.com\hanwen\go-fuse\fuse\types.go:401:2: undefined: Attr

mput could ignore hidden files

Hi, thanks for this great tool. It would be nice if mput ignored hidden files, so that it's possible to sync a git-managed directory without uploading the .git directory (or having to manually move it out of the way).

Publish a new release integrating the latest fixes

Hello,

The latest version, v0.0.4, suffers from issue #57 which unfortunately prevents using rmapi for sending PDFs (the main use-case for me and, I suspect, many other users). Do you think it would be possible to publish a new version containing the latest commits?

Thank you!

Deployment on server (heroku)

Hi all - This is an amazing project, thank you!

Has anyone tried to deploy this on a non-local server like Heroku and gotten authentication to work? I have a local version working--I can execute ./rmapi, type in the one time code, and it works as expected. However, when I deploy to the server, it hangs. I assume it's stuck on the one time code, but there's no logging message associated with it, and I'm not sure the best way to input and/or store the one time code. Any ideas?

I'm not sure if this is really an issue, but I don't really know where to put this, so I thought I would raise it to the community here to see if anyone with more experience than I with golang or rMAPI has encountered this. Appreciate it!

Building impossible with current go version

On Manjaro, with go version go1.10.3 linux/amd64, the following error occurs when attempting to build the repo on master:

$ go build
# github.com/juruen/rmapi/fusefs
/home/qqwy/go/src/github.com/juruen/rmapi/fusefs/file.go:20:22: cannot use fuseFile literal (type *fuseFile) as type nodefs.File in return argument:
	*fuseFile does not implement nodefs.File (missing GetLk method)

Obviously, this error also occurs when attempting to install in one go (no pun intended) when using $ go get -u github.com/juruen/rmapi.

Putting epubs

Hi!

Seems like putting epub files does not work.

Downloading the "epub" back from rmapi, gets me a zip file that contains:
Archive: test.epub.zip
inflating: 40e23248-92b4-41ef-845c-73e2fa4fecbd.pdf
inflating: 40e23248-92b4-41ef-845c-73e2fa4fecbd.pagedata
inflating: 40e23248-92b4-41ef-845c-73e2fa4fecbd.content

And the "pdf" file inside the zip is actually the epub file:
file 40e23248-92b4-41ef-845c-73e2fa4fecbd.pdf
40e23248-92b4-41ef-845c-73e2fa4fecbd.pdf: EPUB document

Any ideas?

TiA, Andreas

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.