rm

package module
v0.0.0-...-57b9804 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

README

rm - reMarkable cloud tools

rmd - Sync Pocket to reMarkable cloud

rmd is a Pocket to reMarkable cloud sync daemon. It carries out its job by:

  1. retrieving articles saved on Pocket that are marked with a specific tag or starred as favorites;
  2. converting them to EPUB (via pandoc);
  3. uploading them to reMarkable cloud into a specific location so you will be able to read them on your reMarkable tablet.
Installation
$ go get github.com/nazavode/rm/cmd/rmd

Please note that to be able to convert (sanitized and polished) HTML content to EPUB, pandoc must be installed and available in $PATH.

Getting started

In order to be able to authenticate on both ends of the data flow, you should obtain proper tokens from both the cloud services involved:

  1. Pocket device and user tokens, set either via command line (--pocket-token and --pocket-user) or via environment variables ($RMD_POCKET_TOKEN and $RMD_POCKET_KEY)
  2. reMarkable cloud device token, set either via command line (--rm-device) or via environment variable ($RMD_RM_DEVICE_TOKEN)

With proper authentication tokens in place, the sync daemon can be started with:

$ rmd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyExists = errors.New("already exists")
View Source
var ErrApi = errors.New("cloud API call error")
View Source
var ErrNotFound = errors.New("not found")

Functions

func DocumentToEPUB

func DocumentToEPUB(d Document, filename string, timeout time.Duration) error

func NewUserToken

func NewUserToken(deviceToken string) (string, error)

Types

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(deviceToken, userToken string) (*Connection, error)

func (*Connection) MkDir

func (s *Connection) MkDir(target string) error

func (*Connection) Put

func (s *Connection) Put(srcName, destDir string) error

type Document

type Document interface {
	Slug() string
	Title() string
	Content() string
	Format() string
}

func Retrieve

func Retrieve(target *url.URL, timeout time.Duration) (Document, error)

Directories

Path Synopsis
cmd
rmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL