-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
776 lines (630 loc) · 32.6 KB
/
index.html
File metadata and controls
776 lines (630 loc) · 32.6 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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ricardo Decal's Tools</title>
<style>
:root {
--bg: #ffffff;
--text: #24292f;
--link: #0969da;
--border: #d0d7de;
--code-bg: #f6f8fa;
--category-bg: #f6f8fa;
--tool-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0d1117;
--text: #c9d1d9;
--link: #58a6ff;
--border: #30363d;
--code-bg: #161b22;
--category-bg: #161b22;
--tool-bg: #0d1117;
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family:
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
"Noto Sans",
Helvetica,
Arial,
sans-serif;
line-height: 1.6;
color: var(--text);
background: var(--bg);
padding: 2rem 1rem;
}
.container {
max-width: 800px;
margin: 0 auto;
}
h1 {
font-size: 2.5rem;
margin-bottom: 0.5rem;
font-weight: 600;
}
.subtitle {
color: var(--text);
opacity: 0.7;
margin-bottom: 2rem;
font-size: 1.1rem;
}
.section {
margin: 2rem 0;
}
h2 {
font-size: 1.5rem;
margin: 2rem 0 1rem;
padding-bottom: 0.3rem;
border-bottom: 1px solid var(--border);
}
h2 a {
color: var(--text);
text-decoration: none;
}
h2 a:hover {
color: var(--link);
text-decoration: underline;
}
p {
margin: 1rem 0;
}
code {
background: var(--code-bg);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family:
ui-monospace,
SFMono-Regular,
"SF Mono",
Menlo,
Consolas,
monospace;
font-size: 0.9em;
}
pre {
background: var(--code-bg);
padding: 1rem;
border-radius: 6px;
overflow-x: auto;
margin: 1rem 0;
}
pre code {
background: none;
padding: 0;
}
a {
color: var(--link);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.repo-link {
display: inline-block;
margin-top: 1rem;
padding: 0.5rem 1rem;
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 6px;
font-weight: 500;
}
.tools-list {
margin: 1rem 0;
padding-left: 2rem;
}
.tools-list li {
margin: 0.5rem 0;
}
.tool {
margin-top: 3rem;
}
/* Category-level details (outer) */
details.category {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1rem;
margin: 1rem 0;
background: var(--category-bg);
}
details.category[open] {
padding-bottom: 1rem;
}
details.category > summary {
cursor: pointer;
font-weight: 600;
font-size: 1.2rem;
user-select: none;
list-style: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
details.category > summary::-webkit-details-marker {
display: none;
}
details.category > summary::before {
content: '▶';
display: inline-block;
transition: transform 0.2s;
font-size: 0.8em;
}
details.category[open] > summary::before {
transform: rotate(90deg);
}
details.category > summary:hover {
color: var(--link);
}
/* Tool-level details (nested inside category) */
details.tool {
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.5rem 0.75rem;
margin: 0.5rem 0;
margin-left: 1.5rem;
background: var(--tool-bg);
}
details.tool[open] {
padding-bottom: 0.75rem;
}
details.tool > summary {
cursor: pointer;
font-weight: 500;
font-size: 1rem;
user-select: none;
list-style: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
details.tool > summary::-webkit-details-marker {
display: none;
}
details.tool > summary::before {
content: '▸';
display: inline-block;
transition: transform 0.2s;
font-size: 0.7em;
}
details.tool[open] > summary::before {
transform: rotate(90deg);
}
details.tool > summary:hover {
color: var(--link);
}
details.tool .content {
margin-top: 0.75rem;
padding-left: 1rem;
}
details.tool pre {
margin: 0.5rem 0;
font-size: 0.85em;
}
kbd {
display: inline-block;
padding: 0.15rem 0.4rem;
font-size: 0.7em;
font-family: inherit;
font-weight: 500;
line-height: 1;
color: var(--text);
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 4px;
vertical-align: middle;
margin-left: 0.5rem;
}
/* HTML page entries (non-collapsible, styled like tools) */
.page {
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.75rem 1rem;
margin: 0.5rem 0;
margin-left: 1.5rem;
background: var(--tool-bg);
}
.page p {
margin: 0.25rem 0;
}
.page p:first-child {
font-weight: 500;
}
/* Fallback for any details without a class */
details:not(.category):not(.tool) {
border: 1px solid var(--border);
border-radius: 6px;
padding: 0.75rem 1rem;
margin: 0.75rem 0;
background: var(--code-bg);
}
details:not(.category):not(.tool)[open] {
padding-bottom: 1rem;
}
details:not(.category):not(.tool) > summary {
cursor: pointer;
font-weight: 600;
font-size: 1.1rem;
user-select: none;
list-style: none;
display: flex;
align-items: center;
gap: 0.5rem;
}
details:not(.category):not(.tool) > summary::-webkit-details-marker {
display: none;
}
details:not(.category):not(.tool) > summary::before {
content: '▶';
display: inline-block;
transition: transform 0.2s;
font-size: 0.8em;
}
details:not(.category):not(.tool)[open] > summary::before {
transform: rotate(90deg);
}
details:not(.category):not(.tool) > summary:hover {
color: var(--link);
}
details:not(.category):not(.tool) .content {
margin-top: 1rem;
padding-left: 1.3rem;
}
footer {
margin-top: 3rem;
padding-top: 2rem;
border-top: 1px solid var(--border);
text-align: center;
font-size: 0.9em;
color: var(--text);
opacity: 0.7;
}
footer p {
margin: 0.5rem 0;
}
footer a {
color: var(--link);
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h1>Ricardo Decal's Tools</h1>
<p class="subtitle">Simple, self-contained, and immediately runnable</p>
<p>A collection of simple, self-contained tools in two flavors:</p>
<ul>
<li><strong>Scripts</strong> — Python CLI tools runnable with <code>uv run https://tools.ricardodecal.com/python/foo.py</code>, which spawns a self-contained and ephemeral <a href="https://github.com/astral-sh/uv"><code>uv</code></a> environment.</li>
<li><strong>Pages</strong> — Single-file HTML tools that run entirely in your browser at <code>https://tools.ricardodecal.com/html/foo.html</code>.</li>
</ul>
<p>This is an experiment in low-stakes vibe coding. The code lives in <a href="https://github.com/crypdick/tools"><code>crypdick/tools</code></a>.</p>
<p>Inspired by <a href="https://github.com/simonw/tools">Simon Willison's tools collection</a>.</p>
<h2>Available Tools</h2>
<details class="category">
<summary><strong>📊 Data Processing</strong> (7 scripts, 2 pages)</summary>
<details class="tool">
<summary><a href="python/convert_arrow_to_parquet_streaming.py"><code>convert_arrow_to_parquet_streaming.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/convert_arrow_to_parquet_streaming.py --help</code>:
<pre><code>
Usage: convert_arrow_to_parquet_streaming.py [OPTIONS]
Convert Arrow shards to Parquet.
- Discovers all .arrow files under a given source directory
- Converts each file to Parquet
- Uses streaming in order to keep memory bounded and convert files larger than
available RAM
- Handles both Arrow IPC File and Stream formats (tries file, falls back to
stream)
Notes:
- Use --preserve-subdirs to mirror the input directory tree under the output
dir.
- Use --overwrite to re-create files; otherwise existing outputs are skipped.
Arguments:
SOURCE_DIR: Directory containing .arrow files.
OUTPUT_DIR: Directory to write .parquet files.
Examples:
uv run https://tools.ricardodecal.com/python/convert_arrow_to_parquet_streaming.py --source-dir
./arrow_data --output-dir ./parquet_data
uv run https://tools.ricardodecal.com/python/convert_arrow_to_parquet_streaming.py --source-dir
./arrow_data --output-dir ./parquet_data --preserve-subdirs
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ * --source-dir DIRECTORY Directory containing .arrow files │
│ [required] │
│ --output-dir DIRECTORY Directory to write .parquet files │
│ [default: parq_convert] │
│ --overwrite Overwrite existing parquet files │
│ --preserve-subdirs Preserve input subdirectory │
│ structure inside output dir │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<details class="tool">
<summary><a href="python/count_parquet_rows.py"><code>count_parquet_rows.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/count_parquet_rows.py --help</code>:
<pre><code>
Usage: count_parquet_rows.py [OPTIONS] DATASET_PATH
Count the number of rows in a parquet file/dataset without reading data into
memory.
Works by reading just the metadata headers. Supports:
- Single parquet files
- Directories of parquet shards
- Hive-style partitioned datasets
- Local paths and S3 URIs
Arguments:
DATASET_PATH: Local file path or S3 URI to the parquet dataset.
Examples:
# Local file
uv run https://tools.ricardodecal.com/python/count_parquet_rows.py
./data.parquet
# Directory of shards
uv run https://tools.ricardodecal.com/python/count_parquet_rows.py
./data_dir/
# S3 URI
uv run https://tools.ricardodecal.com/python/count_parquet_rows.py
s3://my-bucket/data.parquet
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * dataset_path TEXT Local file path or S3 URI. [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<details class="tool">
<summary><a href="python/dedup_dirs.py"><code>dedup_dirs.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/dedup_dirs.py --help</code>:
<pre><code>
Usage: dedup_dirs.py [OPTIONS] OLD_DIR NEW_DIR
Find duplicate files between OLD_DIR and NEW_DIR, optionally deleting from
OLD_DIR.
Compares files by path and content. For large files (>10MB), uses sampling
for speed. For smaller files, compares MD5 hashes. Runs in parallel for
performance on large directory trees.
Without --delete, runs in dry-run mode showing what would be deleted.
With --delete, removes identical files from OLD_DIR and cleans up empty
directories.
Arguments:
OLD_DIR: Source directory to deduplicate (files deleted from here).
NEW_DIR: Reference directory to compare against (untouched).
Examples:
# Dry run - see what would be deleted
uv run https://tools.ricardodecal.com/python/dedup_dirs.py ~/old-backup
~/new-backup
# Actually delete duplicates
uv run https://tools.ricardodecal.com/python/dedup_dirs.py ~/old-backup
~/new-backup --delete
# Use more workers for faster processing
uv run https://tools.ricardodecal.com/python/dedup_dirs.py ~/old ~/new
--delete -w 16
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * old_dir PATH Source directory to deduplicate (files deleted from │
│ here). │
│ [required] │
│ * new_dir PATH Reference directory to compare against (untouched). │
│ [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --delete Actually delete identical files (default is dry │
│ run). │
│ --workers -w INTEGER Number of parallel workers. [default: 8] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<details class="tool">
<summary><a href="python/download_video.py"><code>download_video.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/download_video.py --help</code>:
<pre><code>
Usage: download_video.py [OPTIONS] URL
Download a video from a supported platform (Twitter/X, YouTube, etc.).
Uses yt-dlp to download videos from a wide variety of websites.
Twitter "GIFs" are actually MP4 videos, which this tool can also download.
Arguments:
URL: The URL of the video page (e.g., Twitter post, YouTube video).
Examples:
uv run https://tools.ricardodecal.com/python/download_video.py
https://x.com/SemiAnalysis_/status/1990449859321888935
uv run https://tools.ricardodecal.com/python/download_video.py
https://www.youtube.com/watch?v=dQw4w9WgXcQ --output my_video.mp4
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * url TEXT The URL of the video page. [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --output -o TEXT Output filepath (file or directory). Defaults to │
│ 'Title [ID].mp4' in current directory. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<div class="page">
<p><a href="html/html_to_text.html"><code>html_to_text.html</code></a> <kbd>page</kbd></p>
<p><a href="https://tools.ricardodecal.com/html/html_to_text.html">https://tools.ricardodecal.com/html/html_to_text.html</a><br>Paste HTML and extract readable plain text. Runs entirely in your browser.</p>
</div>
<details class="tool">
<summary><a href="python/html_to_text.py"><code>html_to_text.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/html_to_text.py --help</code>:
<pre><code>
Usage: html_to_text.py [OPTIONS] URL
Fetch a webpage and convert its readable content to plain text.
Uses Readability-style boilerplate removal by default, with conservative
fallbacks.
Then uses inscriptis to render HTML to text while preserving basic structure.
Automatically adds https:// if no scheme is provided.
Arguments:
URL: The webpage URL to fetch (e.g., example.com or https://example.com).
Examples:
uv run https://tools.ricardodecal.com/python/html_to_text.py example.com
uv run https://tools.ricardodecal.com/python/html_to_text.py
https://news.ycombinator.com --timeout 30
uv run https://tools.ricardodecal.com/python/html_to_text.py
wikipedia.org/wiki/Python --raw
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * url TEXT The webpage URL to fetch. [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --timeout -t INTEGER Request timeout in seconds. │
│ [default: 15] │
│ --mode -m [auto|readability|heuristi Extraction mode: auto │
│ c|full] (default), readability │
│ (boilerplate removal), │
│ heuristic (semantic tags), │
│ or full (whole page). │
│ [default: auto] │
│ --min-chars INTEGER RANGE [x>=0] Minimum extracted text │
│ length to accept before │
│ falling back (auto mode). │
│ [default: 200] │
│ --min-ratio FLOAT RANGE [0.0<=x<=1.0] Minimum extracted/full text │
│ length ratio to accept │
│ before falling back (auto │
│ mode). │
│ [default: 0.2] │
│ --raw Skip whitespace cleanup │
│ (preserve original │
│ formatting). │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<div class="page">
<p><a href="html/strip_pdf_metadata.html"><code>strip_pdf_metadata.html</code></a> <kbd>page</kbd></p>
<p><a href="https://tools.ricardodecal.com/html/strip_pdf_metadata.html">https://tools.ricardodecal.com/html/strip_pdf_metadata.html</a><br>Remove author, title, timestamps, and other metadata from PDF files. Runs entirely in your browser — files never leave your device.</p>
</div>
<details class="tool">
<summary><a href="python/strip_pdf_metadata.py"><code>strip_pdf_metadata.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/strip_pdf_metadata.py --help</code>:
<pre><code>
Usage: strip_pdf_metadata.py [OPTIONS] INPUT_FILE [OUTPUT_FILE]
Strip metadata from a PDF file.
If OUTPUT_FILE is not provided, writes to 'stripped_<INPUT_FILE>'.
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * input_file FILE Input PDF file. [required] │
│ output_file [OUTPUT_FILE] Output PDF file. Defaults to │
│ 'stripped_<INPUT_FILE>'. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<details class="tool">
<summary><a href="python/yt_transcript.py"><code>yt_transcript.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/yt_transcript.py --help</code>:
<pre><code>
Usage: yt_transcript.py [OPTIONS] URL [OUTPUT_FILE]
Download transcripts from a YouTube URL (video or playlist) to a single file.
Arguments:
URL: YouTube video or playlist URL.
OUTPUT_FILE: Path to save the transcript text. Defaults to transcript.txt.
Examples:
uv run https://tools.ricardodecal.com/python/yt_transcript.py "https://youtu.be/..."
uv run https://tools.ricardodecal.com/python/yt_transcript.py "https://youtube.com/playlist?list=..."
out.txt
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * url TEXT YouTube video or playlist URL. │
│ [required] │
│ output_file [OUTPUT_FILE] Path to save the transcript text. │
│ Defaults to transcript.txt. │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --lang -l TEXT Language codes to prefer (e.g. -l en -l fr) │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
</details>
<details class="category">
<summary><strong>🛠️ Development</strong> (2 scripts)</summary>
<details class="tool">
<summary><a href="python/burn_iso.py"><code>burn_iso.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/burn_iso.py --help</code>:
<pre><code>
Usage: burn_iso.py [OPTIONS] ISO_FILE
Burn an ISO file to a USB drive with safety checks and progress monitoring.
This tool will verify the ISO file, check the target device, unmount any
mounted partitions, and burn the ISO using dd with progress reporting.
DANGER: This will completely erase all data on the target USB device!
Arguments:
ISO_FILE: Path to the ISO file to burn.
Examples:
uv run https://tools.ricardodecal.com/python/burn_iso.py --list
uv run https://tools.ricardodecal.com/python/burn_iso.py ubuntu.iso
--device /dev/sdb --dry-run
uv run https://tools.ricardodecal.com/python/burn_iso.py
~/Downloads/debian.iso -d /dev/sdc
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * iso_file FILE Path to the ISO file to burn. [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --device -d TEXT USB device path (e.g., /dev/sdb). Use --list to see │
│ available devices. │
│ --list List available block devices and exit. │
│ --dry-run -n Show what would be done without actually doing it. │
│ --force -f Skip confirmation prompts. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
<details class="tool">
<summary><a href="python/ipynb_to_py_sphinx.py"><code>ipynb_to_py_sphinx.py</code></a> <kbd>python</kbd></summary>
<div class="content">
Output of <code>uv run https://tools.ricardodecal.com/python/ipynb_to_py_sphinx.py --help</code>:
<pre><code>
Usage: ipynb_to_py_sphinx.py [OPTIONS] NOTEBOOK
Convert a Jupyter notebook to a Sphinx Gallery Python script.
This tool converts a .ipynb file to a .py file formatted for Sphinx Gallery.
It converts Markdown cells to RST (using pypandoc) and comments them out,
while preserving code cells. It also handles magic commands by commenting them
out.
Based on: https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe
Arguments:
NOTEBOOK: The path to the input Jupyter notebook (.ipynb).
Examples:
uv run https://tools.ricardodecal.com/python/ipynb_to_py_sphinx.py
notebook.ipynb
uv run https://tools.ricardodecal.com/python/ipynb_to_py_sphinx.py
notebook.ipynb --output my_gallery_script.py
╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ * notebook PATH The path to the input Jupyter notebook (.ipynb). │
│ [required] │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --output -o PATH Output Python file path. Defaults to notebook name │
│ with .py extension. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────╯</code></pre>
</div>
</details>
</details>
<footer>
<p>Made by Ricardo Decal • Updated January 06, 2026</p>
<p>
<a href="https://ricardodecal.com">ricardodecal.com</a> |
<a href="https://github.com/crypdick/tools">View on GitHub</a> |
<a href="https://github.com/crypdick/tools/blob/main/index.html">View source</a>
</p>
<p><a href="LICENSE">Apache 2.0 License</a></p>
</footer>
</div>
</body>
</html>