File: scripting.txt

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (34 lines) | stat: -rw-r--r-- 1,262 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
1. Action scripting
~~~~~~~~~~~~~~~~~~~
Action scripting is the builtin, non-turing-complete way of giving pcb-rnd
commands. On the GUI it's usually the ':' key that pops up the command line.
Most HIDs support the --listen argument that makes pcb-rnd also read commands
on the stdin.

The batch HID always reads commands on stdin (without --listen). Automated
pcb-rnd runs from shell is possible using a script like:

echo '
	action1()
	action2()
	...
' | pcb-rnd --gui batch

From within pcb-rnd the ExecuteFile(filename) action can be used to
load and execute a pcb-rnd action script from a file.

2. user scripting (embedded scripting)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pcb-rnd uses fungw for embedded scripting. This allows pcb-rnd to be
scripted in 12+ turing complete scripting languages, including awk, tcl,
python, perl, lua, some lisp dialects, etc. Embedded scripts run within
pcb-rnd (in the same process, same address space), having full access
to the action infrastructure:
 - embedded scripts can declare new actions that are accessible from
   menu, from the command line and from other embedded scripts
 - embedded scripts can execute actions (defined by pcb-rnd or other
   embedded scripts)

For more info see user/06_feature/scripting/