File: lepton-cli-shell.texi

package info (click to toggle)
lepton-eda 1.9.18-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,024 kB
  • sloc: ansic: 66,688; lisp: 29,508; sh: 6,792; makefile: 3,111; perl: 1,404; pascal: 1,161; lex: 887; sed: 16; cpp: 8
file content (69 lines) | stat: -rw-r--r-- 1,825 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@node lepton-cli shell
@section lepton-cli shell
@cindex lepton-cli shell

@code{lepton-cli shell} provides an interactive Scheme Read-Eval-Print
Loop (REPL) for automating processing of schematic and symbol
files. It is designed to be used with the Lepton EDA Scheme API.
@ifhtml
@xref{Top,,, lepton-scheme.html, Lepton EDA Scheme Reference Manual}
@end ifhtml
@ifnothtml
@xref{Top,,, lepton-scheme, Lepton EDA Scheme Reference Manual}
@end ifnothtml
for more information on which Lepton EDA Scheme procedures you can
use.

Usage:

@example
lepton-cli shell [OPTION ...]
@end example

Options:

@table @option

@item -L @var{DIRECTORY}
Prepend @var{DIRECTORY} to the list of directories to be searched for
Scheme files.

@item -l @var{FILE}
Evaluate Scheme source code from @var{FILE}.

@item -s @var{FILE}
Evaluate Scheme source code from @var{FILE}, and exit.

@item -c @var{EXPR}
Evaluate the Scheme expression @var{EXPR}, and exit.

@item --
Stop scanning arguments; run interactively.

@end table

The switches @samp{-s}, @samp{-c} and @samp{--} stop argument
processing and pass all the remaining arguments as the value of
@code{(command-line)}.


A couple of simple examples would not harm?  Imagine you would want to
find out the path to your user configuration directory. Type:

@example
lepton-cli shell -c \
  "(use-modules (lepton os)) (display (user-config-dir))"
@print{} /home/user/.config/lepton-eda
@end example

Now, suppose you want to know where is better to put your system-wide
configuration files:

@example
lepton-cli shell -c \
  "(use-modules (lepton os)) (display (sys-config-dirs))"
@print{} (/etc/xdg/lepton-eda /usr/local/share/lepton-eda)
@end example

Hopefully, you don't need this for any of your project's directories
;-) But who knows...  If so, try to compose a useful command yourself.