diff --git a/Dockerfile b/Dockerfile index 7157604..aefe9df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,12 +16,19 @@ RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME RUN cd / && \ - curl -sL https://github.com/thesourcerer8/altium2kicad/archive/master.zip -o altium2kicad.zip && \ + curl -L https://github.com/thesourcerer8/altium2kicad/archive/master.zip -o altium2kicad.zip && \ + curl -L https://github.com/xtoolbox/pcad2kicad/archive/master.zip -o pcad2kicad.zip && \ unzip altium2kicad.zip && \ - rm -f altium2kicad.zip && \ - mv /altium2kicad-master /altium2kicad - + unzip pcad2kicad.zip && \ + rm -f *.zip && \ + mv /altium2kicad-master /altium2kicad && \ + mv /pcad2kicad-master /pcad2kicad +RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\ + sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list &&\ + apt-get update && \ + apt-get install --no-install-recommends --no-install-suggests -y lua5.3 p7zip && \ + rm -rf /var/lib/apt/lists/* VOLUME ["/data"] WORKDIR /data/tongji/WRK/pcb diff --git a/Readme.md b/Readme.md index 17d88cd..f75d9d0 100644 --- a/Readme.md +++ b/Readme.md @@ -1,12 +1,58 @@ #Altium2KiCad -+ 用法 - + `unpack` 解包,将各个.pcbdoc .schdoc文件解决包 - + `sch2ki` 转换原理图 - + `pcb2ki` 转换PCB + ++ 用法: + + sch2ki : 转换原理图 + + pcb2ki : 转换PCB图 + + pcad2kicad : 转换PCAD SCH/PCB库(.LIA)为KiCAD库 + + adlib2kicad : 转换AD 原理图库(二进制)为KiCAD库 + ```bash alias pcb2ki='perl /altium2kicad/convertpcb.pl' alias sch2ki='perl /altium2kicad/convertschema.pl' alias unpack='perl /altium2kicad/unpack.pl' -``` \ No newline at end of file +alias pcad2kicad='lua5.3 pcad2kicad.lua' +alias adlib2kicad='lua5.3 ad2kicad.lua' +``` +---------------------------- +# PCAD/AD库文件转换KiCad工具 +# Convert PCAD/AD library to Kicad +特点: + +1. Altium Designer的二进制原理图库转换成KiCad格式 + +2. PCAD的ASCII原理图库转换成KiCad格式 + +3. PCAD的ASCII封装图库转换成KiCad格式 + +Feature: + +1. Altium Designer binary schlib to KiCad symbol library + +2. PCAD ASCII symbol library to KiCad symbol library + +3. PCAD ASCII footprint library to KiCad footprint library + + +## ad2kicad +require [7z](https://www.7-zip.org/download.html) and [lua 5.3](https://sourceforge.net/projects/luabinaries/files/5.3.4/) +### Signle mode: +```sh +lua ad2kicad.lua [outName] [fpLib] +``` +### Batch mode: +```sh +lua ad2kicad.lua --batch [outPath] [fpLib] [prefix] [O1=N1[ O2=N2...]] +``` + +## pcad2kicad +require [lua 5.3](https://sourceforge.net/projects/luabinaries/files/5.3.4/) +### Signle mode: +```sh +lua pcad2kicad.lua [outName] [outPath] [fpLib] +``` +### Batch mode: +```sh +lua pcad2kicad.lua --batch [outPath] [fpLib] [prefix] [O1=N1[ O2=N2...]] +``` diff --git a/ad2ki b/ad2ki.sh similarity index 100% rename from ad2ki rename to ad2ki.sh diff --git a/root/.bashrc b/root/.bashrc index e55de84..62ac8fe 100644 --- a/root/.bashrc +++ b/root/.bashrc @@ -122,3 +122,17 @@ fi alias pcb2ki='perl /altium2kicad/convertpcb.pl' alias sch2ki='perl /altium2kicad/convertschema.pl' alias unpack='perl /altium2kicad/unpack.pl' +alias pcad2kicad='lua5.3 /pcad2kicad/pcad2kicad.lua' +alias adlib2kicad='lua5.3 /pcad2kicad/ad2kicad.lua' + +help(){ + echo "用法:" + echo " sch2ki : 转换原理图" + echo " pcb2ki : 转换PCB图" + echo " pcad2kicad : 转换PCAD SCH/PCB库(.LIA)为KiCAD库" + echo " adlib2kicad : 转换AD 原理图库(二进制)为KiCAD库" +} + +help + +export PATH="$PATH:/altium2kicad:/pcad2kicad" \ No newline at end of file