Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r5854 - in trunk/gta02-core/bom: . fic (wer...@docs.openmoko.org)
   2. r5855 - in trunk/gta02-core/bom: . dk (wer...@docs.openmoko.org)
   3. r5856 - in trunk/gta02-core/bom: . dk (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-03-26 07:17:35 +0100 (Fri, 26 Mar 2010)
New Revision: 5854

Modified:
   trunk/gta02-core/bom/Makefile
   trunk/gta02-core/bom/digi-key.equ
   trunk/gta02-core/bom/digi-key.inv
   trunk/gta02-core/bom/fic/Makefile
Log:
- bom/Makefile, bom/fic/Makefile: added target "null" to generate empty
  inventory for FIC/Openmoko Inc. parts
- bom/digi-key.inv, bom/digi-key.equ: corrected typo



Modified: trunk/gta02-core/bom/Makefile
===================================================================
--- trunk/gta02-core/bom/Makefile       2010-03-16 12:37:14 UTC (rev 5853)
+++ trunk/gta02-core/bom/Makefile       2010-03-26 06:17:35 UTC (rev 5854)
@@ -11,7 +11,7 @@
 CHR=darfon.chr ralec.chr avx.chr acx.chr misc.chr
 SCH=audio bt cpu-power cpu gps io lcm memory modem pmu sd-sim usb wlan
 
-.PHONY:                all optimist pessimist spotless
+.PHONY:                all optimist pessimist null spotless
 .PHONY:                show-dup show-missing show-dk show-fic
 .PHONY:                ann sch gen generate gv xpdf upload
 
@@ -27,6 +27,11 @@
                $(MAKE) -C fic
                $(MAKE) all
 
+null:
+               $(MAKE) spotless
+               $(MAKE) -C fic null
+               $(MAKE) all
+
 gta02-core.ord:        gta02-core.par $(INV) $(EQU)
                $(BOOM) part2order $(KITS) \
                  $(INV) $(EQU) gta02-core.par >$@ || \

Modified: trunk/gta02-core/bom/digi-key.equ
===================================================================
--- trunk/gta02-core/bom/digi-key.equ   2010-03-16 12:37:14 UTC (rev 5853)
+++ trunk/gta02-core/bom/digi-key.equ   2010-03-26 06:17:35 UTC (rev 5854)
@@ -1,6 +1,6 @@
 #EQU
 #
-# Note: many parts at cut-tape and thus need re-reeling.
+# Note: many parts are cut-tape and thus need re-reeling.
 #
 DIGI-KEY ADG3304BCBZ-REEL7CT-ND                ADI ADG3304BCBZ-REEL
 DIGI-KEY P10850SCT-ND                  PANASONIC EVQPUD02K

Modified: trunk/gta02-core/bom/digi-key.inv
===================================================================
--- trunk/gta02-core/bom/digi-key.inv   2010-03-16 12:37:14 UTC (rev 5853)
+++ trunk/gta02-core/bom/digi-key.inv   2010-03-26 06:17:35 UTC (rev 5854)
@@ -1,6 +1,6 @@
 #INV
 # 
-# Note: many parts at cut-tape and thus need re-reeling. 
+# Note: many parts are cut-tape and thus need re-reeling. 
 #
 DIGI-KEY ADG3304BCBZ-REEL7CT-ND                6726    USD 1 2.43 25 1.94
 DIGI-KEY P10850SCT-ND                  31180   USD 1 0.76 10 0.569

Modified: trunk/gta02-core/bom/fic/Makefile
===================================================================
--- trunk/gta02-core/bom/fic/Makefile   2010-03-16 12:37:14 UTC (rev 5853)
+++ trunk/gta02-core/bom/fic/Makefile   2010-03-26 06:17:35 UTC (rev 5854)
@@ -2,7 +2,7 @@
 
 INV = inventory-fic-ee.csv
 
-.PHONY:                all spotless
+.PHONY:                all spotless null
 
 all:           fic.equ fic.inv fic.dsc present.inv missing.equ
 
@@ -23,5 +23,8 @@
                $(BOOM) ./equ2equ missing.inv fic.equ >$@ || \
                  { rm -f $@; exit 1; }
 
+null:
+               >fic.inv
+
 spotless:
                rm -f fic.equ fic.inv fic.dsc present.inv missing.equ




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-03-26 07:28:59 +0100 (Fri, 26 Mar 2010)
New Revision: 5855

Added:
   trunk/gta02-core/bom/dk/
   trunk/gta02-core/bom/dk/digi-key.dsc
   trunk/gta02-core/bom/dk/digi-key.equ
   trunk/gta02-core/bom/dk/digi-key.inv
Removed:
   trunk/gta02-core/bom/digi-key.dsc
   trunk/gta02-core/bom/digi-key.equ
   trunk/gta02-core/bom/digi-key.inv
Modified:
   trunk/gta02-core/bom/Makefile
Log:
Move digi-key.* to separate directory bom/dk/ to make bom/ less crowded



Modified: trunk/gta02-core/bom/Makefile
===================================================================
--- trunk/gta02-core/bom/Makefile       2010-03-26 06:17:35 UTC (rev 5854)
+++ trunk/gta02-core/bom/Makefile       2010-03-26 06:28:59 UTC (rev 5855)
@@ -6,8 +6,8 @@
 ANNOTATE=ord   # make ANNOTATE=par ... for the parts list
 
 KITS=20
-EQU=fic/fic.equ fic/missing.equ digi-key.equ
-INV=fic/fic.inv gta02-core.inv dummy.inv fic/missing.inv digi-key.inv
+EQU=fic/fic.equ fic/missing.equ dk/digi-key.equ
+INV=fic/fic.inv gta02-core.inv dummy.inv fic/missing.inv dk/digi-key.inv
 CHR=darfon.chr ralec.chr avx.chr acx.chr misc.chr
 SCH=audio bt cpu-power cpu gps io lcm memory modem pmu sd-sim usb wlan
 
@@ -79,7 +79,7 @@
 
 show-dk:
                (echo '#ORD'; grep '^DIGI-KEY ' gta02-core.ord ; ) | \
-                 $(BOOM) prettyord - digi-key.dsc | \
+                 $(BOOM) prettyord - dk/digi-key.dsc | \
                  sed 's/^...  //' | \
                  awk '{ s += $$(NF); print; } END { print "USD", s }'
 

Deleted: trunk/gta02-core/bom/digi-key.dsc
===================================================================
--- trunk/gta02-core/bom/digi-key.dsc   2010-03-26 06:17:35 UTC (rev 5854)
+++ trunk/gta02-core/bom/digi-key.dsc   2010-03-26 06:28:59 UTC (rev 5855)
@@ -1,15 +0,0 @@
-#DSC
-DIGI-KEY ADG3304BCBZ-REEL7CT-ND        IC XLATOR 4CH 1.2/5.5V 12-WLCSP
-DIGI-KEY P10850SCT-ND          LT SWITCH SIDE W/BOSS J LEAD SMD
-DIGI-KEY P11169CT-ND           NOISE FILTER 2 MODE 1K OHM SMD
-DIGI-KEY HFQ439CT-ND           CONN FPC 39POS .3MM GOLD SMD
-DIGI-KEY 490-4980-1-ND                 CONN MW COAXIAL WITH SWITCH SMD
-DIGI-KEY SI1040X-T1-E3TR-ND    IC LOAD SW N/P-CH MOSFET SOT563F
-DIGI-KEY 296-18200-1-ND                IC SNGL 2IN POS-NAND GATE SC70-5
-DIGI-KEY H9161CT-ND            CONN RECPT ULTRA-MINI COAX SMD
-DIGI-KEY 668-1181-ND           MIC ELECT -42dB+-3dB 4*1.2mm 2V 0.5mA
-DIGI-KEY 101-00492-20-1-ND     CONN 8PS SIM + 16PS MICRO-SD PCB
-DIGI-KEY 478-5526-1-ND         CAP TANT 220UF 4.0V SMD
-DIGI-KEY NTGD1100LT1GOSCT-ND   MOSFET N/P-CH 8V 3.3A 6-TSOP
-DIGI-KEY RMCF1/16S150FRCT-ND   RES 150 OHM 1/16W 1% 0402 SMD
-DIGI-KEY 557-1388-1-ND         IC SDRAM 512MBIT 133MHZ 90VFBGA

Deleted: trunk/gta02-core/bom/digi-key.equ
===================================================================
--- trunk/gta02-core/bom/digi-key.equ   2010-03-26 06:17:35 UTC (rev 5854)
+++ trunk/gta02-core/bom/digi-key.equ   2010-03-26 06:28:59 UTC (rev 5855)
@@ -1,29 +0,0 @@
-#EQU
-#
-# Note: many parts are cut-tape and thus need re-reeling.
-#
-DIGI-KEY ADG3304BCBZ-REEL7CT-ND                ADI ADG3304BCBZ-REEL
-DIGI-KEY P10850SCT-ND                  PANASONIC EVQPUD02K
-DIGI-KEY P11169CT-ND                   PANASONIC EXC24CB102U
-DIGI-KEY HFQ439CT-ND                   HIROSE FH23-39S-0.3SHW(05)
-
-DIGI-KEY 490-4980-1-ND                 MURATA MM8430-2610RB3
-# note: this equivalence is a detour - the Digi-Key part is an RA1. It differs
-# from RB3 only in the reeling.
-
-DIGI-KEY SI1040X-T1-E3TR-ND            VISHAY SI1040X-T1-E3
-DIGI-KEY 296-18200-1-ND                        TI SN74AUP1G00DCKR
-
-DIGI-KEY H9161CT-ND                    HIROSE U.FL-R-SMT-1(10)
-# note: this digikey mic is similar to the IMP-413, but not equivalent.
-
-DIGI-KEY 668-1181-ND                   IMPERIAL IMP-413TN
-# note: Sim/SD card holder has a _slightly_ different footprint
-
-DIGI-KEY 101-00492-20-1-ND             PROCONN SMSN16-J0-2214
-DIGI-KEY 478-5526-1-ND                 AVX TLNS227M004R3000
-DIGI-KEY NTGD1100LT1GOSCT-ND           ON-SEMI NTGD1100L
-DIGI-KEY RMCF1/16S150FRCT-ND           STACKPOLE RMCF1/16S1501%R
-
-DIGI-KEY 557-1388-1-ND                 SAMSUNG K4M51323PC-DG75
-# Micron MT48H16M32LFCM-75:B TR

Deleted: trunk/gta02-core/bom/digi-key.inv
===================================================================
--- trunk/gta02-core/bom/digi-key.inv   2010-03-26 06:17:35 UTC (rev 5854)
+++ trunk/gta02-core/bom/digi-key.inv   2010-03-26 06:28:59 UTC (rev 5855)
@@ -1,21 +0,0 @@
-#INV
-# 
-# Note: many parts are cut-tape and thus need re-reeling. 
-#
-DIGI-KEY ADG3304BCBZ-REEL7CT-ND                6726    USD 1 2.43 25 1.94
-DIGI-KEY P10850SCT-ND                  31180   USD 1 0.76 10 0.569
-DIGI-KEY P11169CT-ND                   7128    USD 1 0.68 10 0.509 100 0.3737
-DIGI-KEY HFQ439CT-ND                   4738    USD 1 3.02 25 2.34  100 1.872
-DIGI-KEY 490-4980-1-ND                 12423   USD 1 0.57 25 0.4388
-DIGI-KEY SI1040X-T1-E3TR-ND            0       USD 3000 0.294
-# the SI1040X is a family of similar switches. Shouldn't be hard to find
-# another one.
-DIGI-KEY 296-18200-1-ND                        0       USD 1 0.61 25 0.3596
-# consider using a different package
-DIGI-KEY H9161CT-ND                    39012   USD 1 1.46 10 1.19
-DIGI-KEY 668-1181-ND                   175     USD 1 3.54 10 2.525
-DIGI-KEY 101-00492-20-1-ND             1200    USD 1 2.83 10 2.396
-DIGI-KEY 478-5526-1-ND                 3193    USD 1 1.20 10 1.044
-DIGI-KEY NTGD1100LT1GOSCT-ND           3776    USD 1 0.73 10 0.612
-DIGI-KEY RMCF1/16S150FRCT-ND           33156   USD 1 0.04 10 0.025 50 0.0138
-DIGI-KEY 557-1388-1-ND                 2471    USD 1 17.53 10 16.002 25 14.8592

Copied: trunk/gta02-core/bom/dk/digi-key.dsc (from rev 5853, 
trunk/gta02-core/bom/digi-key.dsc)
===================================================================
--- trunk/gta02-core/bom/dk/digi-key.dsc                                (rev 0)
+++ trunk/gta02-core/bom/dk/digi-key.dsc        2010-03-26 06:28:59 UTC (rev 
5855)
@@ -0,0 +1,15 @@
+#DSC
+DIGI-KEY ADG3304BCBZ-REEL7CT-ND        IC XLATOR 4CH 1.2/5.5V 12-WLCSP
+DIGI-KEY P10850SCT-ND          LT SWITCH SIDE W/BOSS J LEAD SMD
+DIGI-KEY P11169CT-ND           NOISE FILTER 2 MODE 1K OHM SMD
+DIGI-KEY HFQ439CT-ND           CONN FPC 39POS .3MM GOLD SMD
+DIGI-KEY 490-4980-1-ND                 CONN MW COAXIAL WITH SWITCH SMD
+DIGI-KEY SI1040X-T1-E3TR-ND    IC LOAD SW N/P-CH MOSFET SOT563F
+DIGI-KEY 296-18200-1-ND                IC SNGL 2IN POS-NAND GATE SC70-5
+DIGI-KEY H9161CT-ND            CONN RECPT ULTRA-MINI COAX SMD
+DIGI-KEY 668-1181-ND           MIC ELECT -42dB+-3dB 4*1.2mm 2V 0.5mA
+DIGI-KEY 101-00492-20-1-ND     CONN 8PS SIM + 16PS MICRO-SD PCB
+DIGI-KEY 478-5526-1-ND         CAP TANT 220UF 4.0V SMD
+DIGI-KEY NTGD1100LT1GOSCT-ND   MOSFET N/P-CH 8V 3.3A 6-TSOP
+DIGI-KEY RMCF1/16S150FRCT-ND   RES 150 OHM 1/16W 1% 0402 SMD
+DIGI-KEY 557-1388-1-ND         IC SDRAM 512MBIT 133MHZ 90VFBGA

Copied: trunk/gta02-core/bom/dk/digi-key.equ (from rev 5854, 
trunk/gta02-core/bom/digi-key.equ)
===================================================================
--- trunk/gta02-core/bom/dk/digi-key.equ                                (rev 0)
+++ trunk/gta02-core/bom/dk/digi-key.equ        2010-03-26 06:28:59 UTC (rev 
5855)
@@ -0,0 +1,29 @@
+#EQU
+#
+# Note: many parts are cut-tape and thus need re-reeling.
+#
+DIGI-KEY ADG3304BCBZ-REEL7CT-ND                ADI ADG3304BCBZ-REEL
+DIGI-KEY P10850SCT-ND                  PANASONIC EVQPUD02K
+DIGI-KEY P11169CT-ND                   PANASONIC EXC24CB102U
+DIGI-KEY HFQ439CT-ND                   HIROSE FH23-39S-0.3SHW(05)
+
+DIGI-KEY 490-4980-1-ND                 MURATA MM8430-2610RB3
+# note: this equivalence is a detour - the Digi-Key part is an RA1. It differs
+# from RB3 only in the reeling.
+
+DIGI-KEY SI1040X-T1-E3TR-ND            VISHAY SI1040X-T1-E3
+DIGI-KEY 296-18200-1-ND                        TI SN74AUP1G00DCKR
+
+DIGI-KEY H9161CT-ND                    HIROSE U.FL-R-SMT-1(10)
+# note: this digikey mic is similar to the IMP-413, but not equivalent.
+
+DIGI-KEY 668-1181-ND                   IMPERIAL IMP-413TN
+# note: Sim/SD card holder has a _slightly_ different footprint
+
+DIGI-KEY 101-00492-20-1-ND             PROCONN SMSN16-J0-2214
+DIGI-KEY 478-5526-1-ND                 AVX TLNS227M004R3000
+DIGI-KEY NTGD1100LT1GOSCT-ND           ON-SEMI NTGD1100L
+DIGI-KEY RMCF1/16S150FRCT-ND           STACKPOLE RMCF1/16S1501%R
+
+DIGI-KEY 557-1388-1-ND                 SAMSUNG K4M51323PC-DG75
+# Micron MT48H16M32LFCM-75:B TR

Copied: trunk/gta02-core/bom/dk/digi-key.inv (from rev 5854, 
trunk/gta02-core/bom/digi-key.inv)
===================================================================
--- trunk/gta02-core/bom/dk/digi-key.inv                                (rev 0)
+++ trunk/gta02-core/bom/dk/digi-key.inv        2010-03-26 06:28:59 UTC (rev 
5855)
@@ -0,0 +1,21 @@
+#INV
+# 
+# Note: many parts are cut-tape and thus need re-reeling. 
+#
+DIGI-KEY ADG3304BCBZ-REEL7CT-ND                6726    USD 1 2.43 25 1.94
+DIGI-KEY P10850SCT-ND                  31180   USD 1 0.76 10 0.569
+DIGI-KEY P11169CT-ND                   7128    USD 1 0.68 10 0.509 100 0.3737
+DIGI-KEY HFQ439CT-ND                   4738    USD 1 3.02 25 2.34  100 1.872
+DIGI-KEY 490-4980-1-ND                 12423   USD 1 0.57 25 0.4388
+DIGI-KEY SI1040X-T1-E3TR-ND            0       USD 3000 0.294
+# the SI1040X is a family of similar switches. Shouldn't be hard to find
+# another one.
+DIGI-KEY 296-18200-1-ND                        0       USD 1 0.61 25 0.3596
+# consider using a different package
+DIGI-KEY H9161CT-ND                    39012   USD 1 1.46 10 1.19
+DIGI-KEY 668-1181-ND                   175     USD 1 3.54 10 2.525
+DIGI-KEY 101-00492-20-1-ND             1200    USD 1 2.83 10 2.396
+DIGI-KEY 478-5526-1-ND                 3193    USD 1 1.20 10 1.044
+DIGI-KEY NTGD1100LT1GOSCT-ND           3776    USD 1 0.73 10 0.612
+DIGI-KEY RMCF1/16S150FRCT-ND           33156   USD 1 0.04 10 0.025 50 0.0138
+DIGI-KEY 557-1388-1-ND                 2471    USD 1 17.53 10 16.002 25 14.8592




--- End Message ---
--- Begin Message ---
Author: werner
Date: 2010-03-26 08:40:41 +0100 (Fri, 26 Mar 2010)
New Revision: 5856

Added:
   trunk/gta02-core/bom/dk/Makefile
   trunk/gta02-core/bom/dk/dk-db.pl
Removed:
   trunk/gta02-core/bom/dk/digi-key.dsc
   trunk/gta02-core/bom/dk/digi-key.inv
Modified:
   trunk/gta02-core/bom/Makefile
Log:
Automated updating of Digi-Key's inventory and price list.

- bom/dk/dk-db.pl, bom/dk/Makefile: we can now look up the parts listed in
  digi-key.equ in Digi-Key's database and put pricing, stock, and descriptions
  into digi-key.inv and digi-key.dsc
- bom/Makefile: added dependencies for generated files in bom/dk/
- bom/dk/digi-key.inv, bom/dk/digi-key.dsc: removed from SVN because they're 
  now generated



Modified: trunk/gta02-core/bom/Makefile
===================================================================
--- trunk/gta02-core/bom/Makefile       2010-03-26 06:28:59 UTC (rev 5855)
+++ trunk/gta02-core/bom/Makefile       2010-03-26 07:40:41 UTC (rev 5856)
@@ -59,11 +59,18 @@
 fic/fic.dsc:
                $(MAKE) -C fic fic.dsc
 
+dk/digi-key.inv:
+               $(MAKE) -C dk digi-key.inv
+
+dk/digi-key.dsc:
+               $(MAKE) -C dk digi-key.dsc
+
 fic/missing.equ:
                $(MAKE) -C fic missing.equ
 
 spotless:
                $(MAKE) -C fic spotless
+               $(MAKE) -C dk spotless
                rm -f gta02-core.par gta02-core.ord darfon.chr ralec.chr
                rm -f gta02-core-bom.pro gta02-core-bom.sch
                rm -f gta02-core-bom-all.ps.gz gta02-core-bom-all.pdf
@@ -77,7 +84,7 @@
                  $(BOOM) prettyord - $(EQU) fic/fic.dsc | \
                  sed 's/^...  \(.\{,78\}\).*/\1/'
 
-show-dk:
+show-dk:       gta02-core.ord dk/digi-key.dsc
                (echo '#ORD'; grep '^DIGI-KEY ' gta02-core.ord ; ) | \
                  $(BOOM) prettyord - dk/digi-key.dsc | \
                  sed 's/^...  //' | \

Added: trunk/gta02-core/bom/dk/Makefile
===================================================================
--- trunk/gta02-core/bom/dk/Makefile                            (rev 0)
+++ trunk/gta02-core/bom/dk/Makefile    2010-03-26 07:40:41 UTC (rev 5856)
@@ -0,0 +1,33 @@
+CACHE=query.data
+
+.PHONY:                update regen regenerate clean spotless
+
+all:           digi-key.dsc digi-key.inv
+
+$(CACHE):      digi-key.equ
+               awk '/^DIGI-KEY / { print $$2 }' digi-key.equ | \
+                 perl ./dk-db.pl query >$@ || { rm -f $@; exit 1; }
+
+digi-key.dsc:  $(CACHE)
+               perl ./dk-db.pl dsc $(CACHE) >$@ || { rm -f $@; exit 1; }
+       
+digi-key.inv:  $(CACHE)
+               perl ./dk-db.pl inv $(CACHE) >$@ || { rm -f $@; exit 1; }
+
+update:
+               $(MAKE) clean all
+
+regen regenerate:
+               rm -f digi-key.dsc digi-key.inv
+               $(MAKE) all
+
+clean:
+               rm -f $(CACHE)
+
+#
+# we don't do a "make clean" on "make spotless", so that things like "make
+# optimist" don't erase the cache.
+#
+
+spotless:
+               rm -f digi-key.dsc digi-key.inv

Deleted: trunk/gta02-core/bom/dk/digi-key.dsc
===================================================================
--- trunk/gta02-core/bom/dk/digi-key.dsc        2010-03-26 06:28:59 UTC (rev 
5855)
+++ trunk/gta02-core/bom/dk/digi-key.dsc        2010-03-26 07:40:41 UTC (rev 
5856)
@@ -1,15 +0,0 @@
-#DSC
-DIGI-KEY ADG3304BCBZ-REEL7CT-ND        IC XLATOR 4CH 1.2/5.5V 12-WLCSP
-DIGI-KEY P10850SCT-ND          LT SWITCH SIDE W/BOSS J LEAD SMD
-DIGI-KEY P11169CT-ND           NOISE FILTER 2 MODE 1K OHM SMD
-DIGI-KEY HFQ439CT-ND           CONN FPC 39POS .3MM GOLD SMD
-DIGI-KEY 490-4980-1-ND                 CONN MW COAXIAL WITH SWITCH SMD
-DIGI-KEY SI1040X-T1-E3TR-ND    IC LOAD SW N/P-CH MOSFET SOT563F
-DIGI-KEY 296-18200-1-ND                IC SNGL 2IN POS-NAND GATE SC70-5
-DIGI-KEY H9161CT-ND            CONN RECPT ULTRA-MINI COAX SMD
-DIGI-KEY 668-1181-ND           MIC ELECT -42dB+-3dB 4*1.2mm 2V 0.5mA
-DIGI-KEY 101-00492-20-1-ND     CONN 8PS SIM + 16PS MICRO-SD PCB
-DIGI-KEY 478-5526-1-ND         CAP TANT 220UF 4.0V SMD
-DIGI-KEY NTGD1100LT1GOSCT-ND   MOSFET N/P-CH 8V 3.3A 6-TSOP
-DIGI-KEY RMCF1/16S150FRCT-ND   RES 150 OHM 1/16W 1% 0402 SMD
-DIGI-KEY 557-1388-1-ND         IC SDRAM 512MBIT 133MHZ 90VFBGA

Deleted: trunk/gta02-core/bom/dk/digi-key.inv
===================================================================
--- trunk/gta02-core/bom/dk/digi-key.inv        2010-03-26 06:28:59 UTC (rev 
5855)
+++ trunk/gta02-core/bom/dk/digi-key.inv        2010-03-26 07:40:41 UTC (rev 
5856)
@@ -1,21 +0,0 @@
-#INV
-# 
-# Note: many parts are cut-tape and thus need re-reeling. 
-#
-DIGI-KEY ADG3304BCBZ-REEL7CT-ND                6726    USD 1 2.43 25 1.94
-DIGI-KEY P10850SCT-ND                  31180   USD 1 0.76 10 0.569
-DIGI-KEY P11169CT-ND                   7128    USD 1 0.68 10 0.509 100 0.3737
-DIGI-KEY HFQ439CT-ND                   4738    USD 1 3.02 25 2.34  100 1.872
-DIGI-KEY 490-4980-1-ND                 12423   USD 1 0.57 25 0.4388
-DIGI-KEY SI1040X-T1-E3TR-ND            0       USD 3000 0.294
-# the SI1040X is a family of similar switches. Shouldn't be hard to find
-# another one.
-DIGI-KEY 296-18200-1-ND                        0       USD 1 0.61 25 0.3596
-# consider using a different package
-DIGI-KEY H9161CT-ND                    39012   USD 1 1.46 10 1.19
-DIGI-KEY 668-1181-ND                   175     USD 1 3.54 10 2.525
-DIGI-KEY 101-00492-20-1-ND             1200    USD 1 2.83 10 2.396
-DIGI-KEY 478-5526-1-ND                 3193    USD 1 1.20 10 1.044
-DIGI-KEY NTGD1100LT1GOSCT-ND           3776    USD 1 0.73 10 0.612
-DIGI-KEY RMCF1/16S150FRCT-ND           33156   USD 1 0.04 10 0.025 50 0.0138
-DIGI-KEY 557-1388-1-ND                 2471    USD 1 17.53 10 16.002 25 14.8592

Added: trunk/gta02-core/bom/dk/dk-db.pl
===================================================================
--- trunk/gta02-core/bom/dk/dk-db.pl                            (rev 0)
+++ trunk/gta02-core/bom/dk/dk-db.pl    2010-03-26 07:40:41 UTC (rev 5856)
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+
+sub rows
+{
+    local $s = $_[0];
+    my @res = ();
+
+    while ($s =~ m#.*?<tr>(.*?)</tr>#) {
+       push(@res, $1);
+       $s = $';
+    }
+    return @res;
+}
+
+
+sub cols
+{
+    local $s = $_[0];
+    my @res = ();
+
+    while ($s =~ m#.*?<td[^>]*>(.*?)</td>#) {
+       push(@res, $1);
+       $s = $';
+    }
+    return @res;
+}
+
+
+sub usage
+{
+    print STDERR "usage: $0 (query|dsc|inv) [file ...]\n";
+    exit(1);
+}
+
+
+$mode = shift @ARGV;
+&usage unless $mode eq "query" || $mode eq "dsc" || $mode eq "inv";
+
+if ($mode eq "query") {
+    while (<>) {
+       chop;
+       s/#.*//;
+       next if /^\s*$/;
+       next if /^\s/;
+       s/\s.*//;
+       push(@pn, $_);
+    }
+
+    exit unless 0...@pn;
+
+    $cmd = "wget -nv -O - ".join(" ",
+      map
+      "http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail\\&name=$_";,
+      @pn);
+    $q = `$cmd`;
+
+    print $q;
+    exit;
+}
+
+
+$q = join("", <>);
+$q =~ tr/\r\n//d;
+
+print "#DSC\n" if $mode eq "dsc";
+print "#INV\n" if $mode eq "inv";
+print "# MACHINE-GENERATED. DO NOT EDIT !\n";
+print "# ", `date -u`;
+
+for (split(/<!DOCTYPE HTML/, $q)) {
+    next unless m#align=right>Digi-Key Part Number</th><td>([^<]+)</td#;
+    $pn = $1;
+    $qty = 0;
+    if (m#align=right>Quantity Available</th><td[^>]*>([0-9,]+)<#) {
+       ($qty = $1) =~ tr/,//d;
+    }
+    next unless m#align=right>Description</th><td>(.*?)</td#;
+    $dsc = $1;
+    next unless m#<table.*<th>Price Break<(.*?)</table>#;
+    if ($mode eq "dsc") {
+       print "DIGI-KEY $pn $dsc\n";
+       next;
+    }
+    print "DIGI-KEY $pn $qty USD";
+    for (&rows($1)) {
+       @c = &cols($_);
+       next unless $c[0] =~ /^[0-9,]+$/;
+       next unless $c[1] =~ /^[0-9.]+$/;
+       $c[0] =~ tr/,//d;
+       $c[1] =~ tr/,//d;       # let's hope we don't need this one often :)
+       $c[1] =~ s/0+$// if $c[1] =~ /\./;
+       print " $c[0] $c[1]";
+    }
+    print "\n";
+}


Property changes on: trunk/gta02-core/bom/dk/dk-db.pl
___________________________________________________________________
Name: svn:executable
   + *




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to