Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved]Any program: directly convert epub file to plain text file?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

[Solved]Any program: directly convert epub file to plain text file?

#1 Post by bkpsusmitaa »

Hello friends!

fbreader creates a pdf file from an epub file. pdftotext creates a plain text file from a pdf file. So the ultimate objective to create a text file from an epub file exists.

But there remains one problem: During conversion strange artefacts are inserted in the final text file, like unnecessary line breaks, while the text is free-flowing without such line breaks in the original epub file.

So I request for information on any program to directly convert, to check if such artefacts could be avoided.

One note: In near future the post could be edited/altered a bit to ease comprehension for other forum members. But the core objective/content shall remain the same.
Last edited by bkpsusmitaa on 2022-04-09 09:14, edited 1 time in total.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home


peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: [?]Any program: directly convert epub file to plain text file?

#3 Post by peter_irich »

Try install calibre and use ebook-convert. But I never worked with epub, I can't offer ready command.

Peter.

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

Re: [Solved]Any program: directly convert epub file to plain text file?

#4 Post by bkpsusmitaa »

Yes, thank you, arochester. Early in the morning, I checked synaptic to find pandoc in my Knoppix(Debian modified) system. I read the synaptic entry, but didn't find any encouraging line. I then grep-ed the 'man pandoc' file to check if there was a line for strings, "epub" and "text" together, but failed to find one.
So you truly deserve a Big Thank You.

Yes, the stackexchange line helps convert epub to plain text, but still enters unwanted line breaks, although there is none in the original. Over the next few days I shall try to check if there is a specific code for the unwanted line breaks to be avoided.

Code: Select all

$ pandoc -f epub -t plain -o filename.txt filename.epub
The code line is counter-intuitive, in the sense that the output and input positions are reverse. But I remain thankful, as the program converted, and only that matters.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

bkpsusmitaa
Posts: 485
Joined: 2009-07-04 06:32
Location: Home: Barrackpore and Mysore
Has thanked: 5 times

[Solved]Any program: directly convert epub file to plain text file?

#5 Post by bkpsusmitaa »

peter_irich wrote: 2022-04-09 08:46 Try install calibre and use ebook-convert ...
Peter.
Apologise Peter for this belated reply. Thank you. Calibre is a huge tool, but extremely under-promoted, it appears.
Freedom is impossible to conceive.
Books that help:
Dale Carnegie's How To Win Friends And Influence People and Emilie Post's Etiquette In Society, In Business, In Politics, And At Home

peter_irich
Posts: 1403
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation
Been thanked: 11 times

Re: [Solved]Any program: directly convert epub file to plain text file?

#6 Post by peter_irich »

bkpsusmitaa wrote: 2022-05-25 02:55 Apologise Peter for this belated reply. Thank you. Calibre is a huge tool, but extremely under-promoted, it appears.
I'm glad to be useful.

Post Reply