View on GitHub

fritzing-renumber-cons

Python scripts mainly used for renumbering connectors

Download this project as a .zip file Download this project as a tar.gz file

What is Fritzing?

Fritzing is an open source initiative to develop amateur or hobby CAD software for the design of electronics hardware, intended to allow designers and artists to build more permanent circuits from prototypes. It was developed at the University of Applied Sciences Potsdam. Fritzing is free software under the GPL 3.0 or later license, with the source code available on GitHub and the binaries at a monetary cost, which is allowed by the GPL.

About the python scripts

Running the scripts

There are a few ways to run the script, and I’ll list three of them:

Windows (Python Interpreter)

In command prompt (assuming you have installed python and added it to path!), run

pip install lxml

With the LXML library installed, cd to the location where you have stored the scripts, and run

python [ScriptName].py [Filename].svg

Windows (cygwin)

For cygwin you need to install cygwin. Use the setup program as detailed on cygwin website. The basic install with the following additions does fine:

python3: Py3K language interpreter 
python3-lxml: Python XML2/XSLT bindings

(and all their associated dependencies) with that in place from a cygwin terminal copy the python scripts

FritzingCheckPartCfg.py
setbb.py
setsch.py
E2fRemoveUnusedConnectors.py
FritzingToolsw.py
PPToolsw.py

to /usr/local/bin

chmod ugo+x /usr/local/bin/*.py

Linux (Ubuntu 16.04 LTS)

Peter Van Epp - copy the py scripts to /usr/local/bin via sudo:

sudo cp FritzingCheckPartCfg.py /usr/local/bin 
sudo cp setbb.py /usr/local/bin
sudo cp setsch.py /usr/local/bin
sudo cp E2fRemoveUnusedConnectors.py /usr/local/bin
sudo cp FritzingToolsw.py /usr/local/bin
sudo cp PPToolsw.py /usr/local/bin

chmod ugo+x /usr/local/bin/*.py

The Ubuntu install appears to have lxml and python 3 already installed Note the script has problems with unicode under python 2.7 and probably won’t run there without modification (which I don’t know how to make).

Linux (Ubantu 18.04 LTS)

Kjell Mogernstern - Python3 is required

git clone git@github.com:RAPTOR7762/fritzing-renumber-cons.git
pip install --user lxml

setbb.py and setsch.py

These python scripts make changes to the specified SVG file, typically renumbering connectors.

Debug Mode

Note - Set the initial cfg.Debug value before getopt runs (which will override this value). Used to debug the getopt routines before a cfg.Debug value is set. For normal operation, set it to 0 to supress debugging until a debug value is set by getopt. To enable debugging getopt, set a value in cfg.Debug.

Warning

These scripts are currently fairly rough but it works well enough. They may need to be modified to do what you want.

Contribute

You are welcome to make any contribution. but please contribute to the develop branch to ensure that the master branch is clean.