mirror of
https://github.com/jlengrand/RemarkablePocket.git
synced 2026-03-10 08:41:19 +00:00
Update rmapi to v0.0.23
This commit is contained in:
@@ -52,7 +52,7 @@ from https://docs.docker.com/get-docker/. Then run the following command to star
|
|||||||
have not tested it on Windows yet):
|
have not tested it on Windows yet):
|
||||||
|
|
||||||
```
|
```
|
||||||
touch ~/.remarkable-pocket ~/.rmapi && mkdir -p ~/.rmapi-cache && docker run -it --env TZ=Europe/Amsterdam -p 65112:65112 -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.3.0
|
touch ~/.remarkable-pocket ~/.rmapi && mkdir -p ~/.rmapi-cache && docker run -it --env TZ=Europe/Amsterdam -p 65112:65112 -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.4.0
|
||||||
```
|
```
|
||||||
|
|
||||||
The first time you run the application, you will be asked to authorize Pocket and Remarkable Cloud. Once you have done
|
The first time you run the application, you will be asked to authorize Pocket and Remarkable Cloud. Once you have done
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "nl.carosi"
|
group = "nl.carosi"
|
||||||
version = "0.3.0"
|
version = "0.4.0"
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
remarkable-pocket:
|
remarkable-pocket:
|
||||||
image: ghcr.io/nov1n/remarkable-pocket:0.3.0
|
image: ghcr.io/nov1n/remarkable-pocket:0.4.0
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/Amsterdam
|
- TZ=Europe/Amsterdam
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<array>
|
<array>
|
||||||
<string>/bin/sh</string>
|
<string>/bin/sh</string>
|
||||||
<string>-c</string>
|
<string>-c</string>
|
||||||
<string>while ! /usr/local/bin/docker version > /dev/null 2>&1; do sleep 5; done && /usr/local/bin/docker run --env TZ=Europe/Amsterdam -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.3.0 1>>$HOME/.remarkable-pocket.log 2>&1</string>
|
<string>while ! /usr/local/bin/docker version > /dev/null 2>&1; do sleep 5; done && /usr/local/bin/docker run --env TZ=Europe/Amsterdam -v ~/.remarkable-pocket:/root/.remarkable-pocket -v ~/.rmapi:/root/.rmapi -v ~/.rmapi-cache:/root/.cache/rmapi ghcr.io/nov1n/remarkable-pocket:0.4.0 1>>$HOME/.remarkable-pocket.log 2>&1</string>
|
||||||
</array>
|
</array>
|
||||||
<key>RunAtLoad</key>
|
<key>RunAtLoad</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ public class RemarkableApi {
|
|||||||
new Thread(
|
new Thread(
|
||||||
() -> {
|
() -> {
|
||||||
Scanner sc = new Scanner(src);
|
Scanner sc = new Scanner(src);
|
||||||
sc.useDelimiter(Pattern.compile("\\n|: "));
|
sc.useDelimiter(Pattern.compile("\\n|\\): "));
|
||||||
while (sc.hasNext()) {
|
while (sc.hasNext()) {
|
||||||
String token = sc.next();
|
String token = sc.next();
|
||||||
if (token.equals("Refreshing tree...")) {
|
if (token.startsWith("Enter one-time code")) {
|
||||||
consumer.accept("Refreshing cache... This may take a while.");
|
consumer.accept(token + "):");
|
||||||
} else {
|
} else {
|
||||||
consumer.accept(token);
|
consumer.accept(token);
|
||||||
}
|
}
|
||||||
@@ -101,11 +101,10 @@ public class RemarkableApi {
|
|||||||
public void login() {
|
public void login() {
|
||||||
try {
|
try {
|
||||||
Process proc =
|
Process proc =
|
||||||
new ProcessBuilder(RMAPI_EXECUTABLE, "version").redirectInput(INHERIT).start();
|
new ProcessBuilder(RMAPI_EXECUTABLE, "account").redirectInput(INHERIT).start();
|
||||||
logStream(proc.getInputStream(), LOG::info);
|
logStream(proc.getInputStream(), LOG::info);
|
||||||
logStream(proc.getErrorStream(), LOG::error);
|
logStream(proc.getErrorStream(), LOG::error);
|
||||||
int exitCode = proc.waitFor();
|
int exitCode = proc.waitFor();
|
||||||
LOG.info("");
|
|
||||||
if (exitCode != 0) {
|
if (exitCode != 0) {
|
||||||
throw new RuntimeException("Could not authenticate to Remarkable API");
|
throw new RuntimeException("Could not authenticate to Remarkable API");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import picocli.CommandLine.Option;
|
|||||||
sortOptions = false,
|
sortOptions = false,
|
||||||
usageHelpAutoWidth = true,
|
usageHelpAutoWidth = true,
|
||||||
// TODO: Read from gradle.properties
|
// TODO: Read from gradle.properties
|
||||||
version = "0.3.0",
|
version = "0.4.0",
|
||||||
mixinStandardHelpOptions = true)
|
mixinStandardHelpOptions = true)
|
||||||
class SyncCommand implements Callable<Integer> {
|
class SyncCommand implements Callable<Integer> {
|
||||||
@Option(
|
@Option(
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
19
update_rmapi_binaries.sh
Executable file
19
update_rmapi_binaries.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Usage: ./update_rmapi_binaries.sh <repo> <version>
|
||||||
|
|
||||||
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
|
||||||
|
cd "${1}" || exit
|
||||||
|
git fetch
|
||||||
|
git checkout "${2}"
|
||||||
|
|
||||||
|
move() {
|
||||||
|
mv rmapi "${SCRIPT_DIR}"/src/main/jib/usr/local/bin/rmapi_"${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
GOOS=linux GOARCH=arm64 go build && move "aarch64"
|
||||||
|
GOOS=linux GOARCH=arm GOARM=5 go build && move "arm"
|
||||||
|
GOOS=linux GOARCH=amd64 go build && move "amd64"
|
||||||
|
|
||||||
|
cd "${SCRIPT_DIR}" || exit
|
||||||
Reference in New Issue
Block a user