About eb4j

eb4j is a 100% pure Java library to access electric dictionaries and eBooks based on EB library.

eb4j library bundles utility commands (ebinfo, ebzip, ebdump).

Original author is Hisaya FUKUMOTO and original eb4j is distributed on eb4j.sourceforge.jp The original development and versions had stopped in 2010.

Here is a fork and active development version.

How to install the library

You can install the library from bintray maven repository.

You need to add a above repository to your project.

Here is an example for configurations;

For Gradle;

repositories {
    maven {
        url "https://dl.bintray.com/eb4j/maven/"
    }
}

then

implementation 'io.github.eb4j:eb4j:2.0.0'

For adding repository with Maven;

<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0' xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <profiles> <profile>
      <repositories> <repository>
          <snapshots> <enabled> false </enabled> </snapshots>
          <id> bintray-eb4j-maven </id>
          <name> bintray </name>
          <url> https://dl.bintray.com/eb4j/maven </url>
      </repository> </repositories>
      <pluginRepositories> <pluginRepository>
          <snapshots> <enabled> false </enabled> </snapshots>
          <id> bintray-eb4j-maven </id>
          <name> bintray-plugins </name>
          <url> https://dl.bintray.com/eb4j/maven </url>
      </pluginRepository> </pluginRepositories>
      <id> bintray </id>
  </profile> </profiles>
  <activeProfiles> <activeProfile> bintray </activeProfile> </activeProfiles>
</settings>

To use with Maven:

<dependency>
        <groupId>io.github.eb4j</groupId>
        <artifactId>eb4j</artifactId>
        <version>2.0.0</version>
        <type>pom</type>
</dependency>

Contacts

You are welcome to make questions, join developments and add documents on wiki! You can reach us at;

Usage

Here is a some usage information for EB4J library.

Library: extensions against standard

appendix

The appendix is an amendment data for CD-ROM book, which is specific for eb library. EB4J can understand appendix that eb library utility generated. It provide following items.

  • Seperator character code.

  • Alternative string for external fonts(EUC-JP and/or Unicode escape sequence)

It provides alternative strings for external fonts defined in EPWING data. It also provides hint information for seperator of article, that is ordinally detect automatically but not implicitly defined in EPWING data. Otherwise, the hint provides hint what character is a seperator. Following is same description in Japanese.

appendix (付録) とは CD-ROM 書籍の補助データの ことです。 appendix は CD-ROM 書籍の出版社から提供されているものではなく、 EB および EB4J ライブラリに固有のものです。 EB4Jは、このデータを解釈利用することができます。

  • 本文の区切りコード

  • 外字の代替文字列(EUC-JPおよび Unicode escape sequence)

appendix のレイアウトは CD-ROM 書籍のものとよく似ています。 トップディレクトリには catalog もしくは catalogs ファイルが存在し、各副本のデータは対応する サブディレクトリに配置されています。

EB4J can handle the appendix contents and provide an API to get alternative string for external font griff codepoint.

It accept Unicode escape sequences, such as '\u00E1', and '\U001F401' form. The appendix can be produced by eb4j-tools appendix subcommand.

オリジナルのEBライブラリは、EUC-JPで代替文字列を生成します。EB4J-toolsのappendixコマンドは、 ASCII文字およびUnicode escape sequenceを生成します。

Unicode map file

Unicode map file is an amendment data for CD-ROM book, which is produced by EBStudio2 authoring tool. EBStudio2 generates external fonts codepoints for unicode characters, and also generate .map file which describe mapping between external fonts codepoints to unicode characters.

The .map file should be a TSV: tab-separated value text file, and WBWin4 EBook reader bundles .map files with applicaiton.

EB4J use .map file and provides API to get Unicode charecter code from external font codepoint. User can put .map file on a same directory with dictionary CATALOG file.

Following is same description in Japanese.

Unicode mapファイルは、CDROM電子書籍のデータに追加するデータです。 EPWING形式の書籍をオーサリングするツールである、EBStudio2は、EPWINGでストレートに表現できないUnicodeの 文字を、 自動的に外字定義として変換する機能を有しています。そのとき同時に、外字とUnicode文字コードポイントの対応関係を .map という拡張子のファイルに生成します。

`.map`ファイルは、TSV: タブ区切り値テキスト ファイルである必要があります。 通常、EBStudio2の作者が配布している 電子書籍リーダーであるEBWin4に同梱されており、インストールされた アプリケーションのフォルダーにいくつかの著名な辞書のためのファイルが格納されています。

ユーザが、電子辞書のCATALOGファイルとおなじフォルダに、対応する`.map`ファイルを格納することで、 EB4Jは、自動的にそのファイルをよみこんで、処理します。 EB4Jには、この値を取得するための拡張されたAPIがあります。

Utility commands

EBDUMP

EBDump - dump dictionary data

SYNOPSIS java -jar EBDump.jar [OPTION] [BOOK directory]

DESCRIPTION

Extract book data to console. If a BOOK directory is not specified, EBDump use current directory as a book directory(A CATALOG file exist.)

-s --subbook subbook index number

-p --page page number(HEX)

-o --offset offset number(HEX)

-p --position position(HEX)

-d --dump dump size(HEX)

-h --help display help message

-v --version display version

EBINFO

EBInfo - display book information

SYNOPSIS java -jar EBInfo.jar [OPTION] [BOOK directory]

Display book information to console. If a BOOK directory is omitted, EBInfo use current directory as a book.

-m --multi-search display multi-search information

-h --help display help message

-v --version display version

EBZIP

EBZip - Compress dictionary

SYNOPSIS java -jar EBZip.jar [OPTION] [BOOK directory]

Compress/decompress dictionary file with EBZip (.ebz)

-f --force-overwerite force overwrite output file

-n --no-overwrite prohibit overwrite of output file

-i --information list information of compressed file

-k --keep keep (don’t delete) original file

-l --level compression level

-o --output-directory output file to a specified directory

-q --quiet suppress all warnings

-s --skip-content [font [, sound [, [grahpic [, movie]]] skip specified content

-S --subbook target subbook

-z --compress compress files

-u --uncompress uncompress files

-t --test only check input files

-h --help display help message

-v --version display version

EB4J - EPWING/Ebook access library and utilities.

Copyright© 2020 Hiroshi Miura

Copyright© 2016 Hiroshi Miura, Aaron Madlon-Kay

Copyright© 2003-2010 Hisaya FUKUMOTO

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Technical references 技術資料

Reference Software 参考ソフトウェア

Projects who use EB4J 2.0.0 and later

Code references