Update rmapi to v0.0.25

This commit is contained in:
Robert Carosi
2023-01-03 10:17:03 +01:00
parent ba952c370f
commit 014adf2c2a
6 changed files with 9 additions and 5 deletions

View File

@@ -20,7 +20,6 @@ import pl.codeset.pocket.read.Sort;
final class PocketService { final class PocketService {
private static final Logger LOG = LoggerFactory.getLogger(PocketService.class); private static final Logger LOG = LoggerFactory.getLogger(PocketService.class);
private final String tagFilter; private final String tagFilter;
private final Pocket pocket; private final Pocket pocket;

View File

@@ -106,10 +106,10 @@ public class RemarkableApi {
logStream(proc.getErrorStream(), LOG::error); logStream(proc.getErrorStream(), LOG::error);
int exitCode = proc.waitFor(); int exitCode = proc.waitFor();
if (exitCode != 0) { if (exitCode != 0) {
throw new RuntimeException("Could not authenticate to Remarkable API"); throw new RuntimeException("Could not connect to Remarkable Cloud");
} }
} catch (IOException | InterruptedException e) { } catch (IOException | InterruptedException e) {
throw new RuntimeException("Could not authenticate to Remarkable API", e); throw new RuntimeException("Could not connect to Remarkable Cloud", e);
} }
} }
@@ -138,7 +138,7 @@ public class RemarkableApi {
try { try {
return objectMapper.readValue(Strings.join(info, '\n'), Document.class); return objectMapper.readValue(Strings.join(info, '\n'), Document.class);
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
throw new RuntimeException("Error parsing Remarkable API response", e); throw new RuntimeException("Error parsing Remarkable Cloud response", e);
} }
} }

View File

@@ -6,6 +6,8 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import nl.siegmann.epublib.epub.EpubReader; import nl.siegmann.epublib.epub.EpubReader;
import nl.siegmann.epublib.epub.EpubWriter; import nl.siegmann.epublib.epub.EpubWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
@@ -30,6 +32,9 @@ import pl.codeset.pocket.Pocket;
SyncService.class, SyncService.class,
}) })
public class SyncApplication { public class SyncApplication {
private static final Logger LOG = LoggerFactory.getLogger(SyncApplication.class);
@Bean @Bean
DocumentBuilder documentBuilder() throws ParserConfigurationException { DocumentBuilder documentBuilder() throws ParserConfigurationException {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
@@ -41,7 +46,7 @@ public class SyncApplication {
try { try {
return new Pocket(authenticator.getAuth()); return new Pocket(authenticator.getAuth());
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("Could not authenticate with Pocket", e); throw new RuntimeException("Could not connect to Pocket", e);
} }
} }
} }

Binary file not shown.