Documentation
¶
Index ¶
- Constants
- Variables
- func GetAlias(relation string) string
- func GetRefInfo(raw string) (result string)
- func GetRefRelation(raw, origin string) (subject, relation, object string, err error)
- func IsRelationAlias(relation string) bool
- func NewMDUUID() string
- type Edge
- type Export
- type MetaGraph
- type MetaInfo
- type Node
- type Register
- type Todo
Constants ¶
View Source
const ( UNKNOWN_TYPE int = iota // is node NODE_TYPE // is edge EDGE_TYPE // is info INFO_TYPE // is bulk BULK_TYPE // states NORMAL_STATE int = iota // BEGIN_TODO )
View Source
const ( CONTEXT_TAG = "@" PROJECT_TAG = "+" // Special Fields inside the description field DUE_PATTERN = "due:" REPEAT_PATTERN = "repeat:" ACTION_PATTERN = "lel:" )
special fields todo
Variables ¶
View Source
var (
ErrNoMetaInfo = errors.New("No Metainformation could be found ")
)
View Source
var (
ErrNoValidRelation = errors.New("No Valid Relation")
)
Functions ¶
func GetRefInfo ¶
func GetRefRelation ¶
func IsRelationAlias ¶
Types ¶
type Edge ¶
type Edge struct {
Source string `json:"source"`
Target string `json:"target"`
Id string `json:"id"`
Label string `json:"label"`
Color string `json:"color"`
References []string `json:"references"`
Origin string `json:"origin"`
Tags []string `json:"tags"`
Names []string `json:"names"`
// isEmpty defines if the
IsEmpty bool `json:"-"`
}
Representation of a connections between nodes
func NewOriginEdge ¶
type MetaGraph ¶
type MetaGraph struct {
// contains filtered or unexported fields
}
type MetaInfo ¶
type MetaInfo struct {
Names []string `json:"names"`
Entity string `json:"entity"`
// optional
Tags []string `json:"tags"`
Relations []string `json:"relations"`
Label string `json:"label"`
References []string `json:"references"`
// icon url
Icon string `json:"icon"`
// id is Origin
Id string `json:"id"`
// Todos
Todos []Todo `json:"todos"`
// Date
Modified time.Time `json:"modified"`
// contains filtered or unexported fields
}
MetaInformation contains raw information from the file
func MetaInfoFromFile ¶
MetaInfoFromFile creates a new metainfo from a file
func NewMetaInfoFromReader ¶
NewMetaInformationFromReader creates a new metaInformation, through reading line by line
func (*MetaInfo) Collect ¶
SearchAndCollect adds metainformation from the line into the object, if the metaprefix matches
type Node ¶
type Node struct {
Type string `json:"type"`
Size string `json:"size"`
Shape string `json:"shape"`
Color string `json:"color"`
Label string `json:"label"`
X int `json:"x"`
Y int `json:"y"`
Id string `json:"id"`
Index int `json:"index"`
// custom node data
References []string `json:"references"`
Entity string `json:"entity"`
Tags []string `json:"tags"`
Names []string `json:"names"`
Icon string `json:"icon,omitempty"`
// isEmpty defines if the
IsEmpty bool `json:"-"`
}
information can be retrieved through the G6 Api GraphNode define a node object which is a representation of different stuff :)
func NewOriginNode ¶
type Todo ¶
type Todo struct {
Complete bool `json:"done"`
Priority string `json:"priority"`
CompletionDate string `json:"completion_date"`
CreationDate string `json:"creation_date"`
Description string `json:"description"`
Context string `json:"context"`
Projects []string `json:"projects"`
// Special tokens
RepeatToken string `json:"repeat"`
ActionToken string `json:"action"`
DueToken string `json:"due"`
Raw string `json:"_raw"`
}
https://github.com/todotxt/todo.txt#todotxt-format-rules Todo is the structor of the todo.txt
func ConvertTodo ¶
Convert TODO from the raw string into a todo rule
Click to show internal directories.
Click to hide internal directories.