#!/bin/sh if [ -z "$BASE" ]; then BASE=http://projects.qi-hardware.com/index.php/p/ben-scans/source/tree/master/ fi # ----- section --------------------------------------------------------------- section() { echo "$__before_set" __before_set= cat <

$2

EOF } # ----- scan_set / images / texts --------------------------------------------- scan_set() { echo "$__before_set" __id=$1 __before_set="" __before_image="" __before_text="" cat <
$2
EOF } __do_explain() { cat <
EOF cat cat <
EOF } explain_set() { cat < EOF __do_explain } __do_before_image() { echo "$__before_image" __before_image= } image() { __do_before_image cat < EOF } images1() { image "$__id-1mm" } images2() { images1 image "$__id-500um" } images3() { images2 image "$__id-100um" } under_consideration() { __do_before_image cat <

Under consideration

EOF } planned() { __do_before_image cat <

Planned

EOF } in_progress() { __do_before_image cat <

In progress

EOF } link() { [ -r "../$1" ] || return size=`ls -l ../$1 | awk '{printf $5}'` if [ $size -lt 950000 ]; then size="`echo $size | awk '{printf("%.0f kB", $1/1000)}'`" size= else size="`echo $size | awk '{printf("%.1f MB", $1/1000000)}'`" fi echo "
$2 $size" } __text() { echo "$__before_text" __before_text= echo "" cat link "data/pij/$1.pij.bz2" PIJ link "data/dxf/$1.dxf.bz2" DXF link "data/stl/$1.stl.bz2" STL link "data/csv/$1.txt.bz2" "TXT(CSV)" } text() { __text "$__id-$1" } texts2() { text 1mm < Z resolution: DRAFT
Approximate scan time: $1
EOF text 500um < Z resolution: 25 μm.
Approximate scan time: $2
EOF } texts3() { texts2 "$1" "$2" text 100um < Z resolution: 25 μm.
Approximate scan time: $3
EOF } # ----- scan_group / scan ----------------------------------------------------- scan_group() { echo "$__before_set" __before_set="" __before_hdr="" __before_img="" __before_text="" cat < EOF } scan_bar() { cat <
EOF } scan_hdr() { echo "$__before_hdr" __before_hdr= cat <
$1
EOF } scan_img() { echo "$__before_img" __before_img= cat <
EOF } scan_text() { echo "$__before_text" __before_text= echo "" if [ ! -z "$3" ]; then echo "$3" | __do_explain fi cat < EOF __text $1 < X/Y step size: 100 μm.
Z resolution: 25 μm.
EOF echo "" } # ----- end ------------------------------------------------------------------- end() { echo "$__before_set" cat <

`date -u '+%F %X'` UTC EOF }