-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
170 lines (159 loc) · 10.4 KB
/
index.html
File metadata and controls
170 lines (159 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; base-uri 'self'; form-action 'self'; object-src 'none'; frame-src 'none'; script-src 'self' https://cdn.jsdelivr.net https://cloud.umami.is; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://spacesoda.github.io; connect-src 'self' https://api-gateway.umami.dev https://cloud.umami.is;">
<script src="app/lang-redirect.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16x16.png">
<link rel="shortcut icon" href="assets/favicon.ico">
<title>epub2txt - Convert EPUB to Text</title>
<link rel="canonical" href="https://spacesoda.github.io/epub2txt/" />
<link rel="alternate" hreflang="x-default" href="https://spacesoda.github.io/epub2txt/" />
<link rel="alternate" hreflang="en" href="https://spacesoda.github.io/epub2txt/" />
<link rel="alternate" hreflang="ja" href="https://spacesoda.github.io/epub2txt/ja/" />
<link rel="alternate" hreflang="zh-TW" href="https://spacesoda.github.io/epub2txt/zh/" />
<!-- SEO Meta Tags -->
<meta name="description" content="Powerful Python script to batch convert EPUBs into clean, readable plain text. Adds paragraph spacing and folder processing, suitable for LLM use.">
<meta name="keywords" content="EPUB to TXT, EPUB converter, Python script, batch conversion, ebook text extraction, open-source tool">
<meta name="author" content="SPACESODA">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://spacesoda.github.io/epub2txt/">
<meta property="og:title" content="epub2txt - Convert EPUB to Text Efficiently">
<meta property="og:description" content="Batch-convert ebooks into LLM-friendly plain text with automatic formatting and low memory usage, ideal for large libraries.">
<!-- <meta property="og:image" content=""> -->
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://spacesoda.github.io/epub2txt/">
<meta property="twitter:title" content="epub2txt - Convert EPUB to Text Efficiently">
<meta property="twitter:description" content="Batch-convert ebooks into LLM-friendly plain text with automatic formatting and low memory usage.">
<!-- Fonts & Styles -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="css/style.css">
<!-- Umami Analytics -->
<script defer src="https://cloud.umami.is/script.js" data-website-id="8771ed9f-edd3-4665-bf16-1bc95940af08"></script>
<!-- JSZip & Custom Script -->
<script defer src="https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js"></script>
<script defer src="app/epub2txt.js"></script>
</head>
<body>
<div class="container">
<header>
<a class="logo" href="./">epub2txt</a>
<div class="header-links">
<div class="lang-group">
<a href="index.html" class="lang-switch active">EN</a>
<span class="lang-separator">|</span>
<a href="ja/" class="lang-switch">JP</a>
<span class="lang-separator">|</span>
<a href="zh/" class="lang-switch">中文</a>
</div>
<a href="https://github.com/SPACESODA/epub2txt" class="github-link" target="_blank" rel="noopener">
<span class="github-text">GitHub</span>
<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.655-3.795-1.275-3.795-1.275-.54-1.38-1.335-1.755-1.335-1.755-1.095-.75.075-.735.075-.735 1.215.09 1.845 1.245 1.845 1.245 1.08 1.86 2.835 1.32 3.525 1.005.105-.795.42-1.32.765-1.635-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405 1.02 0 2.04.135 3 .405 2.28-1.56 3.285-1.23 3.285-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.285 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
</svg>
</a>
</div>
</header>
<div class="promo-banner">
<a href="https://spacesoda.github.io/pdf2txt/" data-umami-event="epub | pdf2txt Banner">Convert PDFs -></a>
</div>
<section class="hero">
<h1>Convert EPUB to Text<br>Efficiently using epub2txt</h1>
<p>A powerful open-source Python script that converts EPUBs into clean, Markdown-compatible text ideal for LLMs.</p>
<div class="hero-buttons">
<a href="https://github.com/SPACESODA/epub2txt" class="cta-button primary" data-umami-event="epub | Get Script Button">Get the Script</a>
<a href="#app" class="cta-button secondary" data-umami-event="epub | Go to Converter Button">Convert Online</a>
</div>
</section>
<section class="features">
<div class="feature-card">
<div class="icon">⚡️</div>
<h3>Super Fast</h3>
<p>Process hundreds of books in seconds efficiently that barely consumes your RAM.</p>
</div>
<div class="feature-card">
<div class="icon">📂</div>
<h3>Batch Processing</h3>
<p>Convert single files, list of files, or entire folders of books in one single command.</p>
</div>
<div class="feature-card">
<div class="icon">✨</div>
<h3>Auto Formatting</h3>
<p>Automatically preserves structure and adds spacing for a clean, comfortable reading experience.</p>
</div>
</section>
<section class="showcase">
<h2>Easy to Use</h2>
<p class="section-intro">With the helper scripts included, follow the <a href="https://github.com/SPACESODA/epub2txt#readme">README</a> instructions to run the Python script in just a few steps.</p>
<div class="code-block code-block-spacer">
<div class="code-title">Convert a single file</div>
<div class="code-content">
<span class="prompt">$</span> <span class="cmd">./run.sh</span> <span class="arg">my_book.epub</span>
</div>
</div>
<div class="code-block">
<div class="code-title">Convert whole folders</div>
<div class="code-content">
<span class="prompt">$</span> <span class="cmd">./run.sh</span> <span class="arg">/Books/SciFi/</span> <span class="arg">/Books/History/</span><br>
<span class="comment">Scanning folder: /Books/SciFi/</span><br>
<span class="comment">Found 12 EPUBs.</span><br>
<span class="comment">...</span>
</div>
</div>
</section>
<section id="app" class="converter-section">
<h2>Convert Online</h2>
<p class="section-intro">Powered by the same logic as the Python script, running securely in your browser. Convert one file or multiple files at once!</p>
<div class="converter-card">
<div id="drop-zone" class="drop-zone">
<div class="drop-content">
<div class="icon">📂</div>
<h2>Drag & Drop EPUB files here</h2>
<p>or click to select</p>
<input type="file" id="file-input" accept=".epub" multiple hidden>
</div>
<div id="loading-state" class="hidden">
<div class="spinner"></div>
<p id="status-text">Processing...</p>
</div>
<div id="success-state" class="hidden">
<div class="icon success">✅</div>
<h2 id="success-filename">book.txt</h2>
<button id="download-btn" class="cta-button primary" data-umami-event="epub | Download TXT Button">Download TXT</button>
</div>
<div id="error-state" class="hidden">
<div class="icon error">⚠️</div>
<p id="error-msg">An unexpected error occurred</p>
<button id="retry-btn" class="cta-button secondary">Try Again</button>
</div>
</div>
<div id="reset-container" class="reset-container"></div>
</div>
</section>
</div>
<footer>
<div class="container">
<p>© <a href="https://github.com/SPACESODA" target="_blank" rel="noopener">SPACESODA</a> / <a href="https://github.com/realanthonyc" target="_blank" rel="noopener">ANTHONYC</a></p>
<p class="footer-github"><a href="https://github.com/SPACESODA/epub2txt" target="_blank" rel="noopener">★ Star on GitHub</a></p>
<nav class="footer-menu" aria-label="Related tools">
<div class="footer-menu-row">
<a href="https://spacesoda.github.io/epub2txt/" target="_blank" rel="noopener noreferrer" class="footer-current">EPUB to TXT</a>
<span class="footer-separator">|</span>
<a href="https://spacesoda.github.io/pdf2txt/" target="_blank" rel="noopener noreferrer">PDF to TXT</a>
<span class="footer-separator">|</span>
<a href="https://spacesoda.github.io/youtube2txt/" target="_blank" rel="noopener noreferrer">YouTube to TXT</a>
</div>
<div class="footer-menu-row">
<a href="https://spacesoda.github.io/read-txt/" target="_blank" rel="noopener noreferrer">Read TXT</a>
</div>
</nav>
</div>
</footer>
</body>
</html>