Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

txt-beautify

Claude-Ray10MIT0.0.4TypeScript support: included

Beautify text files for better reading experience on kindle.

kindle, text file

readme

txt-beautify

Build Status

Beautify text files for better reading experience on kindle.

Features

  • Without calibre
  • No need to convert into mobi

主要用于kindle传书,不需要calibre,不需要转mobi,因为亚马逊会自动转换txt文件。

这里仅修饰文件内容,以便亚马逊转出格式更优美的文本。

现在只是一个简单粗暴的脚本,要求文件编码utf-8,满足基本需求。

Install

npm install txt-beautify -g

Usage

cli

Usage: txt-beautify input_file [output_file]

Beautify text files for better reading experience on kindle.

Options:
  -V, --version  output the version number
  -h, --help     output usage information

package

const txtBeautify = require('txt-beautify');

// return a Promise
txtBeautify(filepath, outpath);
// or
txtBeautify(filepath)
  .then(defaultOutpath => { });

Todo

有时间会做一些优化

  • <input checked="" disabled="" type="checkbox"> Node.js 版本高于 10.5.0 时支持 worker_threads
  • <input checked="" disabled="" type="checkbox"> cli,先做个最基础的凑合用
  • <input disabled="" type="checkbox"> 功能扩充
  • <input disabled="" type="checkbox"> txt中标题优化