public inbox for blinux-list@redhat.com
 help / color / mirror / Atom feed
From: Linux for blind general discussion <blinux-list@redhat.com>
To: Linux for blind general discussion <blinux-list@redhat.com>
Subject: Re: Convert unwrapped paragraphs to hard wrapped paragraphs when there's no blank lines.
Date: Fri, 27 Mar 2020 19:25:32 +0300	[thread overview]
Message-ID: <20200327192532.120f151d@telaviv1.shlomifish.org> (raw)
In-Reply-To: <CAO2sX317wcDpD8e3OWg7_5UvxMWND7urVtyok-9i9Q=PBBZCFg@mail.gmail.com>

Hi,

On Fri, 27 Mar 2020 15:30:29 +0000
Linux for blind general discussion <blinux-list@redhat.com> 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 .


  reply	other threads:[~ UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Linux for blind general discussion
 ` Linux for blind general discussion [this message]
   ` Convert unwrapped paragraphs to hard wrapped paragraphs whenthere's " Linux for blind general discussion
     ` Linux for blind general discussion
       ` Linux for blind general discussion
 ` Convert unwrapped paragraphs to hard wrapped paragraphs when there's " Linux for blind general discussion
   ` Linux for blind general discussion
     ` Linux for blind general discussion
 ` Convert unwrapped paragraphs to hard wrapped paragraphs when there'sno " Linux for blind general discussion

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200327192532.120f151d@telaviv1.shlomifish.org \
    --to=blinux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).