GithubHelp home page GithubHelp logo

gregko / fb2-to-epub-converter Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.05 MB

Automatically exported from code.google.com/p/fb2-to-epub-converter

License: GNU General Public License v3.0

Makefile 0.28% CSS 0.32% C++ 20.88% C 77.45% Lex 1.06%

fb2-to-epub-converter's Introduction

fb2toepub is a converter from FB2 to EPUB. FB2 and EPUB are two popular eBook formats.
This converter is intended to be used in embedded systems and other resource-critical facilities, however of course it can be used as a standalone application.

Tested on Windows Vista 32 and Cygwin.


How to build the converter:

1) For Linux, use Makefile.

2) For Windows, use fb2toepub.sln which is a solution file for MSVS 2008.
There are build problems for Windows with scanner.l and scanner.cpp. The cause is that there is no flex for Windows working properly in C++ mode and compatible with modern C++.
Possible solutions:
 - Install cygwin and use cygwin flex. File FlexLexer.h deployed with cygwin-1.7.7-1 is compatible with MSVC++. Copy it to some directory and add this directory to Visual C++ include directory list.
 - If you don't want to install cygwin, you can use existent scanner.cpp and the header file FlexLexer.h in source directory fb2toepub/win_FlexLexer/. However keep in mind that this file is from cygwin-1.7.7-1 package and it may not be refreshed later if I decide to switch to next version of cygwin.


How to run the converter.

The simplest command line is the following:

fb2toepub -sf <style-font-directory> <input-fb2-file> <output-epub-file>

where <style-font-directory> is path to directory containing files and styles. You can find examples of fonts and styles in custom/ directory.

Note: The program neither generates output file name automatically using input file name, nor adds ".fb2" or ".epub" extensions to input and output file names.

fb2-to-epub-converter's People

Contributors

alexeybobkov avatar

Watchers

 avatar  avatar

fb2-to-epub-converter's Issues

No external DLLs for Windows executable

Problem description:
Windows release executable requires a lot of external Microsoft Runtime DLLs.

Requirements:
Link Windows release executable static only. There must not be any imports 
except from kernel32.

Original issue reported on code.google.com by [email protected] on 22 Nov 2010 at 4:08

New development requirements

Requirements:
1) Add cover image description to metadata section of content.opf
2) Place all Asian encodings to conditional compilation section
3) Do not allow to overwrite output file silently unless it is explicitly 
allowed by an option.
Additional requirements may be added later.

Original issue reported on code.google.com by [email protected] on 30 Nov 2010 at 1:49

factor.fb2.zip(28,1-28,12) : parser error: element <section> expected

Hi,

When I try to convert the attached file I get error.
parser error: element <section> expected

Looks like parser doesn't understand tag <empty-line/>

If I remove "<empty-line/>" I start getting error at tag <cite/>.

Here is a piece of xml:
<empty-line/>
<p><strong> Алекс Орлов </strong><strong></strong></p>
<empty-line/>
 <section>
<title>
<p><strong><cite id="t1" name="t1"></cite>1 </strong></p>
</title>


Thank you for your work, it is awesome!

Regards,
Ivan Shakhov


Original issue reported on code.google.com by [email protected] on 9 Apr 2011 at 3:00

Attachments:

Too big text files in epub zip

What steps will reproduce the problem?
1. Convert fb2 book with long section. For example:

http://fictionbook.ru/author/viygotskiyi_viygodskiyi_lev_semenovich/psihologiya_
iskusstva/

2. Sony reader can't open this epub.
3. Open output epub as a zip and make sure that there is a >600K text file.

Requirement:
All files inside zip should be < 100K.

Original issue reported on code.google.com by [email protected] on 25 Nov 2010 at 3:14

Попытка сконвертировать файл приводит к ошибке "parser error: expected element not found"

Попытка сконвертировать файл приводит к 
ошибке:

C:\mystuff\trash>fb2toepub.exe "Толстой - Апостол Иоанн и 
разбойник.fb2.zip" "Толстой - Апостол Иоанн и 
разбойник.fb2.zip.epub"
╥юыёЄющ - └яюёЄюы ╚юрээ ш 
Ёрчсющэшъ.fb2.zip(12,4-12,13) : parser error: expected element not 
found
[0]No error

Файл успешно проходит XML валидацию.

Original issue reported on code.google.com by [email protected] on 3 Mar 2011 at 9:43

Attachments:

fault when i try convert a books

I've tried convert fb2 ebooks to epub, on windows (and the reader prs 505 (the 
converter is installed into the reader thanks the delovepers of this project 
http://code.google.com/p/prs-plus/)), and the only books I can convert is named 
oliver twiste in the example boos, the others they are imposible, because 
appears a fault when launch the comand line.

Do you know where is the problem or do you have a new version that incluides 
some modifications to solve this problem?

thanks


Original issue reported on code.google.com by [email protected] on 28 Mar 2011 at 10:46

Attachments:

Converts .fb2 to unreadable (in epub readers) .epub file

I am using fb2toepub 1.04 on Linux 2.6.32 64-bit 

On converting a valid fb2 file the program outputs a file which can not be 
opened in epub readers. Also this file appears to be a broken zip archive, as 
it is impossible to unzip (archiver fails with error message). 

An example fb2 file and the broken epub attached.


Original issue reported on code.google.com by [email protected] on 1 Jul 2011 at 8:48

Attachments:

Build problems for Windows

What steps will reproduce the problem?
1. Build the Windows solution.

What is the expected output? What do you see instead?
Windows build fails. It should not fail.

Actual problem found:
There is no flex for Windows working properly in C++ mode and compatible with 
modern C++.

Original issue reported on code.google.com by [email protected] on 21 Nov 2010 at 3:37

Convert:Segmentation fault

$uname -a 
Linux HOST 2.6.32-5-amd64 #1 SMP Sat Mar 31 04:00:05 UTC 2012 x86_64 GNU/Linux

log make in attach

What steps will reproduce the problem?
1.$ make
2.$ cd unix_dist
3.$ ./fb2toepub file.fb2 file.epub
     Segmentation fault

What is the expected output? What do you see instead?
Segmentation fault. File doesn't open.

What version of the product are you using? On what operating system?
1.04, 1.03, 1.02, 1.01

Please provide any additional information below.
$ flex --version
flex 2.5.35

Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 8:14

Attachments:

TOC is opened too slowly on Reader

What steps will reproduce the problem?
1. Create epub file using this converter
2. Load it to Sony Reader
3. Open Table of Contents.

What is the expected output? What do you see instead?
TOC is opened very slowly (sometimes minutes to wait).

Cause: All TOC entries refer to file#id. TOC is opened very fast if they refer 
to file without id.

Requirement: Generate only TOC entries which refer to beginning of file. Remove 
id.

Original issue reported on code.google.com by [email protected] on 23 Nov 2010 at 5:36

New development requirements

Requirements:
1) implement option -i to generate fb2 info
2) parse (don't skip) all book description from fb2 (date, genre, isbn etc.) 
and store to appropriate epub field.
3) copy all element attributes (such as xml:lang)

Original issue reported on code.google.com by [email protected] on 26 Nov 2010 at 5:13

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.