aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/gencvthumbs9
-rwxr-xr-xbin/md2html.awk15
-rwxr-xr-xmkweb11
3 files changed, 30 insertions, 5 deletions
diff --git a/bin/gencvthumbs b/bin/gencvthumbs
new file mode 100755
index 0000000..f3ec7ab
--- /dev/null
+++ b/bin/gencvthumbs
@@ -0,0 +1,9 @@
+#!/bin/rc
+files=(cv cv.es)
+
+for(f in $files)
+ cat <<EOF | gs -sDEVICE'='jpeg -dPDFFitPage'='true -dDEVICEWIDTHPOINTS'='232 -dDEVICEHEIGHTPOINTS'='300 -sOutputFile'='$f.jpeg $f.pdf
+
+
+quit
+EOF
diff --git a/bin/md2html.awk b/bin/md2html.awk
index 81d1241..053d128 100755
--- a/bin/md2html.awk
+++ b/bin/md2html.awk
@@ -96,6 +96,19 @@ function nextil(t) {
if(tag == "!["){
if(!match(t2, /(\[.*\])|(\(.*\))/))
return t1 tag nextil(t2);
+ width = "";
+ height = "";
+ if(match(t2, /[ ]+[0-9]+%?x[0-9]+%?\]/)){
+ match(t2, /[0-9]+%?x/);
+ width = substr(t2, RSTART, RLENGTH - 1);
+ if(!match(width, /%$/))
+ width = width "px";
+ match(t2, /x[0-9]+%?\]/);
+ height = substr(t2, RSTART + 1, RLENGTH - 2);
+ if(!match(height, /%$/))
+ height = height "px";
+ sub(/[ ]+[0-9]+%?x[0-9]+%?\]/, "]", t2);
+ }
match(t2, /^[^\]]*/);
alt = substr(t2, 1, RLENGTH);
t2 = substr(t2, RLENGTH + 2);
@@ -114,6 +127,8 @@ function nextil(t) {
}
if(match(url, /^<.*>$/))
url = substr(url, 2, RLENGTH - 2);
+ if(width != "" && height != "")
+ return t1 "<img src=\"" url "\" alt=\"" alt "\"" title " width=\"" width "\" height=\"" height "\" />" nextil(t2);
return t1 "<img src=\"" url "\" alt=\"" alt "\"" title " />" nextil(t2);
}
else{
diff --git a/mkweb b/mkweb
index d29cc05..2be2275 100755
--- a/mkweb
+++ b/mkweb
@@ -35,14 +35,15 @@ if(! ~ $#* 0)
for(d in $sections)
echo $site/$d/index.html
}
+ exit
case -s
if(~ $#2 0)
usage
- buildsection $2
+ sections=`{walk -d $2 | grep -v $filter}
case -*
usage
}
-if not
- for(d in $sections .){
- buildsection $d
- }
+
+for(d in $sections .){
+ buildsection $d
+}