doc: add kicad database library
This commit is contained in:
parent
199ac09b69
commit
b6f11afe3f
34
README.md
34
README.md
|
@ -66,3 +66,37 @@ now go to http://localhost:4245 and you are ready to use it.
|
||||||
the port and database file is defined in `server.rb`.
|
the port and database file is defined in `server.rb`.
|
||||||
|
|
||||||
use a proxy web server to handle the authentication, TLS, compression, ...
|
use a proxy web server to handle the authentication, TLS, compression, ...
|
||||||
|
|
||||||
|
KiCAD
|
||||||
|
=====
|
||||||
|
|
||||||
|
KiCAD can have a [KiCad database library](https://docs.kicad.org/master/en/eeschema/eeschema.html#database_libraries).
|
||||||
|
Running the `kicad_lib.rb` script will create tables (actually views) for each partdb category to be used by KiCAD.
|
||||||
|
The views are added without the `partdb.db` database file itself.
|
||||||
|
The script will also create the `partdb.kicad_dbl` library file.
|
||||||
|
This is the file to be used by KiCAD to add the database library.
|
||||||
|
But first you also need to install and configure ODBC so KiCAD can actually access the database:
|
||||||
|
|
||||||
|
~~~
|
||||||
|
# install ODBC
|
||||||
|
sudo pacman -S unixodbc
|
||||||
|
# install OBDC sqlite driver
|
||||||
|
pikaur -S sqliteodbc
|
||||||
|
# fix ODBC sqlite configuration
|
||||||
|
sudo sed -i 's|/usr/lib64/libsqlite3odbc.so|/usr/lib/libsqlite3odbc.so|g' /etc/odbcinst.ini
|
||||||
|
sudo sed -i 's|/usrl/lib64/libsqlite3odbc.so|/usr/lib/libsqlite3odbc.so|g' /etc/odbcinst.ini
|
||||||
|
sudo sed -i 's|/usr/lib64/libsqliteodbc.so|/usr/lib/libsqlite3odbc.so|g' /etc/odbcinst.ini
|
||||||
|
sudo sed -i 's|/usrl/lib64/libsqliteodbc.so|/usr/lib/libsqlite3odbc.so|g' /etc/odbcinst.ini
|
||||||
|
# add database
|
||||||
|
cat << EOF | sudo tee -a /etc/odbc.ini
|
||||||
|
[partdb]
|
||||||
|
Description=electronic parts database
|
||||||
|
Driver=SQLite
|
||||||
|
Database=<path to partdb.db>
|
||||||
|
Timeout=2000
|
||||||
|
EOF
|
||||||
|
# ensure it works
|
||||||
|
isql partdb
|
||||||
|
SELECT * FROM part LIMIT 1;
|
||||||
|
exit
|
||||||
|
~~~
|
||||||
|
|
Loading…
Reference in New Issue