.TH lepton-cli 1 "May 29, 2022" "Lepton EDA" 1.9.18.20220529 .SH NAME lepton-cli - Lepton EDA Command-Line Utility .SH "SYNOPSIS" .B lepton-cli [\fIOPTION\fR ...] \fICOMMAND\fR [\fIARGS\fR ...] .SH "DESCRIPTION" .PP .B lepton-cli is part of the Lepton EDA (Electronic Design Automation) toolset. It provides a number of small command-line utilities for working with schematic and symbol files, and is designed to be used for batch processing of designs created using the schematic editor \fBlepton-schematic\fR(1). It currently has three built-in \fICOMMAND\fRs: .B lepton-cli export is used to create SVG, PDF, PNG, PS and EPS files from schematic and symbol files, for printing or embedding in other documents. .B lepton-cli config allows reading and writing settings in Lepton EDA project, user and system configuration stores. .B lepton-cli shell provides a Scheme REPL for command-line batch processing of schematic data. .SH "GENERAL OPTIONS" .TP 8 \fB--no-rcfiles\fR Prevent `gafrc' Scheme initialisation files from being loaded. .TP 8 \fB-h\fR, \fB--help\fR Print a help message. .TP 8 \fB-V\fR, \fB--version\fR Print \fBlepton-cli\fR version information. .SH "EXPORTING IMAGE FILES" .B lepton-cli export [\fIOPTION\fR ...] \fB-o\fR \fIOUTPUT\fR [\fI--\fR] \fIFILE\fR ... .B lepton-cli export can export schematic and symbol files in a variety of image formats for printing or further processing. It currently supports single-page PNG, SVG and EPS output, and multi-page PS and PDF output. It accepts a variety of options for controlling how the output is formatted. .TP 8 \fB-o\fR, \fB--output\fR=\fIFILE\fR Output generated image data to \fIFILE\fR. .TP 8 \fB-f\fR, \fB--format\fR=(\fBpng\fR | \fBpdf\fR | \fBsvg\fR | \fBps\fR | \fBeps\fR) Specify an output format. Usually, this option is not required, because \fBlepton-cli export\fR will infer the correct format from the file extension of the output file. .TP 8 \fB-p\fR, \fB--paper\fR=\fINAME\fR Size the output for a particular paper size. The \fINAME\fR should be a PWG 5101.1-2002 paper name. For example, valid values include `iso_a4', `na_letter', or `na_d'. .TP 8 \fB-P\fR, \fB--paper-names\fR Print paper size names suitable to pass to the \fB--paper\fR option and exit. .TP 8 \fB-l\fR, \fB--layout\fR=(\fBauto\fR | \fBlandscape\fR | \fBportrait\fR) When using a paper size, set the orientation of the output. If `auto' layout is used, the orientation that best fits the drawing will be used. .TP 8 \fB-s\fR, \fB--size\fR=(\fBauto\fR | \fIWIDTH\fR:\fIHEIGHT\fR) Size the output with specific dimensions. If the size is `auto', select the size that best fits the drawing. .TP 8 \fB-k\fR, \fB--scale\fR=\fIFACTOR\fR Set the output scale \fIFACTOR\fR. This is a distance identical with 100 points (1 default grid spacing) in \fBlepton-schematic\fR(1) coordinate space. It is used to size the output when neither \fB--paper\fR nor \fB--size\fR are given, and defaults to 100 mil. .TP 8 \fB-m\fR, \fB--margins\fR=(\fBauto\fR | \fITOP\fR[:\fILEFT\fR[:\fIBOTTOM\fR[:\fIRIGHT\fR]]]) Set the widths of the margins to be used. If `auto' margins are specified, a sensible default value will be chosen. Up to four margin widths can be provided. If one is provided, it will be used on all four sides. If two are provided, the first will be used for the top/bottom and the second for the left/right. If three are provided, the first will be used for the top, the second for left/right, and the third for the bottom. .TP 8 \fB-a\fR, \fB--align\fR=(\fBauto\fR | \fIHALIGN\fR:\fIVALIGN\fR) Set how the drawing is aligned within the page. \fIHALIGN\fR controls the horizontal alignment, and \fIVALIGN\fR the vertical. Each alignment value should be in the range 0.0 to 1.0. The `auto' alignment is equivalent to a value of `0.5:0.5', i.e. centered. .TP 8 \fB-d\fR, \fB--dpi\fR=\fIDPI\fR Set the number of pixels per inch used when generating PNG output. .TP 8 \fB-c\fR, \fB--color\fR Enable colour output. .TP 8 \fB--no-color\fR Disable color output. .TP 8 \fB-F\fR, \fB--font\fR=\fIFONT-FAMILY\fR Set the font to be used for drawing text. .TP 8 \fB--\fR Treat all remaining arguments as schematic or symbol filenames. Use this if you have a schematic or symbol filename which begins with `-'. .PP The \fB--size\fR, \fB--margins\fR, or \fB--scale\fR options described above accept values using units of `mm', `cm', `in', `pc', `px', or `pt'. If you do not provide a unit, points are assumed. N.b. that `px' are evaluated relative to the current \fB--dpi\fR setting. .PP When using the \fB--size\fR, \fB--margins\fR, or \fB--align\fR options with multiple values, you may use `;', or ` ' as a separator between them instead of `:'. In such a case, remember to properly quote your arguments to avoid them to be interpreted by your shell. .SH "ACCESSING CONFIGURATION" .B lepton-cli config [\fIOPTION\fR] [\fIGROUP\fR \fIKEY\fR [\fIVALUE\fR]] .B lepton-cli config is a basic utility for inspecting and modifying Lepton EDA configuration stores. .PP If a \fIGROUP\fR and \fRKEY\fR are specified, retrieves the value of that configuration parameter. If a \fIVALUE\fR is specified, sets the value of that parameter. The \fB-p\fR, \fB-u\fR and \fB-s\fR options can be used to select the configuration store affected (by default, the project configuration store for the current working directory). If no \fIGROUP\fR and \fIKEY\fR are provided, outputs the filename of the selected configuration store. .PP .TP 8 \fB-p \fR[\fIPATH\fR], \fB--project\fR[=\fIPATH\fR] Select the project configuration store of the project located in \fIPATH\fR. If no \fIPATH\fR is provided, selects the project in the current working directory. Unlike \fB--project\fR, for which an optional argument must be specified using \fB=\fR, any argument after \fB-p\fR is considered to be a path, not a configuration group. It may be specified as \fB-pPATH\fR or \fB-p PATH\fR. .TP 8 \fB-u\fR, \fB--user\fR Select the user configuration store. .TP 8 \fB-s\fR, \fB--system\fR Select the system configuration store. Depending on user permissions, the system configuration store may be read-only. .TP 8 \fB-c\fR, \fB--cache\fR Select the program-specific configuration store (CACHE configuration context, associated with $XDG_CACHE_HOME/lepton-eda/gui.conf configuration file). .SH "SCHEME PROCESSING" .B lepton-cli shell [\fIOPTION ...\fR] .B lepton-cli shell provides a 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. .TP 8 \fB-s\fR \fIFILE\fR Evaluate Scheme source code from \fIFILE\fR, and exit. .TP 8 \fB-c\fR \fIEXPR\fR Evaluate the Scheme expression \fIEXPR\fR, and exit. .TP 8 \fB--\fR Stop scanning arguments; run interactively. .TP 8 \fB-L\fR \fIDIRECTORY\fR Prepend \fIDIRECTORY\fR to the list of directories to be searched for Scheme files. .TP 8 \fB-l\fR \fIFILE\fR Evaluate Scheme source code from \fIFILE\fR. .PP The \fB-s\fR, \fB-c\fR and \fB--\fR switches stop argument processing and pass all the remaining arguments as the value of `(command-line)'. .SH AUTHORS See the `AUTHORS' file included with this program. .SH COPYRIGHT .nf Copyright \(co 2012-2017 gEDA Contributors. Copyright \(co 2017-2022 Lepton Developers. License GPLv2+: GNU GPL version 2 or later. Please see the `COPYING' file included with this program for full details. .PP This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH SEE ALSO \fBlepton-schematic\fR(1). For more information on the Scheme API, see the \fBlepton-scheme\fR Texinfo manual. If the \fBinfo\fR program is properly installed at your site, the command .IP .B info lepton-scheme .PP should give you access to the complete manual.