Work on tape and string framework
This commit is contained in:
parent
959fc34702
commit
57e9d96ad7
16
src/_tape/dat.pm
Normal file
16
src/_tape/dat.pm
Normal 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"
|
||||||
|
);
|
@ -1,7 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# render.sh: part of the tape-and-string framework.
|
# render.sh: part of the tape-and-string framework.
|
||||||
|
# v2.0
|
||||||
cd ..
|
cd ..
|
||||||
declare -A title=([not_found]="404 - Page Not Found" [index]="Atlas48's Archives")
|
files=(`find -not -path '_*'`)
|
||||||
for i in *.txti; do
|
for i in ${files[@]}; do
|
||||||
flatiron < $i | m4 -DTITLE=${title[${i##.html}]} main.html.m4 | sed '/^$/d' > ../${i/txti/html}
|
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
|
done
|
||||||
|
2
src/_tape/string.pl
Normal file → Executable file
2
src/_tape/string.pl
Normal file → Executable file
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
use strict; use warnings;
|
use strict; use warnings;
|
||||||
use "dat.pl";
|
use "dat.pm";
|
||||||
use Text::Textile;
|
use Text::Textile;
|
||||||
use Text::Markdown;
|
use Text::Markdown;
|
||||||
use Org::To::HTML
|
use Org::To::HTML
|
||||||
|
Loading…
Reference in New Issue
Block a user