Documentation ¶
Index ¶
- Constants
- func CanHtmlPlay(filename string) bool
- func ChangeExtension(filename, ext string) string
- func ConvertVideoFile(inFilename, outFilename string) error
- func GenerateVideoThumbnail(inFilename, size, outFilename string) error
- func GetImageFiles(files []os.DirEntry) []os.DirEntry
- func IsFfmpegAvailable() bool
- func IsImageFile(filename string) bool
- func IsVideoFile(filename string) bool
- func IsViewableFile(filename string) bool
- func Merge(a, b *Config)
- func VideoNeedsConversion(filename string) bool
- type Album
- type AlbumConfig
- type AlbumTitle
- type AlbumsConfig
- type AppConfig
- type CaptionFile
- type Config
- type TemplateSource
- func (t TemplateSource) AsPngFilename(filename string) string
- func (t TemplateSource) GetImageFiles() []os.DirEntry
- func (t TemplateSource) HandleDirs(f os.DirEntry, subdir string, depth int) string
- func (t TemplateSource) IsImageFile(filename string) bool
- func (t TemplateSource) MakePicTitle(s string) string
- func (t TemplateSource) NeedNewRow(index int) bool
- func (t TemplateSource) String() string
Constants ¶
View Source
const ( DEFAULT_ASPECT = 0.2 APP_CONFIG_FILENAME = "appconfig.yaml" ALBUMS_CONFIG_FILENAME = "albumsconfig.yaml" CONFIG_FILENAME = "config.yaml" )
Variables ¶
This section is empty.
Functions ¶
func CanHtmlPlay ¶
func ChangeExtension ¶
func ConvertVideoFile ¶
func GenerateVideoThumbnail ¶
func IsFfmpegAvailable ¶
func IsFfmpegAvailable() bool
func IsImageFile ¶
func IsVideoFile ¶
func IsViewableFile ¶
func VideoNeedsConversion ¶
Types ¶
type AlbumConfig ¶
type AlbumConfig struct { AlbumTitle string `yaml:"albumTitle"` AlbumDir string `yaml:"albumDir"` ThumbDir string `yaml:"thumbDir"` Config Config `yaml:"config"` }
func (AlbumConfig) String ¶
func (a AlbumConfig) String() string
type AlbumTitle ¶
func (AlbumTitle) String ¶
func (a AlbumTitle) String() string
type AlbumsConfig ¶
type AlbumsConfig struct { BodyArgs string `yaml:"bodyArgs"` Default Config `yaml:"default"` Albums map[string]AlbumConfig `yaml:"albums"` }
func LoadAlbumsConfigFile ¶
func LoadAlbumsConfigFile(appConfig *AppConfig) (*AlbumsConfig, error)
func (AlbumsConfig) SortedAlbumTitles ¶
func (a AlbumsConfig) SortedAlbumTitles() []AlbumTitle
func (AlbumsConfig) String ¶
func (a AlbumsConfig) String() string
type AppConfig ¶
func LoadAppConfigFile ¶
type CaptionFile ¶
func NewCaptionFile ¶
func NewCaptionFile(f io.Reader) *CaptionFile
type Config ¶
type Config struct { BodyArgs string `yaml:"bodyArgs"` VideoThumbnailSize string `yaml:"videoThumbnailSize"` ThumbnailUse string `yaml:"thumbnailUse"` ThumbnailWidth int `yaml:"thumbnailWidth"` ThumbnailAspect string `yaml:"thumbnailAspect"` DefaultBrowserWidth int `yaml:"defaultBrowserWidth"` SlideShowDelay int `yaml:"slideShowDelay"` NumberOfColumns int `yaml:"numberOfColumns"` OutsideTableBorder int `yaml:"outsideTableBorder"` InsideTableBorder int `yaml:"insideTableBorder"` EditMode bool `yaml:"editMode"` AllowFinalResize bool `yaml:"allowFinalResize"` ReverseDirs bool `yaml:"reverseDirs"` ReversePics bool `yaml:"reversePics"` }
func (Config) GetDefaultBrowserWidth ¶
func (Config) GetThumbnailAspect ¶
func (Config) GetThumbnailUse ¶
func (Config) GetThumbnailWidth ¶
func (Config) GetVideoThumbnailSize ¶
type TemplateSource ¶
type TemplateSource struct { AppConfig *AppConfig AlbumsConfig *AlbumsConfig AlbumConfig AlbumConfig Current Config Root string BasePath string PathInfo string DirInfo string NumberOfColumns int Files []os.DirEntry Dirs []os.DirEntry ImageCount int FullTitle string PageTitle string ActualPath string Mp4Path string BaseFilename string FileIndex int PrevSeven string NextSeven string CaptionHtml string CaptionMap map[string]string }
func (TemplateSource) AsPngFilename ¶
func (t TemplateSource) AsPngFilename(filename string) string
func (TemplateSource) GetImageFiles ¶
func (t TemplateSource) GetImageFiles() []os.DirEntry
func (TemplateSource) HandleDirs ¶
func (TemplateSource) IsImageFile ¶
func (t TemplateSource) IsImageFile(filename string) bool
func (TemplateSource) MakePicTitle ¶
func (t TemplateSource) MakePicTitle(s string) string
func (TemplateSource) NeedNewRow ¶
func (t TemplateSource) NeedNewRow(index int) bool
func (TemplateSource) String ¶
func (t TemplateSource) String() string
Click to show internal directories.
Click to hide internal directories.