Documentation ¶
Index ¶
- func BigramSearch(keyword string, items []string) []string
- func CompareStrings(str1, str2 string) float64
- func CopyFile(src, dst string) error
- func CountImageFiles(archiveFilePath string) (int, error)
- func DownloadImage(downloadDir, fileName, fileUrl string) error
- func ExtractFirstImage(archivePath, outputFolder string) error
- func ExtractNumber(name string) (int, error)
- func LogDuration(functionName string, start time.Time, args ...interface{})
- func ProcessImage(fromPath, toPath string) error
- func RemovePatterns(path string) string
- func Sluggify(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigramSearch ¶
BigramSearch finds items that are similar to the given keyword based on bigram similarity.
func CompareStrings ¶
CompareStrings computes a similarity score between two strings using bigrams.
func CountImageFiles ¶
CountImageFiles counts the number of image files in an archive (zip, cbz, rar, or cbr).
func DownloadImage ¶
DownloadImage downloads an image from the specified URL, saves it in the original and resized formats.
func ExtractFirstImage ¶
ExtractFirstImage extracts the first image from an archive and saves it to the output folder.
func ExtractNumber ¶
ExtractNumber extracts the first number found in the given string.
func LogDuration ¶ added in v1.0.2
LogDuration logs the duration of a function execution
func ProcessImage ¶
ProcessImage processes an image by resizing and cropping it, then saving it to a new file.
func RemovePatterns ¶
RemovePatterns applies custom parsing to clean up the path string.
Types ¶
This section is empty.