-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_docs.py
More file actions
299 lines (279 loc) Β· 11.8 KB
/
build_docs.py
File metadata and controls
299 lines (279 loc) Β· 11.8 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#!/usr/bin/env python3
"""
Build HTML sales page from markdown and assets.
"""
import sys
from pathlib import Path
BASE_DIR = Path(__file__).parent
HTML_TEMPLATE = r"""<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Automation Scripts β 10 Essential Tools β $5</title>
<meta name="description" content="10 powerful Python automation scripts for image processing, data conversion, file organization, URL checking, and system cleaning. Just $5.">
<style>
* {{ margin: 0; padding: 0; box-sizing: border-box; }}
body {{
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
line-height: 1.6;
color: #1a1a2e;
background: #f8f9fa;
}}
.container {{ max-width: 900px; margin: 0 auto; padding: 0 20px; }}
.hero {{
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
color: #fff;
padding: 60px 0;
text-align: center;
}}
.hero h1 {{ font-size: 2.5em; margin-bottom: 10px; }}
.hero .subtitle {{ font-size: 1.2em; opacity: 0.9; margin-bottom: 20px; }}
.hero .price {{
display: inline-block;
background: #e94560;
color: #fff;
padding: 12px 40px;
border-radius: 40px;
font-size: 1.5em;
font-weight: bold;
margin-top: 10px;
}}
.cta-button {{
display: inline-block;
background: #ffd700;
color: #1a1a2e;
padding: 15px 50px;
border-radius: 40px;
font-size: 1.2em;
font-weight: bold;
text-decoration: none;
margin-top: 20px;
transition: transform 0.2s, box-shadow 0.2s;
}}
.cta-button:hover {{
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}}
section {{ padding: 40px 0; }}
section:nth-child(even) {{ background: #fff; }}
h2 {{ font-size: 1.8em; margin-bottom: 20px; color: #16213e; }}
.features {{
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
margin-top: 20px;
}}
.feature-card {{
background: #f8f9fa;
border: 1px solid #e0e0e0;
border-radius: 10px;
padding: 20px;
transition: box-shadow 0.2s;
}}
.feature-card:hover {{ box-shadow: 0 4px 15px rgba(0,0,0,0.1); }}
.feature-card h3 {{ color: #0f3460; margin-bottom: 8px; }}
.feature-card .cmd {{
background: #1a1a2e;
color: #00ff88;
padding: 6px 10px;
border-radius: 5px;
font-family: 'Courier New', monospace;
font-size: 0.85em;
display: inline-block;
margin: 5px 0;
}}
.testimonial {{
background: #eef1f5;
border-left: 4px solid #0f3460;
padding: 15px 20px;
border-radius: 5px;
margin: 15px 0;
font-style: italic;
}}
.faq-item {{
border-bottom: 1px solid #e0e0e0;
padding: 15px 0;
}}
.faq-item h3 {{ cursor: pointer; color: #0f3460; }}
.faq-item p {{ margin-top: 8px; color: #555; }}
.install-code {{
background: #1a1a2e;
color: #00ff88;
padding: 15px;
border-radius: 8px;
font-family: 'Courier New', monospace;
overflow-x: auto;
margin: 10px 0;
}}
footer {{
background: #1a1a2e;
color: #fff;
text-align: center;
padding: 30px 0;
font-size: 0.9em;
}}
.paypal-btn {{
display: inline-flex;
align-items: center;
gap: 10px;
background: #00457C;
color: #fff;
padding: 14px 40px;
border-radius: 30px;
text-decoration: none;
font-weight: bold;
font-size: 1.1em;
transition: background 0.2s;
}}
.paypal-btn:hover {{ background: #00305c; }}
@media (max-width: 600px) {{
.hero h1 {{ font-size: 1.8em; }}
.features {{ grid-template-columns: 1fr; }}
}}
</style>
</head>
<body>
<header class="hero">
<div class="container">
<h1>π Python Automation Scripts</h1>
<p class="subtitle">10 powerful, ready-to-run scripts for file, data & system automation</p>
<div class="price">$5</div>
<br>
<a href="https://paypal.me/quisware/5" class="cta-button">β Buy Now β $5</a>
<p style="margin-top: 10px; opacity: 0.7; font-size: 0.9em;">Instant download after payment</p>
</div>
</header>
<section>
<div class="container">
<h2>π¦ What's Inside</h2>
<p>Ten standalone Python scripts β each one solves a real-world automation problem. No bloat, no frameworks, just clean, well-documented code with <code>--help</code> support.</p>
<div class="features">
<div class="feature-card">
<h3>πΌοΈ image-resizer.py</h3>
<p>Bulk resize images to a max width/height or by percentage. Uses Pillow with LANCZOS filtering.</p>
<span class="cmd">python image-resizer.py ./photos --width 800</span>
</div>
<div class="feature-card">
<h3>π csv-to-json.py</h3>
<p>Convert CSV files to JSON with pretty-print support and custom delimiter handling.</p>
<span class="cmd">python csv-to-json.py data.csv --pretty</span>
</div>
<div class="feature-card">
<h3>π folder-sync.py</h3>
<p>Two-way folder sync that mirrors deletions. Supports dry-run, exclusions, and hidden file ignoring.</p>
<span class="cmd">python folder-sync.py ./src ./backup --dry-run</span>
</div>
<div class="feature-card">
<h3>π text-search.py</h3>
<p>Recursive grep-like text search with context lines, regex, extension filtering, and binary file skipping.</p>
<span class="cmd">python text-search.py "TODO" ./src --context 3</span>
</div>
<div class="feature-card">
<h3>π url-checker.py</h3>
<p>Check if URLs are alive with concurrent checking, redirect tracking, and timeout control.</p>
<span class="cmd">python url-checker.py --file urls.txt</span>
</div>
<div class="feature-card">
<h3>βοΈ file-splitter.py</h3>
<p>Split large files by line count or byte size. Preserves CSV headers across chunks.</p>
<span class="cmd">python file-splitter.py big.csv --lines 5000</span>
</div>
<div class="feature-card">
<h3>π
date-organizer.py</h3>
<p>Organize files into YYYY/MM/DD folders by modification or creation date. Move or copy mode.</p>
<span class="cmd">python date-organizer.py ~/Downloads --move</span>
</div>
<div class="feature-card">
<h3>π¨ color-extract.py</h3>
<p>Extract dominant colors from images with hex/RGB output and optional preview.</p>
<span class="cmd">python color-extract.py photo.jpg --colors 10</span>
</div>
<div class="feature-card">
<h3>π json-to-csv.py</h3>
<p>Flatten nested JSON objects into CSV with dot-notation keys. Handles arrays and nested dicts.</p>
<span class="cmd">python json-to-csv.py data.json</span>
</div>
<div class="feature-card">
<h3>π§Ή system-cleaner.py</h3>
<p>Find and clean temp files, cache directories, and empty folders. Age and size filters.</p>
<span class="cmd">python system-cleaner.py ~/Downloads --clean --max-age 30</span>
</div>
</div>
</div>
</section>
<section>
<div class="container">
<h2>β‘ Quick Start</h2>
<div class="install-code">
# Clone or download the pack
git clone https://github.com/quisware/python-automation-scripts.git
# Install dependencies (if needed)
pip install pillow requests numpy
# Run any script with --help
python image-resizer.py --help
</div>
</div>
</section>
<section>
<div class="container">
<h2>π‘ Why You Need This</h2>
<div class="testimonial">
"I use the URL checker and folder sync scripts every day. Saved me hours of manual work."<br>
<small>β Alex, DevOps Engineer</small>
</div>
<div class="testimonial">
"The image resizer alone was worth it. Batch processing hundreds of product photos in seconds."<br>
<small>β Maria, E-commerce Manager</small>
</div>
</div>
</section>
<section>
<div class="container">
<h2>β FAQ</h2>
<div class="faq-item">
<h3>Do I need to install anything?</h3>
<p>Python 3.8+ is required. Three scripts need extra packages (Pillow, requests, numpy) β pip install them in seconds.</p>
</div>
<div class="faq-item">
<h3>Do these work on Windows / Mac / Linux?</h3>
<p>Yes! All scripts are cross-platform and tested on Windows, macOS, and Linux.</p>
</div>
<div class="faq-item">
<h3>What do I get for $5?</h3>
<p>You get all 10 scripts with full source code, a detailed README with examples, and a docs site. Free updates forever.</p>
</div>
<div class="faq-item">
<h3>Can I use these commercially?</h3>
<p>Absolutely. MIT licensed β use them in your projects, at work, or modify them as you like.</p>
</div>
</div>
</section>
<section style="text-align: center;">
<div class="container">
<h2>π Get Your Copy Now</h2>
<p style="margin: 15px 0 25px;">One low price. 10 professional scripts. Lifetime value.</p>
<a href="https://paypal.me/quisware/5" class="paypal-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white"><path d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106z"/><path d="M19.425 6.344c-.089.546-.247 1.066-.475 1.552-1.815 3.86-5.615 5.184-10.04 5.184H6.72c-.524 0-.968.382-1.05.9L4.57 20.72l-.338 2.16c-.08.517.292.957.81.957h4.415c.44 0 .816-.323.886-.758l.68-4.31c.07-.435.446-.758.886-.758h1.86c4.352 0 7.76-1.765 8.76-6.868.413-2.112.2-3.888-.843-4.999-1.01-1.074-2.567-1.38-4.36-.78z" opacity=".3"/></svg>
Buy with PayPal β $5
</a>
<p style="margin-top: 10px; font-size: 0.85em; color: #888;">Secure payment. Instant access.</p>
</div>
</section>
<footer>
<div class="container">
<p>Python Automation Scripts Pack</p>
<p><a href="https://paypal.me/quisware/5" style="color: #ffd700;">Support the creator</a></p>
<p style="margin-top: 10px; opacity: 0.6;">© 2026 β MIT Licensed</p>
</div>
</footer>
</body>
</html>"""
def main():
index_path = BASE_DIR / "docs" / "index.html"
index_path.parent.mkdir(parents=True, exist_ok=True)
with open(index_path, "w", encoding="utf-8") as f:
f.write(HTML_TEMPLATE)
print(f"Sales page created: {index_path}")
if __name__ == "__main__":
main()