Skip to content

shanleiguang/vRain

Repository files navigation

vRain - Chinese Ancient eBook Generator

Star License

Create vertical-layout eBooks in traditional Chinese woodblock print style

中文 | English


About

vRain is a Perl-based tool for creating vertical-layout eBooks that replicate the aesthetic of traditional Chinese woodblock-printed books.

The tool generates book page backgrounds, calculates character positions (right-to-left, top-to-bottom), and places text character by character onto the pages — just like traditional woodblock printing.

Sample

Features

  • 📚 Authentic ancient Chinese book aesthetics
  • ✨ Annotations support (dual-column small text)
  • 🎨 Fully customizable: fonts, colors, layouts, page styles
  • 📜 Multiple background styles: aged paper (宣紙), bamboo scroll (竹簡), fish tail (魚尾)
  • 🔤 Multi-font fallback for rare characters
  • 📖 PDF output suitable for e-readers
  • ⚡ Generate million-character books in minutes

Quick Start

Prerequisites

# Install Perl modules
CPAN - Image::Magick, PDF::Builder, etc

Usage

# Generate a book (specify book ID from books/ directory)
perl vRain.pl -b 01 -f 1 -t 10 -c

# Test mode - generate first 10 pages only
perl vRain.pl -b 01 -f 1 -t 10 -z 10 -c

Options

Option Description
-h Show help
-v Verbose output
-b Book ID (required)
-f Start text index
-t End text index
-z Test mode (limited pages)
-c Compress PDF

Example Output

001 002 003 004

More examples: vBooks Gallery

Documentation

Related Projects

  • vYinn - Ancient Chinese seal generator
  • vQi - Go SGF to ancient style images
  • vModou - Ancient book scan correction
  • vRain-Python - GUI version (Python)

License

MIT License

Star History

Star History Chart

Sponsorship

image

About

中文古籍刻本風格直排電子書製作工具 Chinese Ancient eBooks Generator

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Languages