[add] docker instructions, [add] metadata gathering, [add] screenshots

This commit is contained in:
2023-09-26 18:09:02 -04:00
parent c22154ed77
commit df7f806834
28 changed files with 837 additions and 537 deletions

View File

@@ -129,7 +129,7 @@ func GetMetadata(metadataSearch MetadataInfo) ([]MetadataInfo, error) {
return allMetadata, nil
}
func SaveCover(gbid string, coverDir string, documentID string) (*string, error) {
func SaveCover(gbid string, coverDir string, documentID string, overwrite bool) (*string, error) {
// Google Books -> JPG
coverFile := "." + filepath.Clean(fmt.Sprintf("/%s.jpg", documentID))
@@ -137,7 +137,7 @@ func SaveCover(gbid string, coverDir string, documentID string) (*string, error)
// Validate File Doesn't Exists
_, err := os.Stat(coverFilePath)
if err == nil {
if err == nil && overwrite == false {
log.Warn("[SaveCover] File Alreads Exists")
return &coverFile, nil
}