Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

[WIP] Download annotated notebooks #34

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
713b03f
Merge remote-tracking branch 'upstream/master'
peerdavid Oct 12, 2018
1660c61
Merge remote-tracking branch 'origin/master'
peerdavid Oct 31, 2018
b23b692
Changes to implement geta
peerdavid Oct 31, 2018
cc06bd9
Finished geta for svg files
peerdavid Nov 1, 2018
f967740
Finished geta for svg
peerdavid Nov 1, 2018
01cf2b4
Own dir for notebook
peerdavid Nov 1, 2018
09d6c6d
Move into own directory
peerdavid Nov 1, 2018
9e48489
Fixed exportNotebook script for rmapi usage
peerdavid Nov 1, 2018
68ebecd
Export of annotated pdf
peerdavid Nov 1, 2018
4038663
Pdf export for pdf files
peerdavid Nov 1, 2018
48f65d1
Updated documentation
peerdavid Nov 1, 2018
ff515f6
Change to line2svg
peerdavid Nov 1, 2018
2417149
Fix for 1.6 with rM2svg
peerdavid Nov 3, 2018
238f38c
Fixed for RM version 1.6
peerdavid Nov 3, 2018
5d635b3
Using invisible tmp folders
peerdavid Nov 4, 2018
6aea236
Test with new rM2svg script
peerdavid Nov 4, 2018
d78292c
Minor changes
peerdavid Nov 4, 2018
1f257b2
Fixes for notebook without background pdfs
peerdavid Nov 4, 2018
c29be12
Support templates
peerdavid Nov 4, 2018
94d1be9
Updated colors and docu
peerdavid Nov 4, 2018
b805445
Deleted unused code
peerdavid Nov 4, 2018
f3d4542
Removed logging statements
peerdavid Nov 4, 2018
a57cbaa
Added mgeta to get a folder annotated
peerdavid Nov 4, 2018
ba6d0a5
Updated readme for mgeta
peerdavid Nov 4, 2018
5662904
Minor changes
peerdavid Nov 4, 2018
3b978a1
Test with different svg to pdf conversion
peerdavid Nov 6, 2018
ac4b5c0
Test with inkscape
peerdavid Nov 6, 2018
a45c4fd
Store template in template tmp folder
peerdavid Nov 7, 2018
982d8f2
Using rsvg-convert as its faster.
peerdavid Nov 7, 2018
cb7771f
Update README.md
peerdavid Nov 7, 2018
cbc6c0c
Update README.md
peerdavid Nov 7, 2018
b09390d
Update README.md
peerdavid Nov 7, 2018
2315caa
Prepare for PR
peerdavid Dec 4, 2018
c6b6aa0
Merge remote-tracking branch 'origin/master'
peerdavid Dec 4, 2018
0dfee84
Update annotated pdf file only if modified date time changed.
peerdavid Dec 23, 2018
43bc787
Better logging
peerdavid Dec 23, 2018
f872dfd
Improved performance
peerdavid Dec 23, 2018
0c857d9
Fixed invalid logging
peerdavid Dec 23, 2018
ea56392
Ignore epub files and simply move pdfs that are not annotated.
peerdavid Dec 23, 2018
e434018
Removed dependency to pdfunite
peerdavid Dec 23, 2018
9fbfb30
1. Added verification for geta. If tools are missing geta and mgeta a…
peerdavid Dec 23, 2018
b36b097
Rotate annotations whenever the pdf file is rotated
peerdavid Dec 24, 2018
964ed36
Minor fix
peerdavid Feb 21, 2019
3ca7ec1
uising github.com/peerdavid; fixed 1.7 bug with missing page count
peerdavid Jul 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## rmapi master

* Added geta and mgeta command to read annotated notebooks

* Increased http timeout to 5 minutes to enable upload of larger files

* Add user-agent header to be a good reMarkable citezen
Expand Down
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ documents through a FUSE system. You can read further at the bottom of this file

Install and build the project:

`go get -u github.com/juruen/rmapi`
`go get -u github.com/peerdavid/rmapi`


## Binary

You can download an already built version for either Linux or OSX from [releases](https://github.com/juruen/rmapi/releases).
You can download an already built version for either Linux or OSX from [releases](https://github.com/peerdavid/rmapi/releases).

# API support

Expand Down Expand Up @@ -88,6 +89,21 @@ mput /Papers

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

## [optional] Download a file with annotations
Use `geta path_to_file` to download a file from the cloud to your local computer.
This command is only available, if all necessary tools are installed:
- convert (Note: Policy must be set to read|write for pdfs: https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453)
- rsvg-convert
- pdf270
- pdftk
- python3


Note: If there exists a template folder under `%HOME/Templates/Remarkable`,
then those are used for notebook backgrounds. Otherwise the background is
simply white.


## Recursively download directories and files

Use `mget path_to_dir` to recursively download all the files in that directory.
Expand All @@ -98,6 +114,18 @@ E.g: download all the files
mget .
```

## [optional] Recursively download directories and files with annotations

Use `mgeta path_to_dir` to recursively download all the annotated files in that directory.
Note: This command is only available if the geta command is also available.

E.g: download all the files

```
mgeta .
```


## Create a directoy

Use `mkdir path_to_new_dir` to create a new directory
Expand Down Expand Up @@ -148,3 +176,8 @@ If you want to give it a go, you can run:
```bash
rmapi --fuse-mount mount_point
```


# Thanks to
[1] rmapi, https://github.com/peerdavid/rmapi <br />
[1] rM2svg, https://github.com/reHackable/maxio <br />
10 changes: 5 additions & 5 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"io/ioutil"
"os"

"github.com/juruen/rmapi/filetree"
"github.com/juruen/rmapi/log"
"github.com/juruen/rmapi/model"
"github.com/juruen/rmapi/transport"
"github.com/juruen/rmapi/util"
"github.com/peerdavid/rmapi/filetree"
"github.com/peerdavid/rmapi/log"
"github.com/peerdavid/rmapi/model"
"github.com/peerdavid/rmapi/transport"
"github.com/peerdavid/rmapi/util"
)

type ApiCtx struct {
Expand Down
8 changes: 4 additions & 4 deletions api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"
"strings"

"github.com/juruen/rmapi/config"
"github.com/juruen/rmapi/log"
"github.com/juruen/rmapi/model"
"github.com/juruen/rmapi/transport"
"github.com/peerdavid/rmapi/config"
"github.com/peerdavid/rmapi/log"
"github.com/peerdavid/rmapi/model"
"github.com/peerdavid/rmapi/transport"
uuid "github.com/satori/go.uuid"
)

Expand Down
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"os/user"

"github.com/juruen/rmapi/log"
"github.com/juruen/rmapi/model"
"github.com/peerdavid/rmapi/log"
"github.com/peerdavid/rmapi/model"
"gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/juruen/rmapi/model"
"github.com/peerdavid/rmapi/model"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial-print-macosx.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to directly print to your ReMarkable on Mac

This tuorial wil show you how to leverage [rmapi](https://github.com/juruen/rmapi) and `Automator` to print
This tuorial wil show you how to leverage [rmapi](https://github.com/peerdavid/rmapi) and `Automator` to print
to your ReMarkable tablet from your Mac using the Cloud API.

This way you won't need to take the extra step of using the desktop app.
Expand All @@ -19,7 +19,7 @@ Use `terminal` or `iterm` to get a terminal to run commands from it.
Download `rmapi` with the following command:

```bash
curl -L https://github.com/juruen/rmapi/releases/download/v0.0.4/rmapi-macosx-v0.0.4.zip -o rmapi.zip
curl -L https://github.com/peerdavid/rmapi/releases/download/v0.0.4/rmapi-macosx-v0.0.4.zip -o rmapi.zip
```

Alternatively, you can build it from sources.
Expand Down
4 changes: 2 additions & 2 deletions filetree/filetree.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package filetree
import (
"errors"

"github.com/juruen/rmapi/model"
"github.com/juruen/rmapi/util"
"github.com/peerdavid/rmapi/model"
"github.com/peerdavid/rmapi/util"
)

type FileTreeCtx struct {
Expand Down
2 changes: 1 addition & 1 deletion filetree/filetree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package filetree
import (
"testing"

"github.com/juruen/rmapi/model"
"github.com/peerdavid/rmapi/model"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion filetree/treeutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package filetree
import (
"strings"

"github.com/juruen/rmapi/model"
"github.com/peerdavid/rmapi/model"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion fusefs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/juruen/rmapi/log"
"github.com/peerdavid/rmapi/log"
)

type fuseFile struct {
Expand Down
8 changes: 4 additions & 4 deletions fusefs/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"os"
"time"

"github.com/juruen/rmapi/config"
"github.com/juruen/rmapi/log"
"github.com/juruen/rmapi/model"
"github.com/peerdavid/rmapi/config"
"github.com/peerdavid/rmapi/log"
"github.com/peerdavid/rmapi/model"

"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/juruen/rmapi/api"
"github.com/peerdavid/rmapi/api"
)

type fuseFs struct {
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (

"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/juruen/rmapi/api"
"github.com/juruen/rmapi/fusefs"
"github.com/juruen/rmapi/log"
"github.com/juruen/rmapi/shell"
"github.com/peerdavid/rmapi/api"
"github.com/peerdavid/rmapi/fusefs"
"github.com/peerdavid/rmapi/log"
"github.com/peerdavid/rmapi/shell"
)

const AUTH_RETRIES = 3
Expand Down
2 changes: 1 addition & 1 deletion shell/fs_completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path"
"strings"

"github.com/juruen/rmapi/log"
"github.com/peerdavid/rmapi/log"
)

func prefixToDir(s []string) string {
Expand Down
Loading