diff --git a/internal/sync/progress.go b/internal/sync/progress.go index e67834c..63730e9 100644 --- a/internal/sync/progress.go +++ b/internal/sync/progress.go @@ -253,3 +253,12 @@ func ParseProgressFromJSON(data []byte) (*ProgressData, error) { func MarshalProgressToJSON(progress *ProgressData) ([]byte, error) { return json.Marshal(progress) } + +const CharsPerPage int64 = 1800 + +func EstimatedPages(totalCharacters int64) int { + if totalCharacters <= 0 { + return 0 + } + return int(totalCharacters / CharsPerPage) +}