Skip to content

Commit

Permalink
fix options application on CLI => release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dragoncoder047 authored Feb 24, 2023
1 parent e9a4621 commit 4cc98b7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
Binary file added dist/schemascii-0.2.0-py3-none-any.whl
Binary file not shown.
Binary file added dist/schemascii-0.2.0.tar.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions format.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ Examples:

## Inline configuration values

**New in 0.2.0!**

You can specify configuration values for rendering the components inline in the document by writing `!name=value!` in your document. See the help output of the Schemascii CLI for the different options (in the README) or look at the config options at the top of [`configs.py`](https://github.com/dragoncoder047/schemascii/blob/main/schemascii/configs.py). The most common options I use are `scale` and `padding`.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "schemascii"
version = "0.1.3"
version = "0.2.0"
description = "Render ASCII-art schematics to SVG"
readme = "README.md"
authors = [{ name = "dragoncoder047", email = "[email protected]" }]
Expand Down
6 changes: 4 additions & 2 deletions schemascii/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .utils import XML
from .errors import *

__version__ = "0.1.3"
__version__ = "0.2.0"


def render(filename: str, text: str = None, **options) -> str:
Expand All @@ -19,7 +19,9 @@ def render(filename: str, text: str = None, **options) -> str:
# get everything
grid = Grid(filename, text)
# Passed-in options override diagram inline options
options = apply_config_defaults(get_inline_configs(grid) | options)
options = apply_config_defaults(options
| get_inline_configs(grid)
| options.get("override_options", {}))
components, bom_data = find_all(grid)
terminals = {c: find_edge_marks(grid, c) for c in components}
fixed_bom_data = {c: [b for b in bom_data if
Expand Down

0 comments on commit 4cc98b7

Please sign in to comment.