Documentation ¶
Index ¶
- type Conversion
- type ConversionError
- type Module
- type PageConversion
- func (conversion *PageConversion) Convert() (page *kb.Page, errs []error, fatal error)
- func (conversion *PageConversion) ConvertImageMap(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
- func (conversion *PageConversion) ConvertTags() []string
- func (conversion *PageConversion) InlineImage(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
- func (conversion *PageConversion) LinkAsAnchor(link *ditaconvert.Link) string
- func (conversion *PageConversion) RelatedLinksAsHTML() (div string)
- func (conversion *PageConversion) ResolveLinkInfo(url string) (href, title, synopsis string, internal bool)
- func (conversion *PageConversion) ToSlug(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
- type TitleMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversion ¶
type Conversion struct { Group kb.Slug Ditamap string Pages map[kb.Slug]*kb.Page Raw map[kb.Slug][]byte Slugs []kb.Slug LoadErrors []error MappingErrors []error Errors []ConversionError }
func NewConversion ¶
func NewConversion(group kb.Slug, ditamap string) *Conversion
func (*Conversion) Run ¶
func (context *Conversion) Run()
type ConversionError ¶
type PageConversion ¶
type PageConversion struct { *Conversion Mapping *TitleMapping Slug kb.Slug Index *ditaconvert.Index Topic *ditaconvert.Topic Context *ditaconvert.Context }
func (*PageConversion) Convert ¶
func (conversion *PageConversion) Convert() (page *kb.Page, errs []error, fatal error)
func (*PageConversion) ConvertImageMap ¶
func (conversion *PageConversion) ConvertImageMap(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
func (*PageConversion) ConvertTags ¶
func (conversion *PageConversion) ConvertTags() []string
func (*PageConversion) InlineImage ¶
func (conversion *PageConversion) InlineImage(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
func (*PageConversion) LinkAsAnchor ¶
func (conversion *PageConversion) LinkAsAnchor(link *ditaconvert.Link) string
func (*PageConversion) RelatedLinksAsHTML ¶
func (conversion *PageConversion) RelatedLinksAsHTML() (div string)
func (*PageConversion) ResolveLinkInfo ¶
func (conversion *PageConversion) ResolveLinkInfo(url string) (href, title, synopsis string, internal bool)
func (*PageConversion) ToSlug ¶
func (conversion *PageConversion) ToSlug(context *ditaconvert.Context, dec *xml.Decoder, start xml.StartElement) error
type TitleMapping ¶
type TitleMapping struct { Topics map[string]*ditaconvert.Topic BySlug map[kb.Slug]*ditaconvert.Topic ByTopic map[*ditaconvert.Topic]kb.Slug }
func NewTitleMapping ¶
func NewTitleMapping() *TitleMapping
func RemapTitles ¶
func RemapTitles(conversion *Conversion, index *ditaconvert.Index) (*TitleMapping, []error)
func (*TitleMapping) EntryToIndexItem ¶
func (mapping *TitleMapping) EntryToIndexItem(entry *ditaconvert.Entry) *index.Item
func (*TitleMapping) TopicsSorted ¶
func (m *TitleMapping) TopicsSorted() (r []*ditaconvert.Topic)
Click to show internal directories.
Click to hide internal directories.