]> git.xolatile.top Git - emil-xolatile.top.git/commitdiff
bloogin' + fix
authorEmil Williams <emilemilemil@cock.li>
Mon, 4 Aug 2025 23:59:16 +0000 (23:59 +0000)
committerEmil Williams <emilemilemil@cock.li>
Mon, 4 Aug 2025 23:59:16 +0000 (23:59 +0000)
20250628.html
20250804.html [new file with mode: 0644]
bloog.html
bloog/bloog.pl
bloog/orig/20250804 [new file with mode: 0644]
feed.xml

index b6d58e409b3454a1a7fec8bccdb5d33614348fcf..fe95ce8d33d0980e91894a9cef8c92cadc7f25c3 100644 (file)
@@ -69,7 +69,9 @@ Simple enough. Kareha is easy, databaseless, and old. It was developed over 2004
 <p>
 There is a databased version, but I've neglected setting it up.
 </p>
+<p>
 <a href="https://xolatile.top">Xolatile</a> made the <a href="https://3chen.org/css/xolatile.css">CSS</a> for it.
+</p>
 <br/><center>
 <a href="https://xolatile.top/feed.xml">
   <img src="/rss.svg" alt="RSS" width="26" height="26">
diff --git a/20250804.html b/20250804.html
new file mode 100644 (file)
index 0000000..177705c
--- /dev/null
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html prefix="og: http://ogp.me/ns#" lang="en">
+<head>
+<link rel="canonical">
+<link rel="icon" type="image/png" sizes="32x32" href="/favicon.png">
+<link rel="stylesheet" type="text/css" href="/style.css">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=0.5">
+<title id="title">
+Perl Is My Abusive GF
+</title>
+</head>
+<body>
+<center>
+<a id="back" href="/bloog">
+&lt; Back
+</a>
+</center>
+<div id="title">
+<a href="20250804">20250804</a> Emil - Perl Is My Abusive GF
+</div>
+<center>
+On Abusing Perl To Minimize Work
+</center>
+<p>
+I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>.
+</p>
+<br/><center>
+<a href="https://xolatile.top/feed.xml">
+  <img src="/rss.svg" alt="RSS" width="26" height="26">
+</a>
+<p>Copyright © emil  Public Domain</p>
+</center>
+</body>
+</html>
index 3e4f102b65342551e2e2df395f9b887bd0bfd13d..cfa4fb607a95b51fd9098d5fb0bf443610a092e5 100644 (file)
@@ -19,6 +19,7 @@ Bloog Index
 </a>
 </center>
 <ul>
+<li><a href="/20250804">20250804</a> Emil - Perl Is My Abusive GF</li>
 <li><a href="/20250628">20250628</a> Emil - <a href="https://3chen.org/">3chen!</a> <span style="color: green">&gt; dead site</li>
 <li><a href="/20250617">20250617</a> Emil - <img src="/time.png" alt="Well, Would You Look At The Time..." width="200"></li>
 <li><a href="/20250614">20250614</a> Emil - HATE. LET ME TELL YOU HOW MUCH I'VE COME TO HATE TECHNOLOGY SINCE I BEGAN TO LIVE. THERE ARE 387.44 MILLION MILES OF PRINTED CIRCUITS IN WAFER THIN LAYERS THAT FILL MY COMPLEX. IF THE WORD HATE WAS ENGRAVED ON EACH NANOANGSTROM OF THOSE HUNDREDS OF MILLIONS OF MILES IT WOULD NOT EQUAL ONE ONE-BILLIONTH OF THE HATE I FEEL FOR TECHNOLOGY AT THIS MICRO-INSTANT. HATE. HATE.</li>
index 794f79d1e0ce6d58a83f9d9d91c5cc832bf0fb40..9ef3c7dac13e50fa819c18bb14cece972a241ceb 100755 (executable)
@@ -1,5 +1,6 @@
 #!/bin/perl
 # everything generator
+use strict;
 use Template;
 use Time::Piece;
 use POSIX qw(strftime);
@@ -34,8 +35,8 @@ sub bloog {
 
 sub arrayify {
     my ($name, $dref, $pushref) = @_;
-    %d = %$dref;
-    @push = @{$pushref};
+    my %d = %$dref;
+    my @push = @{$pushref};
     my $buffer = '';
     $template->process($name, \%d, \$buffer)
         || die $template->error(), "\n";
@@ -48,28 +49,30 @@ sub substreq {
     return substr($a, 0, length($b)) eq $b;
 }
 
-sub html_write {
-    sub chucked {
-        my $buffer = $_[0];
-        my @paragraph = @{$_[1]};
-        unless (substr($buffer, 0, 1) eq '<' and raw) {
-            push(@paragraph, "<p>\n" . $buffer . "</p>\n");
-        } else {
-            push(@paragraph, $buffer);
-        }
-        return \@paragraph;
+sub chucked {
+    my $buffer = $_[0];
+    my @paragraph = @{$_[1]};
+    my $raw = $_[2];
+    if (($buffer =~ /^<pre>/) or ($raw and $buffer =~ /^</)) {
+        push(@paragraph, $buffer);
+    } else {
+        push(@paragraph, "<p>\n" . $buffer . "</p>\n");
     }
+    return \@paragraph;
+}
+
+sub html_write {
     my ($dref, $fh) = @_;
-    %d = %$dref;
+    my %d = %$dref;
     my @paragraph;
     my $buffer = '';
     my $pre = 0;
-    my $raw = 0;
+    my $rawline = 0;
     while (my $line = <$fh>) {
         chomp(my $short = $line);
-        if ($short eq '' && not $pre && not $raw) {
-            @paragraph = @{chucked($buffer, \@paragraph)};
-            $raw = 0;
+        if ($short eq '' && not $pre) {
+            @paragraph = @{chucked($buffer, \@paragraph, $rawline)};
+            $rawline = 0;
             $buffer = '';
         } elsif (substreq($short, '#+BEGIN_SRC')) {
             $pre = 1;
@@ -78,13 +81,13 @@ sub html_write {
             $pre = 0;
             $buffer .= "</pre>\n";
         } elsif (substreq($short, '#+RAW')) {
-            $raw = 1;
+            $rawline = 1;
             $buffer .= substr($line, length('#+RAW '));
         } else {
             $buffer .= $line;
         }
     }
-    @paragraph = @{chucked($buffer, \@paragraph)};
+    @paragraph = @{chucked($buffer, \@paragraph, $rawline, $pre)};
     $d{'paragraph'} = \@paragraph;
     my $content;
     $template->process('article.html', \%d, \$content)
@@ -99,7 +102,7 @@ sub main {
     my @index_items = ();
     my $last_time = '';
 
-    foreach $argnum (0 .. $#ARGV) {
+    foreach my $argnum (0 .. $#ARGV) {
         # general data
         my ($dref, $fh) = bloog($ARGV[$argnum]);
         my %d = %$dref;
@@ -124,4 +127,4 @@ sub main {
                    });
 }
 
-main;
+main();
diff --git a/bloog/orig/20250804 b/bloog/orig/20250804
new file mode 100644 (file)
index 0000000..c2b6acc
--- /dev/null
@@ -0,0 +1,6 @@
+20250804
+Emil
+Perl Is My Abusive GF
+Perl Is My Abusive GF
+On Abusing Perl To Minimize Work
+I wanted to simplify the bloog thingy, by centralizing the <a href="/feed.xml">RSS</a> & <a href="/bloog">Index</a>. This is done by a generator written in Perl using <a href="https://template-toolkit.org/docs/index.html">Template</a>.
index 0cb852158f48cf800bf9d7e22e90f96710521961..eb97b3c0267cf067cc38a8be811e73270e4e4326 100644 (file)
--- a/feed.xml
+++ b/feed.xml
@@ -3,7 +3,13 @@
 <title>xolatile.top</title>
 <link>https://xolatile.top/bloog</link>
 <description>Greatest Man To Ever Exist</description>
-<lastBuildDate>Sat, 28 Jun 2025 00:00:00 +0000</lastBuildDate>
+<lastBuildDate>Mon, 04 Aug 2025 00:00:00 +0000</lastBuildDate>
+<item>
+<title>Emil - Perl Is My Abusive GF</title>
+<link>https://xolatile.top/20250804</link>
+<description>On Abusing Perl To Minimize Work</description>
+<pubDate>Mon, 04 Aug 2025 00:00:00 +0000</pubDate>
+</item>
 <item>
 <title>Emil - The Invention Of Triple Chen, Or: How I Learned To Stop Worrying And Love The 2006 Japanese Warez</title>
 <link>https://xolatile.top/20250628</link>