Giter Site home page Giter Site logo

buzzard's Introduction

SparkFun Buzzard Label Generator

If you're looking for legacy buzzard, it is still live at github.io and the source can be found in the gh-pages branch of this repo. Below is the documentation for Buzzard.py. For extensive legacy documentation, see the wiki.

usage: buzzard.py [-h] [-f FONTNAME] [-s SCALEFACTOR] [-l EAGLELAYERNUMBER]
                  [-v] [-o {b,ls,lib}] [-n SIGNALNAME] [-u SUBSAMPLING]
                  [-t TRACEWIDTH] [-a {tl,cl,bl,tc,cc,bc,tr,cr,br}]
                  labelText

positional arguments:
  labelText             Text to write on the label

optional arguments:
  -h, --help            show this help message and exit
  -f FONTNAME           Typeface to use when rendering the label
  -s SCALEFACTOR        Text Height in inches (same as EAGLE text size value)
  -l EAGLELAYERNUMBER   Layer in EAGLE to create label into (default is tPlace
                        layer 21)
  -v                    Verbose mode (helpful for debugging)
  -o {b,ls,lib}         Output Mode ('b'=board script, 'ls'=library script,
                        'lib'=library file)
  -n SIGNALNAME         Signal name for polygon. Required if layer is not 21
                        (default is 'GND')
  -u SUBSAMPLING        Subsampling Rate (larger values provide smoother curves 
                        with more points)
  -t TRACEWIDTH         Trace width in mm
  -a {tl,cl,bl,tc,cc,bc,tr,cr,br}
                        Footprint anchor position (default:cl)
  -w {w,a}              Output writing mode (default:w)
  -d DESTINATION        Output destination filename (extension depends on -o
                        flag)
  -c                    If specified labelText is used as a path to collection
                        script (a text list of labels and options to create)                      

labelText

Label text should be enclosed in doublequotes in order to pass certain characters via the commandline. Note: If you're using Windows PowerShell you may need to escape certain characters using the "`" (backward apostrophe/grave)

Tag Shapes

By default, Buzzard.py will output plain text labels. If you want to make a flag label, you can surround your text with the following special characters: ()[]/\><

For example:

(capsule)
/forward-slash/
\back-slash\
>flagtail-pointer>
[square]

These tag shape indicators can be mixed and matched as well, i.e. (half-capsule]

Multiple Tags

When using the -o lib output format, multiple comma-separated tags can be generated. If you need multiple tags with individual formatting, try collections mode!

Overlining

Buzzard.py supports using "!" to overline tags in the same way that EAGLE does. For the most predictable results, overlined text should be surrounded by exclamation marks, i.e. in EAGLE, "!INT" will produce overlined text, but it is best practice to write "!INT!" instead.

Literal Exclamation Marks

If you want to use the literal "!" character in your tag, it should be escaped with a leading backslash, i.e. "\!"

Literal Backslashes

If you want to use the literal "\" character in your tag, it should be escaped with a leading backslash, i.e. "\\" A backslash in the first position of a tag string will always be interpreted as a tag shape indicator.

FONTNAME

Buzzard.py will attempt to use any TrueType font in the /typeface directory, but because buzzard cannot read the GPOS tables, it requires character offsets to be explicitly defined in an eponymous python module. Modules currently exist only for the included typefaces "Roboto" and "FredokaOne". If a module doesn't exist, but the font is present, buzzard will attempt to generate the tag without position information.

SCALEFACTOR

This argument controls the output size of the tag. Units are height of text in inches. The default is 0.04".

EAGLELAYERNUMBER

This argument controls which EAGLE layer the tag is written to. Default value is 21 (tPlace)

Verbose Mode

If something gets borked, try running again with -v to see what's happening under the hood

Output Mode

This argument controls which format the tag output is generated for

Board Script Mode

By default, buzzard.py will generate a file called output.scr which can be run in the board editor.

Library Script Mode

Library script mode will generate a file called output.scr which can be run in the library footprint editor.

Library Package Mode

Library package mode will generate a file called output.lbr which is an EAGLE library file containing the specified tag/tags

SIGNALNAME

This argument defines the EAGLE signal name of the output, which is only required for metal layers. It is GND by default.

SUBSAMPLING

This argument essentially defines the resolution of the output. A smaller number will produce smoother curves but larger files. Note: Smaller scale factors require smaller subsampling factors

TRACEWIDTH

Tracewidth of output in mm

Anchor Position

In library package output mode, the position of the anchor point can be specified using the -a argument. The default value is cl The following values are permissible:

tl - top left
cl - center left
bl - bottom left
tc - top center
cc - center center
bc - bottom center
tr - top right
cr - center right
br - bottom right

Output Writing Mode

By default, buzzard.py with overwrite the output file. Running with the -w a option, however, will run buzzard.py in "append mode," adding the specified tag to the existing output file.

Destination Filename

Using the -d flag will allow you to specify the name of the output file. The file extension will automatically be selected based on the output format.

Generate Collections

Passing the -c flag will run buzzard.py in collection mode. Instead of passing a comma-separated collection of strings, you may pass the path to a text file containing the strings that you wish to generate. In collection mode, each tag can be generated with its own properties. An example collection.txt may be found in the ./tests/ directory

buzzard's People

Contributors

npoole avatar nseidle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

chromico

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.