Git Product home page Git Product logo

libmobi's Introduction

Libmobi

C library for handling Mobipocket/Kindle (MOBI) ebook format documents. Current version supports reading and parsing functions.

There is a simple program included in the project: mobitool.c. It may serve as an example how to use the library.

What works:

  • reading and parsing:
    • some older text Palmdoc formats (pdb),
    • Mobipocket files (prc, mobi),
    • newer MOBI files including KF8 format (azw, azw3),
    • Replica Print files (azw4)
  • recreating source files using indices
  • reconstructing references (links and embedded) in html files
  • reconstructing source structure that can be fed back to kindlegen
  • reconstructing dictionary markup (orth, infl tags)
  • handling encrypted documents

Todo:

  • writing MOBI documents
  • process RESC records
  • exporting to EPUB documents

Doxygen documentation:

Source:

Installation:

$ ./autogen.sh
$ ./configure
$ make
[optionally] $ make test
$ sudo make install

Usage

  • single include file: #include <mobi.h>
  • linker flag: -lmobi

Requirements

  • compiler supporting C99
  • zlib (optional, configure --with-zlib=no to use included miniz.c instead)
  • libxml2 (optional, enables OPF handling, configure --with-libxml2=no to disable)
  • tested with gcc (>=4.2.4), clang (llvm >=3.4), sun c (>=5.13)
  • builds on Linux, MacOS X, Windows (MinGW), Solaris
  • tested architectures: x86, x86-64, arm, ppc
  • works cross-compiled on Kindle :)

Tests

  • Travis status
  • Coverity status

License:

  • LGPL, either version 3, or any later

Credits:

  • The huffman decompression and KF8 parsing algorithms were learned by studying python source code of KindleUnpack distributed with following license:

      Based on initial mobipocket version Copyright © 2009 Charles M. Hannum 
      Extensive Extensions and Improvements Copyright © 2009-2014 
      By P. Durrant, K. Hendricks, S. Siebert, fandrieu, DiapDealer, nickredding, tkeo.
      This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.
    
  • Thanks to all contributors of Mobileread MOBI wiki

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.