From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RLhJAB023154 for ; Fri, 27 Mar 2020 17:43:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 022C912456D; Fri, 27 Mar 2020 21:43:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF28E124542 for ; Fri, 27 Mar 2020 21:43:16 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 538C3800297 for ; Fri, 27 Mar 2020 21:43:16 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=dkim.mimecast.com; s=201903; t=1585345396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/jdOsrT0Ij52gKl40Xc+xljyM3fXn7E+Emd0yEuWzuY=; b=eXmzIc+ndeT5246EmhHcK1rmMwewB2qEq+yFzbEs0jzS+3LjqbIq6GPGy45SAe1wk13bxG t90DEy0Wz6INSlyQ+Zk9i2UH0ncn96Kctd3OmJCz7fJAxP2dI7u+EB9tmTjsP6trZfzc8m AmRw3RPoUDTldmErfmuCBouFzw7s/VXvVnoHOtSB6cYQhNSdiTaieWE/XHBmPGl12sH2I8 xrl81Q7qR/TAjK+YkzTdNQYuKxXwH/HihAngUi+ENVRK/gJDZm15NKyQNhs9zhtFm/f5pG BiOPN6AQol13x/ZH1IsnE0M+WY3pkAXbhEbnpyfzemcnkQS57kTeNKQLoIYrlg== ARC-Seal: i=1; s=201903; d=dkim.mimecast.com; t=1585345396; a=rsa-sha256; cv=none; b=C6L2385XYtEew6OcfsbA+sFd3e8vs6g/1PKXSNdi1VV0Ryq+y5rzhbLzO/XBlth6xexLzs buqAPkX4i0PRy7F8kMlVWZ5rTUDVm5qC0y91ESIVI9LLw0JPi1zcFc+EdSlmPemTdtw1Qp dAa465zo/+Ap4eDIXOKbL3s5nHPl9U494gLh2liU2k6QpaeN0yhOuk2ZP1WPv/BeDD0Oos nE2XT54j1vSTHJdXoZa2u59M4o0TrOOn0J4yyt8SqIhvseSwcN59YNtMCrsTUfD+srt4G1 nBz1XV6kTViP0cES4hlWig30GthAVNzOhKe94z+LS2I41zIwZqo9N9Wf//+Uiw== ARC-Authentication-Results: i=1; relay.mimecast.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=f58J5QcJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (relay.mimecast.com: domain of marbux@gmail.com designates 209.85.222.195 as permitted sender) smtp.mailfrom=marbux@gmail.com Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-304-n2-6qPdxOi2D0GAIDUnweQ-1; Fri, 27 Mar 2020 17:43:14 -0400 X-MC-Unique: n2-6qPdxOi2D0GAIDUnweQ-1 Received: by mail-qk1-f195.google.com with SMTP id x3so12498761qki.4 for ; Fri, 27 Mar 2020 14:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=/jdOsrT0Ij52gKl40Xc+xljyM3fXn7E+Emd0yEuWzuY=; b=f58J5QcJkTZaRCNJ4KNIw1+WytkeyICTJXYq+n4coNdahHCy1apG41bks17qZvpu0y DW7gFGBrj6XWxbl0xHWpgff4i/RoCABS248Eqwua/6zI0z8oMD2OzBKFNfvPxNYAh4R8 MjPBOsuWM8O9Wx1BFHm3CCAUntbEZg9cWbmsWGkV8EyW+gZJA8KnE5DgSMh2o/gPL833 DNvNC2XhILG3QxzdhQCMlzJTWUse85FwOtl59IfyYqYajNo2u/MmsPzDZ9wXcDLQEcFu hQjJvWJzmeSzilEkVEPFV4T7oOQO4LimPunA0sTjcG3LgI3iTMNAxQ7G/LGBt0DknDLe azpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=/jdOsrT0Ij52gKl40Xc+xljyM3fXn7E+Emd0yEuWzuY=; b=Px0Jdr2F4L0MZvXOgkAjuM/zcc7IY+2KER9oetgb5o/zIRxn2453QRoTjbU6YufEtp HNe1VGaR1r+D7oERfg9criYqeNmAo/jHUmXIqlfFCfIqlVaNX8jfHj57TC1IFhWcCLCM GLQCSamsVSYnm36K4vJMnSepiPrrVdt6+LigveMwLNCgFAlbIQhu0O/fQxNZIGf2Iw1j +gTuqqOeUBf+Hic9NUPN6k/RqYfDqAE9uAVt5g/ehNX7+OZAkFbN1lQXL6bG9pkNLf+d ymOr3DV3J8rB4sTvYCo7ovCftE4u87kUhzMnbJSNsFY7ul4rZv8De+FWIrQ14nq5gfTX /q6Q== X-Gm-Message-State: ANhLgQ07+iccJWUYlAUUc567/syqpV+CV8hbrgBBTROfrH1XOOvjJO/Y rOzxtm9xNam4i0eyyTl/aCcOIUlvl//LJA1ew++a1dK2Mjk= X-Google-Smtp-Source: ADFU+vsMhxr2xl2kFG1J5Kxfn1aXHKummXvIrFOu1tlKze/ZEtG3PLWVyRJ7F2SGHQYwlhoGjx8NFrwKF5dbuBzDe6Q= X-Received: by 2002:a37:4648:: with SMTP id t69mr1360470qka.299.1585345393150; Fri, 27 Mar 2020 14:43:13 -0700 (PDT) MIME-Version: 1.0 References: <20200327192532.120f151d@telaviv1.shlomifish.org> In-Reply-To: Date: Fri, 27 Mar 2020 14:43:01 -0700 Message-ID: Subject: Re: Convert unwrapped paragraphs to hard wrapped paragraphs whenthere's no blank lines. To: Linux for blind general discussion Authentication-Results: relay.mimecast.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=f58J5QcJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (relay.mimecast.com: domain of marbux@gmail.com designates 209.85.222.195 as permitted sender) smtp.mailfrom=marbux@gmail.com X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="UTF-8" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02RLhJAB023154 X-loop: blinux-list@redhat.com From: Linux for blind general discussion X-BeenThere: blinux-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: blinux-list@redhat.com List-Id: Linux for blind general discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 21:43:19 -0000 > I don't understand how paragraphs start and end in these files. Otherwise > you > can try using one of the text processing tools mentioned here: > > * https://www.shlomifish.org/open-source/resources/text-processing-tools/ > > * https://www.computerhope.com/unix/ufold.htm > > * https://en.wikipedia.org/wiki/Fmt_(Unix) > > * https://en.wikipedia.org/wiki/Par_(command) > > Note that you may have better luck converting EPUBs (assuming they lack > https://en.wikipedia.org/wiki/Digital_rights_management ) to plaintext using > tools such as https://pandoc.org/ , > https://metacpan.org/search?q=html%3A%3Awikiconverter&size=20 , etc. Of that list of programs, I'd be inclined to use Pandoc. It permits you to write filters in (embedded) Lua, which is a quick-to-learn programming language. For example, this Lua one-liner converts a string ("s") to add a line break after each existing line break: s = string.gsub(s, "
", "
\n
") On writing Pandoc filters with Lua, see . Best regards, Paul -- [Notice not included in the above original message: The U.S. National Security Agency neither confirms nor denies that it intercepted this message.] ¯\_(ツ)_/¯