added layout printing

This commit is contained in:
King Kévin 2013-10-07 11:03:04 +02:00
parent e498f6907f
commit 26e971511d
1 changed files with 11 additions and 2 deletions

View File

@ -32,11 +32,14 @@ task :default => [:version,:print,:notes]
desc "set version in schematic and layout"
task :version => [vsch,vpcb]
CLEAN.include(vsch)
CLEAN.include(vpcb)
CLOBBER.include("#{target}_*.sch")
CLOBBER.include("#{target}_*.pcb")
desc "print schematic (as pdf)"
task :print => "#{target}_schematic.pdf"
desc "print schematic and layout (as pdf)"
task :print => ["#{target}_schematic.pdf","#{target}_layout.pdf"]
CLEAN.include("#{target}_schematic.pdf")
CLEAN.include("#{target}_layout.pdf")
desc "export notes from schematic"
task :notes => "notes.txt"
@ -130,6 +133,12 @@ file "#{target}_schematic.pdf" => vsch do |t|
sh "gaf export -f pdf -c -o #{t.name} #{t.prerequisites.join(' ')} 2> /dev/null"
end
file "#{target}_layout.pdf" => vpcb do |t|
sh "pcb -x ps --psfile #{t.name}.ps #{t.prerequisites.join(' ')} 2> /dev/null"
sh "ps2pdf #{t.name}.ps #{t.name} 2> /dev/null"
sh "rm #{t.name}.ps 2> /dev/null"
end
file "notes.txt" => vsch do |t|
notes_data = bom2(t.prerequisites[0],"note")
File.open(t.name,"w") do |notes_file|