New function to pick 'metadata' out of new .md convention for attributes.

This commit is contained in:
uriel 2008-12-24 12:18:44 +01:00
parent b029c8774b
commit 921a67d8df

View File

@ -279,6 +279,18 @@ fn app_handler {
}
##################################
# Meta-data extract
fn get_var {
if(! ~ $#* 2) {
status='ERROR: wrong get_var args >>' $* '<< instead of: get_var file-name var-name'
dprint $status
}
if not
sed -n '/^\* '$2': /p; /^\* '$2': /q; /^$/q' < $1
}
#app_blog_methods = ( _post index.rss )
#fn app_blog__post {
# echo