Documentation ¶
Overview ¶
Package archive is used to parse a .zip file retrieved by the API.
Here is the content of an archive retried on the tablet as example: 384327f5-133e-49c8-82ff-30aa19f3cfa4.content 384327f5-133e-49c8-82ff-30aa19f3cfa4//0-metadata.json 384327f5-133e-49c8-82ff-30aa19f3cfa4//0.rm 384327f5-133e-49c8-82ff-30aa19f3cfa4.pagedata 384327f5-133e-49c8-82ff-30aa19f3cfa4.thumbnails/0.jpg
As the .zip file from remarkable is simply a normal .zip file containing specific file formats, this package is only a wrapper around the standard zip package that will follow the same code architecture and that will help gathering one of those specific files more easily.
Index ¶
- type Page
- type Reader
- type Writer
- func (w *Writer) Close() error
- func (w *Writer) CreateContent() (io.Writer, error)
- func (w *Writer) CreateEpub() (io.Writer, error)
- func (w *Writer) CreatePage(idx int) (io.Writer, error)
- func (w *Writer) CreatePageMetadata(idx int) (io.Writer, error)
- func (w *Writer) CreatePagedata() (io.Writer, error)
- func (w *Writer) CreatePdf() (io.Writer, error)
- func (w *Writer) CreateThumbnail(idx int) (io.Writer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct { Content *zip.File Pagedata *zip.File Pages []Page Pdf *zip.File Epub *zip.File UUID string }
Reader will parse specific files of the remarkable zip file.
func OpenReader ¶
OpenReader opens a reader from a zip file name. The UUID is taken from the Content or Pagadata file name.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is for writing a remarkable .zip The uuid should be unique across notes.
func NewWriter ¶
NewWriter creates a Writer from an io.Writer. The uuid will be used for file names as done by the remarkable device.
func (*Writer) CreateContent ¶
CreateContent is for writing a content file.
func (*Writer) CreateEpub ¶
CreateEpub is for writing an epub file.
func (*Writer) CreatePage ¶
CreatePage is for writing a page data. The argument idx serves for file names.
func (*Writer) CreatePageMetadata ¶
CreatePageMetadata is for writing a page metadata. The argument idx serves for file names.
func (*Writer) CreatePagedata ¶
CreatePagedata is for writing a pagedata file.