update word limit

This commit is contained in:
mappu 2023-05-28 18:42:38 +12:00
parent b92e52b900
commit 638f009289

View File

@ -3,6 +3,8 @@
error_reporting(E_ALL);
define('MAX_CHARACTERS', 2950); // reduced from previous 5000
// Split at double-NL to only split at srt boundaries
$lines = explode("\n\n", file_get_contents($_SERVER['argv'][1]));
@ -50,7 +52,7 @@ do {
$line = $lines[$nextline++];
$linewords = strlen($line); // characters
if ($linewords + $buffwords > 5000) {
if ($linewords + $buffwords > MAX_CHARACTERS) {
// flush buffer before adding
flushwords($nextbuffer);
$nextbuffer = '';