Documentation ¶
Overview ¶
Package tf has the functions to extract and convert text files into images.
Index ¶
- Variables
- type TextFile
- func (t *TextFile) Archive() bool
- func (t *TextFile) Exist(dir *directories.Dir) (bool, error)
- func (t *TextFile) Extract(w io.Writer, dir *directories.Dir) error
- func (t *TextFile) ExtractedImgs(w io.Writer, cfg conf.Config, dir string) error
- func (t *TextFile) String() string
- func (t *TextFile) TextPNG(w io.Writer, cfg conf.Config, dir string) error
- func (t *TextFile) WebP(w io.Writer, c int, imgDir string) (int, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TextFile ¶
type TextFile struct { ID uint // ID is a database auto increment ID. UUID string // Universal unique ID. Name string // Name of the file. Ext string // Ext is the file extension of the name. Platform string // Platform classification for the file. Size int64 // Size of the file in bytes. NoReadme sql.NullBool // NoReadme will disable the display of a readme file on the webpage. Readme sql.NullString // Readme is the filename of a readme or NFO textfile to display on the webpage. }
TextFile is a text file object.
func (*TextFile) Exist ¶
func (t *TextFile) Exist(dir *directories.Dir) (bool, error)
Exist checks that [UUID].png exists in both thumbnail subdirectories.
func (*TextFile) ExtractedImgs ¶
ExtractedImgs generates PNG and Webp image assets from a textfile extracted from an archive.
Click to show internal directories.
Click to hide internal directories.