home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

org.go (943B)


      1 package org
      2 
      3 // Document is a "full" org-mode document, used for a new "readwise
      4 // document" containing highlights. The "full" notion here being, what
      5 // I need to sync from readwise to org, not the full representation of
      6 // a org file.
      7 type Document struct {
      8 	Title       string
      9 	Author      string
     10 	Email       string
     11 	Date        string
     12 	FileTags    []string
     13 	Identifier  string
     14 	Category    string
     15 	URL         string
     16 	ReadwiseURL string
     17 	Summary     string
     18 	Highlights  []Highlight
     19 }
     20 
     21 // PartialDocument is a subset of org-mode used for an update of a
     22 // "readwise document", thus containing new highlights.
     23 type PartialDocument struct {
     24 	Date       string
     25 	Highlights []Highlight
     26 }
     27 
     28 // Highlight represent a readwise highlight in org-mode.
     29 type Highlight struct {
     30 	ID           string
     31 	URL          string
     32 	Location     string
     33 	LocationType string
     34 	Date         string
     35 	Note         string
     36 	Text         string
     37 	Tags         []string
     38 }