From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02RLGmYe022517 for ; Fri, 27 Mar 2020 17:16:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D0D72166B2B; Fri, 27 Mar 2020 21:16:48 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 198B52166B2C for ; Fri, 27 Mar 2020 21:16:46 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 E5B8A101A265 for ; Fri, 27 Mar 2020 21:16:45 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=dkim.mimecast.com; s=201903; t=1585343805; 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: references:references; bh=vLZ4gYh9uDbSb5hqmaDWJx5jh7LYCW/4PEhoSPoMIak=; b=GZGz7nnAchAs0ngxo22GHoH7WmdFPPcs4y6/vDwk8gAjGel9mQ+NABy+nq86eCyXUKT5+8 M9rPLDkrROvOt70p3EC38PITMAfYpoFNimTb8gz7lLSaP4+om1sNQ3EqH+zV54d5MsQn4U 5J7Un41sv4bxgp5r2ZiweY7lyfKzBMaxVl4Rxu+NKcUAKya7SLzzYta+uNfcC4JQlCUnLE iCAXSDbkOMXHgOYozzqhh0Qt5xl+Hntnqn65wzKcSepCvvZkzDA7fXRjgRKFiBwzIq5IgY ysljeHy28qrtvs5clO4GWrDvVp9Mz9OCBkbeFM0Gb52LCOPBDgSmzGGeM9Ghhg== ARC-Seal: i=1; s=201903; d=dkim.mimecast.com; t=1585343805; a=rsa-sha256; cv=none; b=VT8JsebprMmFaJWTukAEwQD68XOlTV9pPR+ilQqHcygyhCDu9baX27xYwy2RpJBWUqqIeo 8bdt5F1sumZuCXMgc7JJHPdFk+zBpFMnf/gTK2hkuuQWZE3xWhDNJH3ZY+tcB7myspcpHT j0aX4XpRS08CODKr4/lHAZF2L/Y8LbrJ0f8q3U1qyFzlxmlXupMMy8ItoWygzWyufGKzA8 lcOmiHUp4QilBzDBO0Nps1/WAFr+nJt6oopUrcGUJYobNybbOQGLHbSmYQwIwEl/2IFKMg E/hdncxc4NNl+TC+erCg8cOwfGd9MjZJqARZjBIgXF9E/sAtGLgP48M2+8EmBg== ARC-Authentication-Results: i=1; relay.mimecast.com; dkim=none; dmarc=none; spf=none (relay.mimecast.com: domain of robh@apearl.net has no SPF policy when checking 193.254.210.60) smtp.mailfrom=robh@apearl.net Received: from bilbo.visn.co.uk (bilbo.visn.co.uk [193.254.210.60]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-sRWqK_QANIO5G62Rp9SSfw-1; Fri, 27 Mar 2020 17:16:43 -0400 X-MC-Unique: sRWqK_QANIO5G62Rp9SSfw-1 Received: from cpc121376-wals12-2-0-cust281.16-1.cable.virginm.net ([77.100.81.26]:1110 helo=bobsh23aug09) by bilbo.visn.co.uk with esmtpa (Exim 4.93) (envelope-from ) id 1jHwLK-00A7lp-0k for blinux-list@redhat.com; Fri, 27 Mar 2020 21:16:42 +0000 Message-ID: To: References: <20200327192532.120f151d@telaviv1.shlomifish.org> Subject: Re: Convert unwrapped paragraphs to hard wrapped paragraphs whenthere's no blank lines. Date: Fri, 27 Mar 2020 21:16:45 -0000 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bilbo.visn.co.uk X-AntiAbuse: Original Domain - redhat.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - apearl.net X-Get-Message-Sender-Via: bilbo.visn.co.uk: authenticated_id: robh+apearl.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: bilbo.visn.co.uk: robh@apearl.net X-Source: X-Source-Args: X-Source-Dir: Authentication-Results: relay.mimecast.com; dkim=none; dmarc=none; spf=none (relay.mimecast.com: domain of robh@apearl.net has no SPF policy when checking 193.254.210.60) smtp.mailfrom=robh@apearl.net X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 02RLGmYe022517 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:16:49 -0000 Btw: I think Project Gutenberg still exists and they did tons of .txt and well-formatted as a rule, though miles of header material to wade through. ----- Original Message ----- From: "Linux for blind general discussion" To: "Linux for blind general discussion" Sent: Friday, March 27, 2020 4:25 PM Subject: Re: Convert unwrapped paragraphs to hard wrapped paragraphs whenthere's no blank lines. 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 . _______________________________________________ Blinux-list mailing list Blinux-list@redhat.com https://www.redhat.com/mailman/listinfo/blinux-list