Skip to content

Instantly share code, notes, and snippets.

@odurgun
odurgun / EbookChunkSplitter.py
Created February 15, 2025 05:54 — forked from ParkWardRR/EbookChunkSplitter.py
Ebook Chunk Splitter - python
"""
Script: Ebook Chunk Splitter
Description: This script takes an input text file of an ebook and splits it into smaller chunks based on a specified character limit. It ensures that paragraphs are not split and creates an output directory with the split chunks of the ebook.
Input: Replace `<input_file>` with the path to the input text file of the ebook.
Output: Replace `<output_folder>` with the path to the output directory where the split ebook chunks will be stored.
"""
import os
import datetime