From: Emil Williams Date: Wed, 30 Apr 2025 18:08:00 +0000 (-0600) Subject: init X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=f1e6949ea077ace594cbb5e92bfee90eba95e10a;p=emil-3chen.org.git init --- f1e6949ea077ace594cbb5e92bfee90eba95e10a diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db2fc0d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +secrets diff --git a/ixtab b/ixtab new file mode 100755 index 0000000..09bbff6 --- /dev/null +++ b/ixtab @@ -0,0 +1,40 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use CGI; +use DBI; +use Template; + +require "secrets"; # server data - shit that doesn't need to uploaded. + +my $cgi = CGI->new; + +my $tt = Template->new({ + INCLUDE_PATH => '.', + INTERPOLATE => 1, + }) or die Template->error(); + +# $dbfile from secrets +my $dbh = DBI->connect("dbi:SQLite:uri=file:$dbfile?mode=rwc"); + +my $path = $cgi->param('path') // ''; + +my %site = ( + ixtab => 'index', + img => 'img', + ); + +my $vars = ( + sneed => 'feed', + chuck => 'fuck', + ); + +my $page = $site{"$path"} // '404'; + +print $cgi->header( + -Content_Type => 'text/html', + -charset => 'UTF-8', + ); + +# I should probably put all of below into a buffer and run a pruning regexp on it +$tt->process('tt/' . $page, $vars) or die $tt->error(); diff --git a/tt/404 b/tt/404 new file mode 100644 index 0000000..7fbea0f --- /dev/null +++ b/tt/404 @@ -0,0 +1,6 @@ + + + +

Nothing Lost, Nothing Gained

+ + diff --git a/tt/img b/tt/img new file mode 100644 index 0000000..e733a1a --- /dev/null +++ b/tt/img @@ -0,0 +1,6 @@ + + + +

Image Board

+ + diff --git a/tt/index b/tt/index new file mode 100644 index 0000000..002aa39 --- /dev/null +++ b/tt/index @@ -0,0 +1,7 @@ + + + +

Glorious Day

+Imgb. + +