Work on tape and string framework

This commit is contained in:
Atlas Cove 2023-01-21 23:40:35 +00:00
parent 959fc34702
commit 57e9d96ad7
3 changed files with 27 additions and 4 deletions

16
src/_tape/dat.pm Normal file
View File

@ -0,0 +1,16 @@
package tape;
use strict; use warnings;
use Exporter qw(Export);
our @EXPORT = qw(fn titles);
my %fn = (
'txti' => sub {
},
'md' => sub {
},
'org' => sub {
}
);
my %titles = (
"not_found.txti" => "404 - Page Not Found",
"index.txti" => "Atlas48's Archives"
);

View File

@ -1,7 +1,14 @@
#!/bin/bash
# render.sh: part of the tape-and-string framework.
# v2.0
cd ..
declare -A title=([not_found]="404 - Page Not Found" [index]="Atlas48's Archives")
for i in *.txti; do
flatiron < $i | m4 -DTITLE=${title[${i##.html}]} main.html.m4 | sed '/^$/d' > ../${i/txti/html}
files=(`find -not -path '_*'`)
for i in ${files[@]}; do
if test -d $i; then
mkdir -p ../$i
elif test -f $i; then
_tape/render.pl $i
else
echo "Skipping $i, unknown file type"
fi
done

2
src/_tape/string.pl Normal file → Executable file
View File

@ -1,6 +1,6 @@
#!/usr/bin/env perl
use strict; use warnings;
use "dat.pl";
use "dat.pm";
use Text::Textile;
use Text::Markdown;
use Org::To::HTML