Documentation ¶
Index ¶
- Variables
- type ConvertOptions
- type MissingTitleMode
- type SelectOption
- type Service
- func (s *Service) ConvertToPost(entry models.Entry) (post models.Post, err error)
- func (s *Service) PrintSelectedEntries(w io.Writer, pack models.JournalPack, options SelectOption) error
- func (s *Service) WriteToHugo(site models.Site, journalPack models.JournalPack, selectOptions SelectOption) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConvertOptions = ConvertOptions{ UseFirstHeadingAsTitle: true, MissingTitlesMode: MissingTitleModeDate, ConvertStarsToFigureCaptions: true, }
Functions ¶
This section is empty.
Types ¶
type ConvertOptions ¶
type ConvertOptions struct { // UseFirstHeadingAsTitle controls whether to use the first heading of the journal entry as the title. UseFirstHeadingAsTitle bool // MissingTitleMode controls what to use for missing titles. MissingTitlesMode MissingTitleMode // ConvertStarsToFigureCaptions searches for any lines with stars that appear directly after an image as the // image caption. ConvertStarsToFigureCaptions bool }
ConvertOptions are the available conversion options. TODO: these should be processors
type MissingTitleMode ¶
type MissingTitleMode int
const ( MissingTitleModeBlank MissingTitleMode = iota MissingTitleModeDate MissingTitleModeFirstLine )
type SelectOption ¶
func (SelectOption) EntryMatch ¶
func (o SelectOption) EntryMatch(entry models.Entry) bool
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ConvertToPost ¶
func (*Service) PrintSelectedEntries ¶
func (s *Service) PrintSelectedEntries(w io.Writer, pack models.JournalPack, options SelectOption) error
func (*Service) WriteToHugo ¶
func (s *Service) WriteToHugo(site models.Site, journalPack models.JournalPack, selectOptions SelectOption) error
Click to show internal directories.
Click to hide internal directories.