339 Commits

Author SHA1 Message Date
Jason R. Jones
448c4e6bdc Merge branch 'dev' of https://github.com/formatc1702/WireViz into dev
# Conflicts:
#	src/wireviz/build_examples.py
#	src/wireviz/wv_helper.py
2020-07-28 09:55:35 -04:00
Daniel Rojas
23c17e66bf Change wire padding behavior
Addresses #131
2020-07-27 22:40:59 +02:00
KV
99ca1859eb Fix change requests from owner as descibed in PR #118
- Add double quotes around path string in `os.system()` call and
  status output to handle any spaces in the path.
- Split the `generated_extensions` list into the two lists
  `extensions_not_containing_graphviz_output` and
  `extensions_containing_graphviz_output` for readability.
2020-07-27 20:14:14 +02:00
KV
21db0d509e Add CLI option -c that allows comparing Graphviz output also 2020-07-27 20:14:14 +02:00
KV
378e13b988 Move group loop into build_generated() for consistency
Now, all action functions are called with a group list as argument.
2020-07-27 20:14:14 +02:00
KV
94ca9cc358 Restructure the group dict initialization
By putting all value entries on separate lines with a trailing comma,
it becomes easier to read the diff when later inserting or deleting
the first or last value entry in any dict.
2020-07-27 20:14:14 +02:00
KV
476f85bcf5 Make all actions honor the optional argument -g or --group
This make it possible to append '-g' or '--groups' followed by
space separated group names to any CLI action command, and the
set of generated files affected by the command will be limited
to the selected groups ('examples', 'tutorial', and 'demos').
Default is all groups. A simple help text is added for each of
the arguments (action and groups) to improve the autogenerated
CLI help output.

This is a squash rebase of these commits:
- p ec29076 Make all actions honor the optional argument -generate
- s e3ad11a Move open_file_append() outside the if to avoid re-open
- s ba4b900 Avoid including readme in all file groups
- s 1ca8bd1 Simplify code
- s a9e7337 Rename some variables to better reflect their contents and relations
- s 58a54b2 Move test to include readme inside collect_filenames() function
- s f2a0db0 Improve status output by adding group name
- s d3b299b Rename -generate option to -g/--groups and add argument help
2020-07-27 20:14:14 +02:00
KV
4eedd94164 Add actions to compare against and restore from the latest commit
Add new actions:
- 'compare' action to compare generated files (except those
  generated by Graphviz) against the latest commit, and
- 'restore' action to restore generated files from the latest commit.

This is a squash rebase of these commits:
- p 9ad3e13 Reduce code duplication by moving common code into a generic function
- s d4feae6 Add action to restore generated files from git repository
- s 64f6507 Add action to compare generated files against git repository
- s 099c202 Simplify code
2020-07-27 20:14:14 +02:00
Daniel Rojas
3fa015cabd Refactor build_examples.py
- Use `pathlib.Path` instead of `os.path`
- Fix order of files while building
- Consolidate code for building demos, examples and tutorial
- Change argument from `tutorials` to `tutorial` to remain consistent
- Add some indentation in console output for better readability
2020-07-27 20:14:14 +02:00
KV
1815a13cd6 Make each shield wire uniform and allow cable.shield color
As the spline shield wires were rendered as tinned wires with
black borders, and the shield wires in cable nodes were rendered
as a single (bottom) border, they didn't fit well together.

Each shield wire is now rendered equally along the spline sections
and in cable nodes. If cable.shield is true, they are rendered as
thin black wires in the same way as before multi-colors were
introduced. The new feature is that cable.shield is allowed to
contain a two-letter color code to specify a colored shield wire
with black borders.

The shield wire thickness is not increased, even if the cable has
some multi-colored wires that makes all other wires to increase.

This fixes bug #125.
2020-07-27 20:11:47 +02:00
Tyler Ward
b9a4783b6f
Shorten BOM field names (#121)
- Shorten `part_number` to `pn`
- Shorten `manufacturer_part_number` to `mpn`
- Show `manufacturer` and `mpn` in a single cell of the node
- Replace `manufacturer` with `'MPN'`within the node if no manufacturer is specified.
- Rearrange order of P/N fields within node
  `{pn} | {manufacturer}: {mpn}`
2020-07-26 16:50:11 +02:00
Jason R. Jones
97e77f55b1 Fix build_examples.py 2020-07-24 22:03:34 -04:00
Jason R. Jones
50ff1a046a Separated into cli() and main() to enable build script to call main() 2020-07-24 22:01:56 -04:00
Jason R. Jones
52f79fee40 Refactoring to build the examples 2020-07-24 21:27:55 -04:00
Jason R. Jones
5197298caf More concise saving of data 2020-07-24 21:23:15 -04:00
Jason R. Jones
6cb86172b3 Add better help string 2020-07-24 21:17:56 -04:00
Jason R. Jones
4e1d716df9 Add placeholder for gv output 2020-07-24 21:16:35 -04:00
Jason R. Jones
f64fac0b62 Remove unused parameter 2020-07-24 21:10:24 -04:00
Jason R. Jones
4747f2e173 Refactor bom() and bom_list methods into private methods. 2020-07-24 21:06:57 -04:00
Jason R. Jones
def8f13331 Fill out each BOM attribute, enable BOM output in various formats. 2020-07-24 21:01:52 -04:00
Jason R. Jones
8ba17d83a6 Remove unnecessary method 2020-07-24 20:20:42 -04:00
Jason R. Jones
1f535bc52d Add html to document string 2020-07-24 20:16:55 -04:00
Jason R. Jones
2d9c6e6536 Add skeleton of csv file outputs. 2020-07-24 20:13:56 -04:00
Jason R. Jones
126f525c18 Add html sttribute to Harness, using it in the parse function 2020-07-24 20:01:57 -04:00
Jason R. Jones
bbf92bb5fe Remove unused function 2020-07-24 19:22:22 -04:00
Jason
85c196f151
Merge pull request #1 from aakatz3/refactor/csv-tsv
[refactor] Use the csv library to generate properly escaped TSV files
2020-07-24 19:13:02 -04:00
Andrew Katz
e207ee23ea Merge branch 'refactor/add-default-color-param' into refactor/csv-tsv 2020-07-24 16:01:50 -04:00
Andrew Katz
bac99f0d80 Add ability to specify default color 2020-07-24 15:57:32 -04:00
Andrew Katz
6b3a89edeb Addressed review comments 2020-07-24 15:35:58 -04:00
Jason R. Jones
3009a1725d Better document string 2020-07-24 10:16:45 -04:00
Jason R. Jones
028f295331 Updating setup.py to include click 2020-07-24 09:58:01 -04:00
Jason R. Jones
4fe84b4926 Remove unused dependency 2020-07-24 09:50:42 -04:00
Jason R. Jones
54da2f2d37 Add click to make CLI easier 2020-07-24 09:49:19 -04:00
Jason R. Jones
379a4cfb44 Merge branch 'dev' of github.com:slightlynybbled/WireViz into dev 2020-07-24 07:05:13 -04:00
Daniel Rojas
f2f654854a Update README.md
Denote that WireViz reads and writes files in UTF-8 (or UTF-8 compatible) encodings, to disclaim against non UTF-8 input files.
2020-07-21 22:29:38 +02:00
Daniel Rojas
a69fc76651 Rebuild examples 2020-07-21 22:08:25 +02:00
Daniel Rojas
2a963bfef6 Update example input files 2020-07-21 22:01:10 +02:00
Daniel Rojas
a1881eb49d Rename connector attributes (#77)
Rename `pinnumbers` to `pins`.
Rename `pinout` to `pinlabels`.
2020-07-21 22:01:10 +02:00
Daniel Rojas
6468c0e2a5 Change code for silver and gold
Change to SR and GD to match the [standard](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system)
2020-07-21 21:34:48 +02:00
Andrew Katz
5b8b043a70
Update README.md
Add csv file to generated outputs
2020-07-20 20:53:00 -04:00
Andrew Katz
a6344933fe
Fix todo in file read 2020-07-20 20:22:57 -04:00
Andrew Katz
c2d96e8e4c Add more robust routines for BOM file output 2020-07-20 19:55:24 -04:00
Daniel Rojas
a632dc6cb8 Fix HTML color code appearing in wire node
...when no color is specified.
2020-07-20 15:46:18 +02:00
Daniel Rojas
b028e7a22b
Fix node rendering for cables with hidden name and/or no visible attributes (#104)
Closes #69.
2020-07-20 14:24:39 +02:00
Jason
a418005c2e
Fix superscript 2 in HTML output (#95)
Change `<sup></sup>` to `&sup2;`
2020-07-20 13:19:04 +02:00
Daniel Rojas
a8b2dc3572 Add new colors (olive green, light blue, beige, ivory)
This might be useful for some more exotic [ferrule colors](https://de.wikipedia.org/wiki/Aderendh%C3%BClse#Farbliche_Markierung)
2020-07-20 13:02:16 +02:00
Jason R. Jones
665d795a82 Merge branch 'master' of github.com:slightlynybbled/WireViz into dev 2020-07-20 06:46:51 -04:00
Jason R. Jones
5a7bc7399b Removing '\\n' character, as requested. 2020-07-20 06:46:24 -04:00
Daniel Rojas
8f833d9da5 Rebuild examples 2020-07-20 08:21:54 +02:00
Daniel Rojas
afbd11ccd4 Update example input files 2020-07-20 08:21:54 +02:00