Margrete RPC

RawNote

A note as a raw protobuf tree: a :class:NoteInfo plus child notes.

This is the low-level model used when an edit is opened with raw_notes=True and the target of :meth:Note.to_raw. Long notes are represented as a begin node with joint children. The convenience properties (type, t, x, w, ...) read and write the underlying :attr:info. Prefer the typed notes for authoring; use :class:R to build raw trees by hand.

Attributes

attributeinfoNoteInfo
= field(default_factory=NoteInfo)

The note's fields (:class:NoteInfo).

attributechildrenlist[RawNote]
= field(default_factory=list)

Child raw notes (e.g. a long note's joints, or an attached air).

attribute_idint | None
= field(default=None)
attributetypeNoteType

The note type (:class:NoteType); view of info.type.

attributelong_attrLongAttr
attributedirDirection
attributeex_attrExAttr
attributevariation_idColor
attributexint
attributeoption_valueint
attributetint
attributepPosition
attributewint
attributehint
attributetilint
attribute__repr__
= __str__

Functions

func__str__(self) -> str
paramself

Returns

str
funcchild(self, *children) -> RawNote

Set this note's children to children and return self (for chaining).

paramself
paramchildrenRawNote
= ()

Returns

margrete_rpc.chart.notes.raw.RawNote
funcfrom_proto(cls, proto) -> RawNote

Build a :class:RawNote (and its subtree) from a protobuf Note.

paramcls
paramprotomessages_pb2.Note

Returns

margrete_rpc.chart.notes.raw.RawNote
functo_proto(self) -> messages_pb2.Note

Serialize this note (and its subtree) to a protobuf Note.

paramself

Returns

margrete_rpc._proto.margrete.rpc.v1.messages_pb2.margrete_rpc._proto.margrete.rpc.v1.messages_pb2.Note
func__init__(self, info=NoteInfo(), children=list(), _id=None) -> None
paramself
paraminfoNoteInfo
= NoteInfo()
paramchildrenlist[RawNote]
= list()
param_idint | None
= None

Returns

None

On this page