Browse Source

Get pnp.ids from uefi.org

The database at uefi.org seems to be more accurate and up to date.
See https://github.com/vcrhonek/hwdata/issues/4

Thanks to this change 'unoconf' is no longer needed.
Vitezslav Crhonek 3 years ago
parent
commit
4edeb518d1
2 changed files with 8 additions and 13 deletions
  1. 7 7
      Makefile
  2. 1 6
      README

+ 7 - 7
Makefile

@@ -115,7 +115,7 @@ iab.txt.downloaded:
 
 pnp.ids.xlsx:
 	@curl -o $@ \
-	    http://download.microsoft.com/download/7/E/7/7E7662CF-CBEA-470B-A97E-CE7CE0D98DC2/ISA_PNPID_List.xlsx
+	    https://www.uefi.org/uefi-pnp-export
 
 usb.ids: usb.ids.utf8
 	dos2unix -n $? $@
@@ -130,17 +130,17 @@ iab.txt: iab.txt.utf8
 	dos2unix -n $? $@
 
 pnp.ids.orig: pnp.ids.xlsx
-	@unoconv --stdout -f csv $? | \
+	grep "class" $? | \
 	    tr ' ' ' ' | \
 	    sed -n \
-		-e 's/^\s*"\s*\(.*\)\s*"/\1/' \
-		-e 's/\s\{2,\}/ /g' \
-		-e 's/\s*(used as 2nd pnpid)\s*//' \
-		-e 's:^\(.*\)\s*,\s*\([a-zA-Z@]\{3\}\)\s*,\s*\([0-9]\+/[0-9]\+/[0-9]\+\):\2\t\1:p' | \
+	        -e 's/\s\{2,\}/ /g' \
+	        -e 's/\&/\&/g' \
+	        -e "s/\'/'/g" \
+	        -e 's:^.*<tr class=".*"><td>\(.*\)</td><td>\([a-zA-Z@]\{3\}\).*</td><td>.*$$:\2\t\1:p' | \
 	    sed 's/\s*$$//' | sort -u >$@
 
 pnp.ids: pnp.ids.orig pnp.ids.patch
-	patch -o $@ <pnp.ids.patch
+	patch -p1 -o $@ pnp.ids.orig pnp.ids.patch
 
 %.utf8: %.downloaded
 	@text=`LANG=C file $?`

+ 1 - 6
README

@@ -1,9 +1,4 @@
 To update the various IDs files, run 'make download'.
-Requisities:
-  unoconf - python script using libreoffice to convert all office
-            documents to anything else
-    * used to update pnp.ids from MS database.
-    
-    
+
 Related:
  * python binding https://github.com/xsuchy/python-hwdata