Documentation ¶
Index ¶
- Constants
- func CurrentDir() (string, error)
- func DirectoryOrFileDoesNotExist(filePath string) bool
- func GetPathToFile(dir, name, issueNumber, format string, issueNumberOnly bool) string
- func ImageType(mimeStr string) (tp string)
- func ImagesPathSetup(createDefaultPath bool, outputFolder, source, name, issueNumber string) (string, error)
- func IsURLValid(url string) bool
- func IsValueInSlice(valueToCheck string, values []string) bool
- func Parse(s string) string
- func PathSetup(createDefaultPath bool, outputFolder, source, name string) (string, error)
- func SaveImage(w io.Writer, content io.Reader, format string) error
- func TrimAndSplitURL(u string) []string
- func URLSource(u string) (string, error)
Constants ¶
const IMAGEREGEX = `<img[^>]+src="([^">]+)"`
IMAGEREGEX to extract the image html tag
Variables ¶
This section is empty.
Functions ¶
func CurrentDir ¶ added in v0.10.1
CurrentDir returns the path where the executable is
func DirectoryOrFileDoesNotExist ¶ added in v0.17.0
DirectoryOrFileDoesNotExist check if a directory/file exist.
func GetPathToFile ¶ added in v0.30.0
GetPathToFile returns the path where the file should be saved.
func ImagesPathSetup ¶ added in v0.17.0
func ImagesPathSetup(createDefaultPath bool, outputFolder, source, name, issueNumber string) (string, error)
ImagesPathSetup creates the folders for the images to be saved. when `createDefaultPath` is false the images are stored without prepending the default folder path `comics/source/name/[comic.format]`.
func IsURLValid ¶ added in v0.6.1
IsURLValid exclude those url containing `.gif` and `logo`.
func IsValueInSlice ¶
IsValueInSlice checks if a value is already in a slice.
func PathSetup ¶ added in v0.6.1
PathSetup creates the folders where the comic will be saved. when `createDefaultPath` is false the comic is stored without prepending the default folder path `comics/source/name/[comic.format]`.
func TrimAndSplitURL ¶ added in v0.10.1
TrimAndSplitURL trim tailing "/" and split url
Types ¶
This section is empty.