Giter Site home page Giter Site logo

pdb2epubchs's Introduction

PDB2ePubChs

自动将竖式排版的繁体uPDB/PDB电子书文件转换为横式排版的简体中文ePub文件。

支持批量转换,可以将多本书打包成一个合集。

命令行参数

  • 转换单个文件: -c [-a 作者名称] uPdb文件路径 [ePub文件路径]
  • 转换多个文件: -l uPdb文件目录 [输出目录]
  • 打包多个文件: -p 书籍名称 [-a 作者名称] uPdb文件目录 [ePub文件路径]

备注

  • 方括号([])表示可选内容。

  • 如果路径中包括空格,必须用双引号("")把完整路径包裹起来。

  • 打包多个uPdb文件时,将按照文件名的顺序进行打包。

GUI

可以拖拽项目进行排序。

[1.1.0] 当打包成合集时,如果只指定了作者名称,则默认使用《XXX作品集》作为合集名称。

配置字符转换表

作者精力有限,不可能找到所有需要转换的符号,有些汉字也无法准确从繁体映射到简体。

现在,可以通过程序目录下的 ReplacedChars.xml 文件来配置字符转换表,程序会根据转换表来进行相应的处理。

以下是目前程序默认的转换表:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfReplacedChar xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ReplacedChar Org="︿" Rep="〈" />
  <ReplacedChar Org="﹀" Rep="〉" />
  <ReplacedChar Org="︽" Rep="《" />
  <ReplacedChar Org="︾" Rep="》" />
  <ReplacedChar Org="︹" Rep="〔" />
  <ReplacedChar Org="︺" Rep="〕" />
  <ReplacedChar Org="︻" Rep="【" />
  <ReplacedChar Org="︼" Rep="】" />
  <ReplacedChar Org="﹃" Rep="‘" />
  <ReplacedChar Org="﹄" Rep="’" />
  <ReplacedChar Org="﹁" Rep="“" />
  <ReplacedChar Org="﹂" Rep="”" />
  <ReplacedChar Org="︷" Rep="{" />
  <ReplacedChar Org="︸" Rep="}" />
  <ReplacedChar Org="︵" Rep="(" />
  <ReplacedChar Org="︶" Rep=")" />
  <ReplacedChar Org="|" Rep="—" />
  <ReplacedChar Org="│" Rep="…" />
  <ReplacedChar Org="︙" Rep="…" />
  <ReplacedChar Org="︱" Rep="—" />
  <ReplacedChar Org="殭" Rep="僵" />
  <ReplacedChar Org="屍" Rep="尸" />
  <ReplacedChar Org="摀" Rep="捂" />
  <ReplacedChar Org="紮" Rep="扎" />
  <ReplacedChar Org="慾" Rep="欲" />
</ArrayOfReplacedChar>

当需要进行增补时,直接将 <ReplacedChar Org="要转换的文字" Rep="对应文字" /> 添加到列表中即可。

[1.1.1] 现在,可以使用正则表达式替换来替换字符了。

替换过程位于将繁体转化为简体之后。

例如 <ReplacedChar Org="乾([脆净])" Rep="干$1" />,就是将匹配乾脆乾净中的字替换为

作者精力有限,只会阅读自己感兴趣的书籍,所以欢迎大家分享自己的转换表。

其他

如果遇到有保持竖式排版的符号,或者发现其他错误,可以提交给我

pdb2epubchs's People

Contributors

differentrain avatar

Stargazers

 avatar sche11 avatar  avatar

Watchers

James Cloos avatar  avatar

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.