Skip to content

Commit 4cc98b7

Browse files
fix options application on CLI => release 0.2.0
1 parent e9a4621 commit 4cc98b7

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed
43.5 KB
Binary file not shown.

dist/schemascii-0.2.0.tar.gz

53.6 KB
Binary file not shown.

format.md

+2
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,6 @@ Examples:
6565

6666
## Inline configuration values
6767

68+
**New in 0.2.0!**
69+
6870
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`.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "schemascii"
7-
version = "0.1.3"
7+
version = "0.2.0"
88
description = "Render ASCII-art schematics to SVG"
99
readme = "README.md"
1010
authors = [{ name = "dragoncoder047", email = "[email protected]" }]

schemascii/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .utils import XML
99
from .errors import *
1010

11-
__version__ = "0.1.3"
11+
__version__ = "0.2.0"
1212

1313

1414
def render(filename: str, text: str = None, **options) -> str:
@@ -19,7 +19,9 @@ def render(filename: str, text: str = None, **options) -> str:
1919
# get everything
2020
grid = Grid(filename, text)
2121
# Passed-in options override diagram inline options
22-
options = apply_config_defaults(get_inline_configs(grid) | options)
22+
options = apply_config_defaults(options
23+
| get_inline_configs(grid)
24+
| options.get("override_options", {}))
2325
components, bom_data = find_all(grid)
2426
terminals = {c: find_edge_marks(grid, c) for c in components}
2527
fixed_bom_data = {c: [b for b in bom_data if

0 commit comments

Comments
 (0)