#!/bin/bash ulimit -t 5 ulimit -v 80000 export HOME=/tmp cd /tmp # read the config . /etc/pcblib.cgi.conf CGI=$CGI_static # import the lib . $pcb_rnd_util/cgi_common.sh find_fp() { awk -v "fp=$QS_fp" -v "fpdir=$fpdir" ' BEGIN { fp=tolower(fp) } ($1 == "S") { n=tolower($2) sub("^.*/", "", n) sub(".fp$", "", n) sub(".ele$", "", n) if (n == fp) { print fpdir $2 exit } } ' < $sdir/cache } list_fps() { find $fpdir | awk -v "fpdir=$fpdir" -v "CGI=$CGI" ' /.svn/ { next } /parametric/ { next } { name=$0 sub(fpdir, "", name) if (!(name ~ "/")) next dir=name fn=name sub("/.*", "", dir) sub("^[^/]*/", "", fn) vfn = fn sub(".fp$", "", vfn) LLEN[dir] += length(vfn) vfn = "" vfn "" if (LLEN[dir] > 8) { LLEN[dir] = 0 sep = "
" } else sep = " " if (DIR[dir] != "") DIR[dir] = DIR[dir] sep vfn else DIR[dir] = vfn } END { print "" print "" for(n in DIR) print "" for(n in DIR) print "
" n print "
" DIR[n] print "
" } ' } qs=`echo "$QUERY_STRING" | tr "&" "\n"` for n in $qs do exp="QS_$n" export $exp done export QS_cmd=`echo "$QS_cmd" | url_decode` if test -z "$QS_fp" then export QS_fp='TO220' gen=connector fi fn=`find_fp` if test ! "$?" = 0 then echo "Content-type: text/plain" echo "" echo "Error: couldn't find $QS_fp" exit fi fptext=`cat $fn` if test ! "$?" = 0 then echo "Content-type: text/plain" echo "" echo "Error reading footprint file for $QS_fp $fn" exit fi if test "$QS_output" = "text" then echo "Content-type: text/plain" echo "" echo "$fptext" exit fi if test "$QS_output" = "png" then echo "Content-type: image/png" echo "" cparm="" if test ! -z "$QS_mm" then cparm="$cparm --mm" fi if test ! -z "$QS_photo" then cparm="$cparm --photo" fi fptmp=`mktemp` $fp2preview --outfile $fptmp $cparm "$QS_fp" >/dev/null 2>&1 cat $fptmp rm $fptmp exit fi echo "Content-type: text/html" echo "" echo "" echo "" echo "

pcblib-static browse page

" echo '
An outburst while looking for a powerjack connector
footprint in the stock library:
"What on earth is an MSP430F1121 footprint and
why do I need it in the default library?!"

 
 

pcblib

The default library in pcb-rnd was called the "pcblib" (lib and newlib are already used by vanilla pcb) and is called footprint/ from 3.0.0. This footprint library content consists of parametric (generated) footprints and static footprints ("file elements"). This page queries static footprints.

The goal of this lib is to ship a minimalistic library of the real essential parts, targeting small projects and hobbysts. This assumes users can grow their own library by downloading footprints from various online sources (e.g. gedasymbols) or draw their own as needed. Thus instead of trying to be a complete collection of footprints ever drawn, it tries to collect the common base so that it is likely that 90% of users will use 90% of the footprints of this lib in their projects.

   

List of static footprints

    ' list_fps echo '
' echo "

Search and preview

" echo "
" echo "name: " echo "" echo "

" echo "" echo "

" QS_format=${QS_cmd##*_} QS_fp_=${QS_cmd%%_*} if test ! -z "$QS_fp" then echo "

Result

" echo "

$QS_fp

" echo "" echo "
" echo "" echo "     " echo "" echo "
"
	echo "$fptext"
	echo "
" echo "

Downloads:" echo "
footprint file" echo "

" fi echo "" echo ""