diff options
Diffstat (limited to 'projects/gerbonara/index.html')
-rw-r--r-- | projects/gerbonara/index.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/projects/gerbonara/index.html b/projects/gerbonara/index.html index 7da7f3e..65ec965 100644 --- a/projects/gerbonara/index.html +++ b/projects/gerbonara/index.html @@ -77,16 +77,16 @@ existing Gerber files exported from a normal PCB tool for artistic purposes.</p> <h2>Quick Start</h2> <p>First, install gerbonara from PyPI using pip:</p> <pre class="code shell literal-block"> -pip<span class="whitespace"> </span>install<span class="whitespace"> </span>--user<span class="whitespace"> </span>gerbonara -</pre> +<span class="lineno"></span><span class="line">pip<span class="w"> </span>install<span class="w"> </span>--user<span class="w"> </span>gerbonara +</span></pre> <p>Then, you are ready to read and write gerber files:</p> <pre class="code python literal-block"> -<span class="keyword namespace">from</span> <span class="name namespace">gerbonara</span> <span class="keyword namespace">import</span> <span class="name">LayerStack</span><span class="whitespace"> - -</span><span class="name">stack</span> <span class="operator">=</span> <span class="name">LayerStack</span><span class="operator">.</span><span class="name">from_directory</span><span class="punctuation">(</span><span class="literal string single">'output/gerber'</span><span class="punctuation">)</span><span class="whitespace"> -</span><span class="name">w</span><span class="punctuation">,</span> <span class="name">h</span> <span class="operator">=</span> <span class="name">stack</span><span class="operator">.</span><span class="name">outline</span><span class="operator">.</span><span class="name">size</span><span class="punctuation">(</span><span class="literal string single">'mm'</span><span class="punctuation">)</span><span class="whitespace"> -</span><span class="name builtin">print</span><span class="punctuation">(</span><span class="literal string affix">f</span><span class="literal string single">'Board size is </span><span class="literal string interpol">{</span><span class="name">w</span><span class="literal string interpol">:</span><span class="literal string single">.1f</span><span class="literal string interpol">}</span><span class="literal string single"> mm x </span><span class="literal string interpol">{</span><span class="name">h</span><span class="literal string interpol">:</span><span class="literal string single">.1f</span><span class="literal string interpol">}</span><span class="literal string single"> mm'</span><span class="punctuation">)</span> -</pre> +<span class="lineno"></span><span class="line"><span class="kn">from</span> <span class="nn">gerbonara</span> <span class="kn">import</span> <span class="n">LayerStack</span><span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="n">stack</span> <span class="o">=</span> <span class="n">LayerStack</span><span class="o">.</span><span class="n">from_directory</span><span class="p">(</span><span class="s1">'output/gerber'</span><span class="p">)</span><span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="n">w</span><span class="p">,</span> <span class="n">h</span> <span class="o">=</span> <span class="n">stack</span><span class="o">.</span><span class="n">outline</span><span class="o">.</span><span class="n">size</span><span class="p">(</span><span class="s1">'mm'</span><span class="p">)</span><span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s1">'Board size is </span><span class="si">{</span><span class="n">w</span><span class="si">:</span><span class="s1">.1f</span><span class="si">}</span><span class="s1"> mm x </span><span class="si">{</span><span class="n">h</span><span class="si">:</span><span class="s1">.1f</span><span class="si">}</span><span class="s1"> mm'</span><span class="p">)</span> +</span></pre> </div> <div class="section" id="command-line-interface"> <h2>Command-Line Interface</h2> @@ -94,10 +94,10 @@ pip<span class="whitespace"> </span>install<span class="whitespace"> </span>--us modifying, and merging Gerber files. To access it, use either the <tt class="docutils literal">gerbonara</tt> command that is part of the python package, or run <tt class="docutils literal">python <span class="pre">-m</span> gerbonara</tt> For a list of functions or help on their usage, you can use:</p> <pre class="code console literal-block"> -<span class="generic prompt">$ </span>python<span class="whitespace"> </span>-m<span class="whitespace"> </span>gerbonara<span class="whitespace"> </span>--help<span class="whitespace"> -</span><span class="generic output">[...] -</span><span class="generic prompt">$ </span>python<span class="whitespace"> </span>-m<span class="whitespace"> </span>gerbonara<span class="whitespace"> </span>render<span class="whitespace"> </span>--help -</pre> +<span class="lineno"></span><span class="line"><span class="gp">$ </span>python<span class="w"> </span>-m<span class="w"> </span>gerbonara<span class="w"> </span>--help<span class="w"></span></span> +<span class="lineno"></span><span class="line"><span class="w"></span><span class="go">[...]</span></span> +<span class="lineno"></span><span class="line"><span class="go"></span><span class="gp">$ </span>python<span class="w"> </span>-m<span class="w"> </span>gerbonara<span class="w"> </span>render<span class="w"> </span>--help +</span></pre> </div> <div class="section" id="development"> <h2>Development</h2> |