rupor-github / fb2converter Goto Github PK
View Code? Open in Web Editor NEWUnified converter of FB2 files into epub2, kepub, mobi and azw3 formats.
License: GNU General Public License v3.0
Unified converter of FB2 files into epub2, kepub, mobi and azw3 formats.
License: GNU General Public License v3.0
NAME:
fb2c.exe transfer - Prepares EPUB file(s) for transfer (Kindle only!)
Doesn't the new version written in Go support transfer commands?
Are there any plans to add this feature? Or where can I find and use this feature? Thanks.
Здравствуйте!
При использовании обертки fb2mobi (для MyHomeLib), независимо от наличия configuration.toml
в директории fb2converter
и/или в fb2mobi
, fb2c.exe
вызывается с дефолтными настройками (без -c
параметра), например:
2020-10-20T17:36:06.252+0300 DEBUG fb2converter/fb2c.go:91 Program started {"args": ["D:\\MyHomeLib\\converters\\fb2converter\\fb2c.exe", "-mhl", "2", "convert", "--ow", "C:\\Users\\Alex\\AppData\\Local\\Temp\\_myhomelib\\01 - Трон из костей дракона.fb2", "C:\\Users\\Alex\\Desktop\\Уильямс Тэд\\Орден Манускрипта"], "ver": "1.54 (go1.15.3) : 753067013115c031dcd3d319634e64426a70e22e"}
2020-10-20T17:36:06.252+0300 INFO fb2converter/fb2c.go:93 Using defaults (no configuration file)
Эта стало для меня проблемой, когда я захотел использовать механизм самого MHL для изменения заголовка fb2 (в моем случае я поставил шаблон [%s [#%n ]- ]%t
): не всегда заголовок, и особенно серия в тегах файлов fb2, совпадает с информацией из inpx коллекции. После этого я стал получать заголовки типа:
2020-10-20T17:36:06.688+0300 DEBUG processor/mobiazw3.go:173 Info:I9006:option: -c1: Standard DOC compression
2020-10-20T17:36:06.709+0300 DEBUG processor/mobiazw3.go:173 Info(prcgen):I1047: Added metadata dc:Title "(ОМ - 01) Орден Манускрипта #01 - Трон из костей дракона"
В итоге я просто отредактировал config/cfg.go
и пересобрал fb2converter
, что несложно, но пересобирать каждый раз, когда хочешь поменять настройки, как-то не очень удобно. Может быть, есть более "цивилизованный" способ? Если нет, было бы удобно при вызове fb2mobi.exe
проверять на наличие конфигурационного файла в одной с ним директории и считывать его, если он найден.
Спасибо 😃
P.S. Думаю, все сказанное также относится и к обертке fb2epub
Add an ability to pass proper ASIN (and may be ISBN), probably using "overwrite metadata" mechanism. This may be useful for Kindle, which has GoodReads integration "out of the box". At the moment it is not clear if epub/kepub formats need something like that too. Make sure new info is used in the resulting binary.
Здравствуйте!
Для начала, огромное спасибо за ваш труд!
Есть одна проблема. На руках Kindle Paperwhite 2018. Прошивка 5.12.1 оригинальная без каких-либо изменений.
Есть такая книга в формате FB2: 43607480.zip
Отсылаю ее на устройство с помощью libro 0.8.
В программе обложка отображается, на устройстве же - нет.
Буду крайне признателен, если получится решить проблему! Спасибо!
Есть ли возможность установить на mac? Как это сделать?
I'm often stumble upon books which have multiple series sequence tags like in this example:
<?xml version="1.0" encoding="UTF-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
<description>
<title-info>
[...]
<sequence name="Main Series Name"/>
<sequence name="Sub Series Name" number="1"/>
</title-info>
</description>
Currently fb2converter only looks for the first one and ignores all subsequent sequences. So it losing not only more relevant subseries name but more importantly book number in the series. Are there any plans to support that?
I'm hacked around the problem like this:
--- a/processor/process.go
+++ b/processor/process.go
@@ -672,9 +672,14 @@ func (p *Processor) processDescription() error {
p.Book.Authors = append(p.Book.Authors, an)
}
}
- if e := info.SelectElement("sequence"); e != nil {
+ for _, e := range info.SelectElements("sequence") {
var err error
- p.Book.SeqName = getAttrValue(e, "name")
+ name := getAttrValue(e, "name")
+ if name == "" {
+ p.env.Log.Warn("Sequence name is not defined", zap.String("xml", getXMLFragmentFromElement(e)))
+ continue
+ }
+ p.Book.SeqName = filepath.Join(p.Book.SeqName, name)
num := getAttrValue(e, "number")
if len(num) > 0 {
if !govalidator.IsNumeric(num) {
But that's obviously a dirty hack and Book.SeqName/Book.SeqNum needs to be replaced with array like Book.Authors to cleanly support that. Maybe with some additional configuration parameters determining how to deal with them.
Described here: https://www.mobileread.com/forums/showpost.php?p=4103867&postcount=49 :
If customer font is detected we may need to set EXTH field 528 (OverrideKindleFonts) to true to enable "Publisher Font" option.
It is useful to create EPUB files with embedded fonts. Like fb2mobi do.
When using fb2mobi wrapper, then output directory cut. In my example, I'm passing "Z:\BookExport_MOBI_EXPORT" as target directory, but fb2c receive only "Z:\BookExport". See output below:
E:\Books\converters\fb2mobi>fb2mobi.exe "C:\Users\STSARE1\AppData\Local\Temp_myhomelib\01 - Agent na myagkih lapah.fb2" "Z:\BookExport_MOBI_EXPORT"1\AppData\Loca
Starting E:\Books\converters\fb2converter\fb2c.exe with ["-mhl" "2" "convert" "--ow" "C:\Users\STSARE
l\Temp\myhomelib\01 - Agent na myagkih lapah.fb2" "Z:\BookExport"]
2020-12-30T10:31:54.023+0100 INFO Using defaults (no configuration file)
2020-12-30T10:31:54.024+0100 INFO Processing starting {"source": "C:\Users\STSARE~1\AppData\Local\Temp\
myhomelib\01 - Agent na myagkih lapah.fb2", "destination": "Z:\BookExport", "format": "mobi"}
2020-12-30T10:31:54.024+0100 INFO Conversion starting {"from": "01 - Agent na myagkih lapah.fb2"}
2020-12-30T10:31:54.306+0100 WARN Removing cover image duplicates, leaving only the first one
2020-12-30T10:31:57.325+0100 WARN Overwriting existing file {"file": "Z:\BookExport\01 - Agent na myagkih
lapah.mobi"}
2020-12-30T10:31:57.459+0100 INFO Conversion completed {"elapsed": "3.4352107s", "to": "Z:\BookExport\01 - Ag
ent na myagkih lapah.mobi"}
2020-12-30T10:31:57.459+0100 INFO Processing completed {"elapsed": "3.4352107s"}
Scribe of course uses MTP (media transfer protocol). Calibre currently does not support copying thumbnails for it.
There are some C libraries (check calibre source code for example), perhaps you could call those from Go.
Привет!
При конвертации из fb2 в mobi теряется часть информации, которая хранится в структуре FB2.
Вот так выглядит метадата в Calibre после конвертации через fb2conv из fb2 в mobi:
А вот так она выглядит после конвертации через встроенный конвертор Calibre:
А волнует меня это только по той причине, что файл сконвертированный в Calibre с корректно проставленным asin (я подозреваю в этом дело) может нормально работать с сервисом Goodreads при попадании в Kindle. Весьма полезная фича.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.