Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1019403
| From | yokota <yokota.hgml@gmail.com> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#966283: calibre: Literal "<>" characters in text file not converted properly |
| Date | 2020-07-26 23:30 +0200 |
| Message-ID | <AwWnw-5OT-5@gated-at.bofh.it> (permalink) |
| References | <AwAdk-IY-9@gated-at.bofh.it> <AwAdk-IY-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> Converting a text file (to epub) which included many lines like
> "
> <name> = <rest of line>
> "
> resulted in just the character "=".
>
> As a workaround enscript will produce correct html, but the epub result
> looks fine in the calibre viewer, but produces odd underlined text on
> a nook ereader. But that is an aside, rather than the main point of this
> bug report.
>
> I attach a screen shot showing the display of the original text file and
> the calibre viewer showing the problem.
When converts from TXT format, Calibre tries to detect format type.
Your text file "/usr/share/doc/exim4-base/spec.txt.gz" seems to be
Markdown format,
so Calibre treats your text file as Markdown format.
Markdown format treats "<...>" as HTML tag. This is why "<...>"
disappears your text.
If you are familiar with Python code, check
"/usr/lib/calibre/calibre/ebooks/txt/processor.py" to view format
detection code.
If you want to disable these format detection and treat your file as
plain text file, use file converter from Calibre GUI.
Usage:
1. Push "Add books" button and import the text file to Calibre.
2. Push "Convert books" button to open converter.
3. Open "TXT input" section in converter dialog, and set "plain"
format type to disable format detection.
> Structure:
> Formatting style: plain
4. Add more options to better output.
> Structure:
> Paragraph style: off
> Common:
> Paragraph spaces: enable
5. Push "OK" button to convert your text file to ePub.
--
YOKOTA
Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#966283: calibre: Literal "<>" characters in text file not converted properly yokota <yokota.hgml@gmail.com> - 2020-07-26 23:30 +0200
Bug#966283: calibre: Literal "<>" characters in text file not converted properly ael <witwall3@disroot.org> - 2020-07-27 15:10 +0200
Bug#966283: calibre: Literal "<>" characters in text file not converted properly yokota <yokota.hgml@gmail.com> - 2020-07-28 03:20 +0200
Bug#966283: calibre: Literal "<>" characters in text file not converted properly Norbert Preining <norbert@preining.info> - 2020-07-28 06:40 +0200
csiph-web