File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 44
55## Unreleased
66
7+ ## 3.4.0b1 - 2023-11-28
8+
9+ ### Changed
10+ - Include first batch of block coding images.
11+
712## 3.3.0 - 2023-11-24
813
914### Changed
Original file line number Diff line number Diff line change 66from docutils .nodes import image , paragraph
77from pathlib import Path
88
9- SPHINX_DOC = "main"
109SPHINX_IMAGE_PATH = "blockimg"
1110
1211SVG_SCALE = 0.9
@@ -22,6 +21,10 @@ def get_svg_size(file_path):
2221 return float (width ), float (height )
2322
2423
24+ # Global variable to store the app object
25+ app = None
26+
27+
2528class BlockImageDirective (Image ):
2629 option_spec = Image .option_spec .copy ()
2730 option_spec ["stack" ] = directives .flag
@@ -30,7 +33,7 @@ def run(self):
3033 # Adjust the image path
3134 file_name = self .arguments [0 ] + ".svg"
3235 self .arguments [0 ] = "/" + SPHINX_IMAGE_PATH + "/" + file_name
33- path = Path (os . getcwd ()) / SPHINX_DOC / SPHINX_IMAGE_PATH / file_name
36+ path = Path (app . srcdir ) / SPHINX_IMAGE_PATH / file_name
3437
3538 # Set it to the scaled SVG size unless width explicitly set.
3639 if self .options .get ("width" ) is None :
@@ -51,5 +54,7 @@ def run(self):
5154 return nodes
5255
5356
54- def setup (app ):
57+ def setup (apparg ):
58+ global app
59+ app = apparg
5560 app .add_directive ("blockimg" , BlockImageDirective )
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " pybricks"
3- version = " 3.3.0 "
3+ version = " 3.4.0b1 "
44description = " Documentation and user-API stubs for Pybricks MicroPython"
55authors = [
" The Pybricks Authors <[email protected] >" ]
66maintainers = [
" Laurens Valk <[email protected] >" ,
" David Lechner <[email protected] >" ]
You can’t perform that action at this time.
0 commit comments