|
On This Page
|
May 2026 · What I've Been Up ToStats, emojis, SEO, comments, Markdown Stats Page & Visitor CounterAt the end of April, I got the idea to build a stats page for the blog. Initially just an hourly distribution heatmap, but the requirements kept growing: daily bar charts, monthly trends, crawler sources, visitor loyalty... ASCII world map. Used DB-IP's free city-level IP database (8 million rows), batch-parsed visitor IP coordinates through a single file scan, then overlaid density characters onto map.txt. Used Pillow to generate an 88×31 pixel LED seven-segment animated counter. 12-frame loop, scanline scrolling, glow effect, breathing light. Each homepage visit auto-updates the count and regenerates the image. Logic is isolated in scripts/counter.py.Added psutil for CPU, memory, disk, and uptime reading, with a ctypes fallback for systems without psutil. Comprehensive SEO Optimization<html lang="zh/en"><title>, auto-generated <meta description> (extracted from first body paragraph), <meta keywords> (extracted from tags)<link rel="canonical"> + <link rel="alternate" hreflang="..."> Chinese-English cross-linking<font size="6"> auto-wrapped with <h1>, <font size="5"> with <h2>/.well-known/security.txt (RFC 9116)IE 5.5 Compatibility AuditIn early May, I used AI to conduct a full-site compatibility audit, uncovering 30+ incompatibilities: Guestbook Improvements#N, displayed in gray on the right@xxx[#N], build process auto-strips reference numbersdata/runtime/banned_words.json, auto-replaced with <em>*</em><font> tag pollutionArticle Comment SystemAdded comment sections to each blog post using a hybrid approach: CGI handles submission + build-time injection of existing comments. Supports threaded replies (unlimited nesting), emojis, IP toggle. Submission redirects with 302 back to the comment anchor, with background async build. Page-type ( Email System Optimization[em07] is converted to <img> tags pointing to GIFs on the server.src/components/cgi/mailer-email.html, using {variable} placeholders.Markdown Blog SupportAll 50+ blog posts and standalone pages converted from HTML to Markdown. Created Web Server OptimizationCache-Control: max-age=86400 + Expires: 2030nolog and nocount/.well-known/ support addedProject Structure Cleanupdata/ layered: runtime/ (manually maintained), build/ (auto-generated), comments/, logs/assets/images/backgrounds → assets/images/bgscripts/, .cmd entry points unifiedchangelog.txt → data/logs/changelog.logmirror-external.py), removed preconnect external linkscounter.py, banned_words.py and other new scripts split out independentlyOtherpages/blog → blog)max-width:100%;height:auto; to prevent overflowGuestbook Emoji SystemAdded 20 pixel art emojis to the guestbook. Click » Emoticons below the input field to expand the folding panel, select from the grid, or manually type [em01] through [em20]. Stored as codes, automatically converted to images on both web pages and emails.The emoji panel doesn't load images by default (JS lazy generation), saving 20 initial HTTP requests. Guestbook form changed from scattered label+input to HTML table layout. Name/Email/Content/Display IP/Send button all in a 125px-wide cell. Emoji panel saves space through folding, 1px CSS border replaced the original 2px default border. Email System OptimizationPreviously, @reply emails were sent synchronously — users had to wait for the email to finish before seeing the page redirect. Now changed to an independent background process (mailer.py), passing content via stdin, subprocess.Popen returns immediately after launch. [em07] in email body is now converted to <img> tags pointing to GIFs on the server, so recipients can also see the emoji animations.Log System RefactoringPreviously, logs from various modules were scattered across different locations. Now all consolidated under data/logs/:
Created a unified logger.py module that all CGI scripts use to write to their respective categorized logs. Performance Optimizationloading="lazy", not blocking first renderloading="lazy", reducing first-screen requests by 20Other Small Improvements<!DOCTYPE html> declaration site-wide, goodbye Quirks Mode
|
Tools
[Toolbox] Latest Posts » WD HC620 User Guide |
|
© 2004-2026 DragonRSTER • Made with HTML • 本站支持IE5.5+ 资源许可 • 最佳浏览分辨率:1024x768 • 本页最后更新于 2026年05月08日 02:07:09 |