- docker
- 8 CPU
- 16GB RAM
TO BUILD THE www.iconoclasts.blog SITE to ./www
% ./test.sh % rm -rf trunk www
% GIT_URL=https://github.com/FOO/BAR ./test.sh
% LAUNCH_APACHE2=1 ./test.sh % ./links2dotcfg.pl '^$' index "" % ./deps2dotcfg.pl '^$' index ""% ./test.sh
% ./test.sh ooo
% ./test.sh
% LAUNCH_APACHE2=1 ./test.shCore Build Engine:
- provide
@path::patternsin lib/path.pm - provide
view codein lib/view.pm (typically derived fromSunStarSys::View) - grok the associated API you need to conform to as expressed below
#api
...
my $path = "/path/to/source/file";
for my $p (@path::patterns) {
my ($re, $method, $args) = @$p;
next unless $path =~ $re;
++$matched;
my ($content, $mime_extension, $final_args, @new_sources) = view->can($method)->(path => $path, lang => $lang, %$args);
... write UTF $content to target file with associated $mime_extension file-type
}
copy($path, "$target_base/content$path") unless $matched;
...
#api - trunk/
- content/
- cgi-bin/ (optional)
- lib/
- path.pm
- view.pm
- templates/ - lib/path.pm:
- NOT OO, only data structure population
- @path::patterns:
- array of arrays:
- outer array:
- orders priority of pattern matches from first elt of inner arrays
- falls back to SunStarSys::Util::copy_if_newer behavior
- inner arrays:
- pattern: regex to text source file's path against
- view: method name in view class to invoke
- args: dict of **args passed to view method in prior slot
- %path::dependencies:
- dict of arrays:
- keys are paths to sources rooted in source tree's "content" dir
- values are array of similarly rooted files the key depends on
- @path::acl
- array of hashes:
- rules
- path
- lib/view.pm:
- OO: view class should inherit from SunStarSys::View