ref: 188a226bf5d56ae7f3fdca2d75576fe437e0dd19
parent: 3a8421bf641003650050e1135ad453de46237621
author: uriel <[email protected]>
date: Wed Dec 24 07:18:44 EST 2008
New function to pick 'metadata' out of new .md convention for attributes.
--- a/bin/cgilib.rc
+++ b/bin/cgilib.rc
@@ -279,6 +279,18 @@
}
+##################################
+# 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