Library organization on PC / reader | PC Applications | fb2converter [Other]



Rep: (51)
fb2converter - Library organization on PC / reader | PC applications
Supported platforms: Windows, MacOS, Linux

Discussion of the converter was originally conducted onthe-ebook.org (the resource is closed from March 1, 2019) and here in the subject Library organization on PC / reader .

In order not to litter the topic "Organization of the Library", further discussion will be conducted here.

This program is an iteration of the project.fb2mobi and is the result of summarizing the experience gained in the process of supporting fb2mobi. The main reasons for its creation are the difficulties in supporting binary distributions of code written in Python, as well as historical stratifications on the command line and fb2mobi configuration. Discussion fb2mobi conducted here .

fb2c has no dependencies and does not require installation. During the processing, an attempt was made to separate the command line from the configuration file, simplified the configuration and normalized the use of Unicode. Removed or simplified fb2mobi (XSLT, custom dictionaries) features that nobody used. At the same time, everything connected with the visual formatting of the book (stylesheets, etc.) remains practically unchanged. Accordingly the documentation forfb2mobiin partdocument formattingstill relevant.

Currently, fb2c can do more than the fb2mobi command line.

Some differences from fb2mobi, worthy of mention:
  • Changed the algorithm for processing the names of the received files (you can list in the directory by metadata)
  • Processes files within directories and archives, allows flexible definition of the name and path of the resultant (s)
  • Somewhat different hyphenation algorithm
  • golang runtime handles images somewhat differently than Python - so some broken images will become more visible (there is use_broken_images in the configuration)
  • Page size is calculated in Unicode code points and not in bytes.
  • Changed the generation of table of contents for epub (toc.ncx), expanded the formatting capabilities of the displayed table of contents
  • Added new text formatting features.
  • Kobo KEPUB format supported
  • The generated epub is being tested.epubcheck

Project site
Latest binaries
Attempt to documentation

Shell / GUI with full integration
  • Multi-platform GUI (and not only) to fb2converter fromdnk_dz - libro
  • Windows program for managing collections of electronic books in any format -MyHomeLib

For those who forgot the command line, a brief reminder on the convert command:
Attached Image


The logic of work looks like this: if you want to customize something, select a location, use the export command, change how you like it and specify the path to your configuration in the selected location when starting the program. Otherwise, the built-in values ​​are the default configuration. The program does not pick up anything anywhere from the disk itself. I do not know where it will work and how you feel comfortable, and I don’t want to know.

Short instruction fromeliy for the lazy
1. Download the archive here
2. We read documentationhere
3. Unpack in some folder, for example C: \ fb2c
4. Run the terminal WIN + R and cmd.exe
5. go to the folder with the cd c: \ fb2c \ fb2converter program (if I'm not mistaken, but you can look in the explorer for the correct path to fb2c.exe)
6. Execute "fb2c.exe export."
7. Settings files, styles, vignettes, etc. will appear in the program folder. which can be edited.


Post has been editedrupor123 - 02.04.19, 13:53



Rep: (686)
Unlimited666 @ 02.22.19, 20:06*
but it’s precisely the line spacing I did not understand which field is responsible

In different fonts there is different line-spacing, for the Kindle it dances from there and it is impossible to customize it through the style. You can adjust the initial letter to a specific font, while with a different font it is very likely that everything will leave or collide.
Try this:
span.dropcaps
{
float: left;
font-weight: bold;
font-size: 3em;
margin-top: 0em;
margin-bottom: -0.2em;
margin-right: 0.08em;
padding-right: .1em;
}
p.dropcaps
{
text-indent: 0;
text-align: justify;
}


Post has been editedeliy - 22.02.19, 21:07



Rep: (158)
Unlimited666 @ 02.22.19, 20:06*
which field

line-height

But on Kobo, for example, without a patch (separately for epub and kepub), this property will not work, perhaps also on the Kindle?
it is impossible to configure it through the style
litter, did not see your answer that also does not work.

Post has been edited.qwerty - 22.02.19, 21:10



Rep: (0)
Thank you all, I understood everything, then I will read with the standard distance, in which case all my settings seem to work fine. The only thing is that one page on 3 stretches :)



Rep: (686)
The only thing is that one page on 3 is stretched

1 page is 2300 characters or 2000 or 1000 or how many you want. Well, take for 1 page the number of characters how much fits with a comfortable font size on the screen and then converting with such settings you will almost have the same number of pages and paging, only when changing the font size everything will go astray and you don’t need to know how much time to flip to the end of the book ...

Post has been editedeliy - 22.02.19, 21:21



Rep: (51)
Eliy @ 02.22.19, 04:59*
The ellipsis on the dash is replaced.

Kaznelson @ 02.22.19, 05:24*
In the last converter, emnip, ellipsis at the beginning of the paragraph was processed only in terms of escaping an inextensible space, if before that it was normal ...

I have to disappoint you - the old converter behaves exactly the same as the new one. Which, however, is not surprising - since the condition was to replace the dash in the speech with identical dashes and the space after them with 6-m-space. How the ellipsis I don’t know (I don’t remember) got into the list of dashes in the premiere speech - but it happened a very long time ago.

It seems to me that you just need to throw it out of the transformation line. An alternative is to process the ellipsis in a special way, but I still do not see why.

Post has been editedrupor123 - 22.02.19, 21:48



Rep: (686)
It seems to me that you just need to throw it out of the transformation line

Well, I did so, which is what I recommend in the next build for the "default" settings

As I understand it, gap optimization in direct speech is now performed separately from this transformation?



Rep: (51)
As I understand it, gap optimization in direct speech is now performed separately from this transformation

Why? This is a direct replacement for the "katz_tr" XSL transformation - does exactly the same thing.

<xsl: template match = "fb: p [starts-with (., '-') or starts-with (., '-') or starts-with (., '-') or starts-with (., ' - ') or starts-with (.,' - ') or starts-with (.,' - ') or starts-with (.,' ... ')] ">
<rupor: katz_tr>— </ rupor: katz_tr>
</ xsl: template>



Rep: (686)
Why? This is a direct replacement for the "katz_tr" XSL transformation - does exactly the same thing.

Ooh. And why without & # 8 1 9 8? There must be an inextricable gap, for the sake of which everything was started?

Post has been editedeliy - 22.02.19, 22:17



Rep: (51)
Eliy @ 02.22.19, 14:16*
Ooh. And why


Not without - this is a forum so transformed.

I don’t know the details / I don’t remember - you need to return to ebook.org history - perhaps a respectedkaznelson remember why he wanted it this way, and not differently - I just realized his wish and it stayed like that forever. You can experiment in any of the converters with your own settings :)

Post has been editedrupor123 - 22.02.19, 22:23



Rep: (686)
* rupor123,
Then I realized the forum cuts, but in the config it’s not & # 8198, there’s a simple gap.So you need to insert this character after the dash in the first conversion in the config?
managed to try, no need, everything is already there.

Post has been editedeliy - 22.02.19, 22:38



Rep: (51)
but in the config it’s not & # 8198, there is a space

No - there are 8198, I'm sure of that :)



Rep: (686)
* rupor123, OK. I figured it out, so I just remove three points, the rest as it is.



Rep: (51)
Version 1.3

The exported configuration.toml now matches the default configuration.
Changed the handling of dropcaps to get the same results in epub and kepub modes. (The first word of the first paragraph of the first sentence of the chapter, taking into account any types of spaces between words).
Removed "index out of bounds" in kepub mode (Silvia ) and a panic recovery log entry has been added.
Removed ellipses from the speech transformation example (eliy ).
The "series number" check is relaxed - now numbers like "0005" are processed.
When processing href, all backslash characters are first converted to slash.

eliy - about the configuration: you would pay attention to the dumpconfig command - it is there specifically for understanding what is happening :)

Post has been editedrupor123 - 23.02.19, 17:36



Rep: (686)
would you pay attention to the dumpconfig command

Thank you, I have long drawn. From this, in fact, the idea arose of bringing what is displayed in the exported configuration.toml to a complete match with the default settings, then there is no need to look in parallel at the editable configuration.tom and the console with dumpconfig output, which simplifies customization for inexperienced users.

Post has been editedeliy - 23.02.19, 20:10



Rep: (3)
Hello! Please teach us how to make sure that footnotes are not taken into account in time to the end of the book and in the total volume of the book, what PW shows in%. If possible.

upd: I'm not here, apparently

Post has been editedcharnavik - 24.02.19, 12:56



Rep: (13)
I tried installing the experimental GUI from dnk_dz - libro forMac . I got a picture on the screen, but I don’t understand where to get fb2c, which the converter requires.



Rep: (51)
and where to get fb2c, which the converter requires I don’t understand

In the topic header there is a link to the "latest binaries"



Rep: (25)
I tried installing the experimental GUI from dnk_dz - libro for Mac. I got a picture on the screen, but I don’t understand where to get fb2c, which the converter requires.

I have not yet announced a version for mac. These are experiments so far. But since they’ve downloaded ... Download the fb2c archive from the link in the header of this topic (fb2c-darwin.7z), unzip it to some folder. In the libro settings on the fb2c tab, select the location of the fb2c executable file (for Kindle, do not forget to specify output format: mobi or azw3). The GUI so far only works on Macos Mojave (10.14); in previous versions, operation is not guaranteed. So far, only conversion to disk works.

* rupor123, Found in 1.3 bug. When exporting settings in the configuration file, there is an error in the document.kindlegen section: emove_personal_label = true - missing letter r.



Rep: (51)
dnk_dz @ 02.25.19, 04:40*
emove_personal_label = true - the letter r is missing

Thanks, I’ll fix it -Version 1.4

Post has been editedrupor123 - 25.02.19, 14:56



Rep: (13)
dnk_dz @ 02.25.19, 11:40*
I have not yet announced a version for mac. These are experiments so far. But since they’ve downloaded ... Download the fb2c archive from the link in the header of this topic (fb2c-darwin.7z), unzip it to some folder. In the libro settings on the fb2c tab, select the location of the fb2c executable file (for Kindle, do not forget to specify output format: mobi or azw3). The GUI so far only works on Macos Mojave (10.14); in previous versions, operation is not guaranteed. So far, only conversion to disk works.

He converts to Kepub, but not all books.
For example, this is not converted.Attached fileFear of Flight.fb2(305.45 KB)


Full version    

Help     rules

Now: 09/09/19, 05:08