From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RGPoTa012992 for ; Fri, 27 Mar 2020 12:25:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0926D2093CC4; Fri, 27 Mar 2020 16:25:50 +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 E83672022EAB for ; Fri, 27 Mar 2020 16:25:41 +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 AAA7F80029A for ; Fri, 27 Mar 2020 16:25:41 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=dkim.mimecast.com; s=201903; t=1585326341; 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; bh=04bM3TsIHkcvmha4BYWLKAhyN0Kgfjmj5KHkDKGFQD4=; b=iezxlAROCB3GfvUaYPvJ2jPziv4W/BSqDR2qbf6JAMOYV31xUl+CbOn7oQ3moYw1sPQyFm VOg9fLhdWwVFml0q3fzGPQB46uvRGKLhHowt8WjYqtbsi9oB+uXhm2Z+VnE5VdzbXeXsKc MJeb/IpcS6cUstGM5BDwjKs4GuwIJyfH1Kgd04cyhMhemltOX/F8yjyQu3GvjUx3lPyLO8 edsBsm5coTLGC8vJyWG55UxcsRTmQuPQ7SXn0JKOsFxkHtlY6fxFPkLJgUqJGrRurjJToc D3Co4muQ+ZhPF2APqB19AyaL0hAqUFfzP6N6x8fVpve59US8AjycS9fdc2tC9Q== ARC-Seal: i=1; s=201903; d=dkim.mimecast.com; t=1585326341; a=rsa-sha256; cv=none; b=rZ6gflVWrrtDpV0TixGYr3XFQVZyBZmFr47MsSbGJnE5nKRHiZm4oYNTt6BPqq6QnbL141 1Tqs8BhgO6r1ivHbK085KBAh82CMGEvayeTvR2ecnMbMaBIglWWZGy7yo86F7CaPqW8Ssy FjqPy/om550Ez77hfiX1fRiV4HSnUZ72Yb/Nsu8Pa+P1egtb0+uZ8Jo1wU7xyRPbyrmwlR iM4Gow+jAihLbozg+2B7os2EtOB1JT5X/FvUI62Z65au4+6XPJ61uv950Xa6XfcXjalGa0 9246PwhgvH9AYOx8zDvarF9/YsBmu/d2GlX78/teljhcQIQg1DC/bQThMneddg== ARC-Authentication-Results: i=1; relay.mimecast.com; dkim=none; dmarc=none; spf=neutral (relay.mimecast.com: 192.185.50.93 is neither permitted nor denied by domain of shlomif@shlomifish.org) smtp.mailfrom=shlomif@shlomifish.org Received: from gateway24.websitewelcome.com (gateway24.websitewelcome.com [192.185.50.93]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-o7rZIsb6Mlm4gElo1mfKyQ-1; Fri, 27 Mar 2020 12:25:39 -0400 X-MC-Unique: o7rZIsb6Mlm4gElo1mfKyQ-1 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway24.websitewelcome.com (Postfix) with ESMTP id CB85C1600E3 for ; Fri, 27 Mar 2020 11:25:37 -0500 (CDT) Received: from gator4065.hostgator.com ([192.185.4.76]) by cmsmtp with SMTP id Hrndj6wCLEfyqHrndj52Px; Fri, 27 Mar 2020 11:25:37 -0500 X-Authority-Reason: nr=8 Received: from igld-84-229-97-230.inter.net.il ([84.229.97.230]:45198 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jHrnd-000prZ-70 for blinux-list@redhat.com; Fri, 27 Mar 2020 11:25:37 -0500 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id 831032610EA for ; Fri, 27 Mar 2020 19:25:32 +0300 (IDT) Date: Fri, 27 Mar 2020 19:25:32 +0300 To: Linux for blind general discussion Subject: Re: Convert unwrapped paragraphs to hard wrapped paragraphs when there's no blank lines. Message-ID: <20200327192532.120f151d@telaviv1.shlomifish.org> In-Reply-To: References: MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - redhat.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 84.229.97.230 X-Source-L: No X-Exim-ID: 1jHrnd-000prZ-70 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: igld-84-229-97-230.inter.net.il (telaviv1.shlomifish.org) [84.229.97.230]:45198 X-Source-Auth: shlomif@shlomifish.org X-Email-Count: 1 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-Local-Domain: yes Authentication-Results: relay.mimecast.com; dkim=none; dmarc=none; spf=neutral (relay.mimecast.com: 192.185.50.93 is neither permitted nor denied by domain of shlomif@shlomifish.org) smtp.mailfrom=shlomif@shlomifish.org X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02RGPoTa012992 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 16:25:50 -0000 Hi, On Fri, 27 Mar 2020 15:30:29 +0000 Linux for blind general discussion wrote: > Okay, this isn't strictly an accessibility question, but I can't think > of any better place to ask and Google didn't help much. > > I occasionally purchase eBooks from Smash Words as they're the only > eBook Store I know of that offers plain text along side the far too > prevalent for my liking PDF, ePub, and Kindle formats. > > Problem is, their plain text eBooks are typically long enough Firefox > and Orca simply choke on them and they have paragraphs that are > unwrapped, which makes reading them with nano and SBL cumbersome. > Normally, I'd just use nano's justify command to hard wrap thewhole > file, but they lack blank lines between paragraphs, so Nano would > think the whole book a single paragraph. > > So, does anyone know a way to automate inserting blank lines before > and after each line in a file that's too long to fit on the screen all > at once and then hard wrap those long lines? > 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. Regards, Shlomi Fish > > _______________________________________________ > Blinux-list mailing list > Blinux-list@redhat.com > https://www.redhat.com/mailman/listinfo/blinux-list > -- Shlomi Fish https://www.shlomifish.org/ https://is.gd/MQHVF3 - The Atom Text Editor edits a 2,000,001B file Real programmers use a nice editor and a nice programming language and get it done in less than O(N!). — vanguard on Freenode’s ##programming Please reply to list if it's a mailing list post - http://shlom.in/reply .