Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RMFileInfo ¶
type RMFileInfo struct { *RmFS // embedded rm filesystem Version int // version from metadata VisibleName string // visibleName from metadata (used in reMarkable interface) LastModified time.Time OriginalPageCount int PageCount int Pages []RMPage Orientation string RedirectionPageMap []int // page insertion info Debugging bool // contains filtered or unexported fields }
RMFileInfo is a struct defining the collected metadata about a PDF from the reMarkable file collection
func RMFiler ¶
func RMFiler(inputpath string, template string) (RMFileInfo, error)
RMFiler collects information from the reMarkable files associated with the uuid of interest.
Either a pdf at <path/uuid.pdf> is expected, or a single A4 page template. If a template is not explictly provided an embedded A4 template is used. This is managed by fs.go
The uuid (identified by its filepath plus <uuid>), is used to collect information from the .metadata and .content files. It then collects layer information for each associated .rm file in a directory named by the uuid of the pdf.
func (*RMFileInfo) Debug ¶
func (r *RMFileInfo) Debug(d string)
Debug prints a message if the debugging switch is on
func (*RMFileInfo) InsertedPages ¶ added in v0.0.3
func (r *RMFileInfo) InsertedPages() string
InsertedPages is a public export of the embedded insertedPages human readable page numbers func
func (*RMFileInfo) PageIterate ¶ added in v0.0.3
func (r *RMFileInfo) PageIterate() (pageNo, pdfPageNo int, inserted, isTemplate bool, reader *io.ReadSeeker)
PageIterate iterates over pages using the rmfile iterator which provides a page number and the pdf to use (either the annotated pdf or the template). For annotated pdfs with inserted pages one might receive the following output from the iterator:
pageno | pdfPage | inserted | template | -------+---------+----------+---------------+ 0 | 0 | no | annotated.pdf | 1 | 0 | yes | template.pdf | 2 | 1 | no | annotated.pdf |
This function returns 0-indexed pdf pages ¶
Returning an io.ReadSeeker from an fs.File is described by Ian Lance Taylor at https://github.com/golang/go/issues/44175#issuecomment-775545730
type RMPage ¶
type RMPage struct { PageNo int Identifier string // the uuid used to identify the RM file Exists bool // file exists on disk LayerNames []string // layer names by implicit index // contains filtered or unexported fields }
RMPage is a struct defining metadata about each .rm file associated with the PDF described in an RMFileInfo. Note that while the .content file records page UUIDs for each page of the original PDF, .rm and the related file are only made for those pages which have marks
func (*RMPage) RMFilePath ¶ added in v0.1.4
RMFilePath returns the .rm file path
type RmFS ¶ added in v0.1.4
type RmFS struct {
// contains filtered or unexported fields
}
RmFS represents a remarkable file system of files
func NewDirRmFS ¶ added in v0.1.4
NewDirRmFS mounts an RmFS from a Directory from which the needed files are selected using a filter
func NewZipRmFS ¶ added in v0.1.4
NewZipRmFS mounts an RmFS from a zip file
func (*RmFS) IdentifyPDF ¶ added in v0.1.4
IdentifyPDF shows the pdf path in use