sparkfunX / Buzzard

Software tools for EAGLE silkscreen generation
100 stars 18 forks source link

request command script option #9

Closed oclyke closed 4 years ago

oclyke commented 4 years ago

Love this CLI Buzzard! Now I can finally get rid of having a library file per session on the web GUI.

I'd like to be able to keep a single script that is meant to generate all required buzzard labels. Right now I don't see options that would make this easy... the output gets stored as 'output.lbr' in the repo root and (I presume) it gets overwritten.

Writing a script would be possible, but it might be simpler/easier to build the command list handling right into Buzzard. I propose something like:

python buzzard.py --collection "buzzard_labels_collection.txt" -o lib

buzzard_labels_collection.txt:

"label1" -s 0.06 -a tl
"default label"
"fancy label" -f fredoka -s 0.5

Added perk: changes to buzzard labels used in a design are now easily viewed in source control software!

oclyke commented 4 years ago

edit: I started on a PR for this issue and noticed that the label text is split on , characters - this allows for multiple labels to be generated using the same other options (size, font, anchor location, etc)

I am still interested in the option to process jobs from a text file - allowing different options for each label

NPoole commented 4 years ago

I was thinking about the best way to generate different tags with different options and this text file thing isn't a bad idea. I'll play with it.

oclyke commented 4 years ago

Cool! I have been trying to implement this without changing much of the existing code and the biggest hurdle is how to effectively concatenate multiple calls to generate.

One solution would be some sort of 'append' mode. I've got a draft PR using that concept here: #10

The other (that I see) is to refactor the string accumulators (labelStrings + friends) so that they accumulate all strings from successive groups of options.

To me they both have pros + cons:

I'm curious which you would opt for...

NPoole commented 4 years ago

I'll go look at your PR now, but the idea of an append mode is really good, I think. It's something I wanted to implement in the original web-version of buzzard because my download folder was getting filled with libraries that have, like, two labels each in them.

NPoole commented 4 years ago

This is dope, I approved your PR and documented it in the README

oclyke commented 4 years ago

Thanks! Buzzard is dope... glad I could add a little something to it