mirror of
https://github.com/tiennm99/MTTools.git
synced 2026-10-05 18:14:34 +00:00
1da14cd8ab1dfd4ae30983255217b1ad1ee1b385
Fetches every chapter of a monkeydd.com novel and renders it as a single
PDF laid out for reading on a phone.
Two site behaviours drive the extractor design:
- Roughly a fifth of each chapter's words are not in the markup. The page
emits empty spans and supplies the word from the stylesheet via
":before { content: ... }" rules, so reading DOM text alone drops them
with no error. The extractor resolves those rules and substitutes the
words back; a test asserts they disappear when the rule is removed.
- Chapter URLs cannot be generated. Numbering has gaps and slugs are not
uniform across novels, so chapter links are always parsed from the page.
The chapter list is read from the landing page and cross-checked against
the dropdown embedded in each chapter page, so a truncated list cannot
silently shorten the export.
PDF defaults to a 90x160mm page rather than A4 with large type: viewers
scale a whole page to fit the screen, so a phone-shaped page fills it at
100% zoom where 12pt stays comfortable. A5 and A4 remain available.
Requests are spaced globally, so raising worker count does not raise the
request rate. Raw pages cache to disk so re-exporting at different font
or page settings needs no network.
MTTools
Personal toolbox — small utilities and scripts, each formerly a standalone repository, merged here with full history.
| Directory | Tool | Language |
|---|---|---|
utils/ |
Utility batch and shell scripts to make life easier (or harder) | Batch/Shell |
go-util/ |
Miscellaneous CLI scripts (Gitea org cleanup, etc.), multi-binary cmd/ layout |
Go |
export-chrome-cookies/ |
Export Google Chrome cookies on Windows | Python |
miti-scraper/ |
Configurable single-site web scraper | Go |
circular-dependency-checker/ |
Detects cyclic dependencies in Godot projects | Python |
image-resizer/ |
Batch image resizer CLI — scales to a percentage, keeps aspect ratio | Go |
webp-converter/ |
HTTP microservice converting WebP images to PNG on-the-fly | Go |
update-dns/ |
Updates Cloudflare DNS records with your current dynamic IP | Shell |
ghibli-gallery-crawler/ |
Downloads the Studio Ghibli image gallery | Go |
crawl-prime/ |
Crawls large prime numbers from compoasso.free.fr | Go |
fbcount/ |
Counts messages per person in a Facebook data export | Node.js, Python |
bulk-telegram-sticker/ |
Creates Telegram stickers in bulk from images | Python |
Unmerged Go-rewrite drafts live on feature/export-chrome-cookies-go,
feature/circular-dependency-checker-go, and feature/bulk-telegram-sticker-go.
Description
Personal toolbox — utility scripts and small CLI tools (shell/batch, Go, Python, Node.js), merged from standalone repos with full history
16 MiB
0 Stars
1 Watchers
0 Forks
Languages
Go
75%
Python
22.9%
Shell
0.8%
JavaScript
0.7%
Dockerfile
0.4%
Other
0.2%