From d883b9b54c78ed31ac428c40a81c5ed8890538fb Mon Sep 17 00:00:00 2001 From: yoanhg421 Date: Tue, 11 Apr 2023 06:25:28 -0700 Subject: [PATCH] Update filename to show total parts when using size limit. --- README.md | 4 ++-- internal/epub/core.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7de0556..713c584 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,8 @@ go-comic-converter -profile KS -input ~/Download/MyComic.[CBZ,ZIP,CBR,RAR,PDF] - ``` If you have more than 1 file the output will be: - - ~/Download/MyComic PART_01.epub - - ~/Download/MyComic PART_02.epub + - ~/Download/MyComic Part 01 of 03.epub + - ~/Download/MyComic Part 02 of 03.epub - ... The ePub include as a first page: diff --git a/internal/epub/core.go b/internal/epub/core.go index a0eb703..b6d7b1c 100644 --- a/internal/epub/core.go +++ b/internal/epub/core.go @@ -247,7 +247,7 @@ func (e *ePub) Write() error { ext := filepath.Ext(e.Output) suffix := "" if totalParts > 1 { - suffix = fmt.Sprintf(" PART_%02d", i+1) + suffix = fmt.Sprintf(" Part %02d of %02d", i+1, totalParts) } path := fmt.Sprintf("%s%s%s", e.Output[0:len(e.Output)-len(ext)], suffix, ext)