reorganising src files

This commit is contained in:
Atlas Cove 2023-01-21 23:23:04 +00:00
parent b6fe965974
commit 959fc34702
6 changed files with 28 additions and 0 deletions

3
.editorconfig Normal file
View File

@ -0,0 +1,3 @@
root=true
[*]
line_ending

4
src/_tape/.editorconfig Normal file
View File

@ -0,0 +1,4 @@
root=false
[*.pl]
indent_type=space
indent_size=1

View File

@ -1,5 +1,6 @@
#!/bin/bash
# render.sh: part of the tape-and-string framework.
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}

20
src/_tape/string.pl Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env perl
use strict; use warnings;
use "dat.pl";
use Text::Textile;
use Text::Markdown;
use Org::To::HTML
if($ARGV[1][0]=='_') {
print STDERR "Skipping file: $ARGV[1], ignored.";
exit 0;
}
my @fi = split(/\./, $ARGV[1])
if(!exists($fn{$fi[1]}) {
print STDERR "Skipping file: $ARGV[1], no way to process extension.";
exit 1;
}
open $if, "<$ARGV[1]";
open $of, ">_tmp";
$fn{$fi[1]}($if);
close $if;
close $of;