Documentation
¶
Index ¶
- Constants
- Variables
- type BlockQuote
- type Body
- type Bullet
- type Fragment
- type Image
- func (i *Image) Bytes() []byte
- func (i *Image) Checksum() uint32
- func (i *Image) Image() (image.Image, error)
- func (i *Image) MarshalJSON() (_ []byte, err error)
- func (i *Image) PHash() (_ *goimagehash.ImageHash, err error)
- func (i *Image) SetLink(link string)
- func (i *Image) String() string
- func (i *Image) UnmarshalJSON(data []byte) (err error)
- type MIMEType
- type Paragraph
- type Slide
- type Slides
- type Table
- type TableCell
- type TableRow
Constants ¶
const ( Name = "slidown" Version = "0.0.4" )
const ( // StyleDel is the style name applied to GFM strikethrough (`~~`) and the // HTML <del> element. StyleDel = "del" )
StyleName constants for inline-syntax styles shared with the markdown parser.
Variables ¶
var Revision = "HEAD"
Functions ¶
This section is empty.
Types ¶
type BlockQuote ¶
type BlockQuote struct {
Paragraphs []*Paragraph `json:"paragraphs,omitempty"`
Nesting int `json:"nesting,omitempty"`
}
func (*BlockQuote) String ¶
func (b *BlockQuote) String() string
type Body ¶
type Body struct {
Paragraphs []*Paragraph `json:"paragraphs,omitempty"`
}
Body represents the content body of a slide.
type Fragment ¶
type Fragment struct {
Value string `json:"value"`
Bold bool `json:"bold,omitempty"`
Italic bool `json:"italic,omitempty"`
Link string `json:"link,omitempty"`
Code bool `json:"code,omitempty"`
StyleName string `json:"style_name,omitempty"`
}
Fragment represents a text fragment within a paragraph.
func (*Fragment) StylesEqual ¶
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func NewImageFromMarkdown ¶
func (*Image) MarshalJSON ¶
MarshalJSON and UnmarshalJSON are defined for cloning data and for similarity comparisons of `slide` structures.
func (*Image) UnmarshalJSON ¶
type Paragraph ¶
type Paragraph struct {
Fragments []*Fragment `json:"fragments,omitempty"`
Bullet Bullet `json:"bullet,omitempty"`
Nesting int `json:"nesting,omitempty"`
}
Paragraph represents a paragraph within a slide body.
type Slide ¶
type Slide struct {
Layout string `json:"layout"`
Freeze bool `json:"freeze,omitempty"`
Skip bool `json:"skip,omitempty"`
// Key is an opaque, stable per-page identifier (from the markdown page
// config) used to match a slide to its existing counterpart across inserts,
// deletions and reordering during an incremental rebuild. It is identity,
// not content, so it is excluded from the content fingerprint.
Key string `json:"-"`
Titles []string `json:"titles,omitempty"`
TitleBodies []*Body `json:"title_bodies,omitempty"`
Subtitles []string `json:"subtitles,omitempty"`
SubtitleBodies []*Body `json:"subtitle_bodies,omitempty"`
Bodies []*Body `json:"bodies,omitempty"`
Images []*Image `json:"images,omitempty"`
BlockQuotes []*BlockQuote `json:"block_quotes,omitempty"`
Tables []*Table `json:"tables,omitempty"`
SpeakerNote string `json:"speaker_note,omitempty"`
}
func (*Slide) Fingerprint ¶
Fingerprint returns the serialized slide signature embedded into the generated .pptx so an incremental rebuild can detect whether the source for a slide changed, without reverse-parsing the output.
Non-image content is captured by an exact hash, while images are recorded by their perceptual hash (falling back to a content checksum when a perceptual hash cannot be computed). Image comparison is order-independent and tolerant of recompression, so reordering or recompressing images on a slide does not force a regenerate.
func (*Slide) MatchesFingerprint ¶
MatchesFingerprint reports whether this slide's source is equivalent to the one captured by a previously embedded fingerprint: non-image content must match exactly and the images must match as an order-independent, perceptually compared set.
Directories
¶
| Path | Synopsis |
|---|---|
|
slidown
command
|
|
|
Package md provides functionality for parsing markdown into slides.
|
Package md provides functionality for parsing markdown into slides. |
|
Package pptx provides a pure-Go writer for PowerPoint (.pptx / OOXML) presentations.
|
Package pptx provides a pure-Go writer for PowerPoint (.pptx / OOXML) presentations. |
|
Package render maps slidown's internal slide model (the slidown package types produced by the md parser) onto the pptx package's serializable model.
|
Package render maps slidown's internal slide model (the slidown package types produced by the md parser) onto the pptx package's serializable model. |