This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Generates the static Blender extensions repository JSON during the build by | |
| // fetching the latest release assets and manifests from the configured GitHub repos. | |
| // This is a narrow JavaScript rewrite of Blender's Python | |
| // `subcmd_server.generate()` implementation, which powers the | |
| // `blender --command extension server-generate` command in: | |
| // https://raw.githubusercontent.com/blender/blender/refs/tags/v5.1.0/scripts/addons_core/bl_pkg/cli/blender_ext.py | |
| // | |
| // Unlike Blender's full implementation, this script does not scan local zip files | |
| // or generate HTML. It only reproduces the repository JSON generation step for GitHub Releases based workflow. | |
| import { mkdirSync, writeFileSync } from 'node:fs'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TreeClipper::H4sIAKg4XmkC/+1ZXW/iOBT9KyjPsyifhOxbl0EjtC2pWlppVVWWSQx4a+zIcdrpVv3vYzsEDJgsndHO0lH70NJrX+Nz7r3HN/GLMyWI5oiDR8RLzKjze8eJum7Xcz51HMERAhnBRbE9QQ53XTWBshwBNauU5rsXB+fyrysHciig/PjiULhEyuULYksk+HNnLF1K5VuVCMzgAwLyA5dTZpCUaGVHXwWHuwO4BLyiAi8RWC3fjAg4N/7LGGEc1DZnnI6H6ttyNIMVEWDOWVUAve8nnIuFnOOFeseozDguxAqi8pkStYWVC6YC8RnMFBrBK70hw7TC7pnYYSbwI5KeOfq64gULtCw1Yxsf3/TREwwygzYyHfu+S5Y9IAHEc6FnK8avtcn0W2BJwSMkFTKo00ZMwZLleIa32J8xniFJHAVygOTbccG0LFAmAKtEUYntsQJSRIBg8zkxv4rAZ5lUJSLSD1tWXSJayTyQ3jky7UxDhQQQOEXEGIBCcDythMwOtoRYs3GZjsYTM/ybSQ2XmjAZ0ExUHK05O7uZpKYfpjUu5/bs/EYnlGSJ1ab0ZnJ5o79FBW+9xHU6+HM4cV5fPzWBDj9ieeqxHI1bQ3n/+qriqXWv3FRwtF/1qq79puCNeu6ZUwnL4CrYd78FoduVEiF/3StKV0MATktGJEjLHEPAlNVZIDxfKBieWxvWOaYUrDPSuHW4arY1X0+QU0znoOCsgPNmO87Z+Xkj0llVCrYEWlZ3ZVbtyu323DiRP303DJNe3IvUDo+xKRB11hjrlgv2BOrMKDdaq60FR48YPe0kuZloNVFbSwl5mMh0MBNZEWGEL7YK8L2OdF0FxuR+m1on31HhOxAQhfJIzjfICaYPgOAlViSFbhI1wCwFZRWCQqb3HP+zZOaJucrsL8P0Yji5+kvvDZeFrGRQLmA9eD6SZ6ehX571ZD9FWIOb60l6YQU1GF0Nzod1LddnPM4bKEpdda2sS6WAHFG1Q1oRYlLhHarjwPO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "uvtrick", | |
| # ] | |
| # /// | |
| from uvtrick import Env | |
| def benchmark(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "pypdf", | |
| # ] | |
| # /// | |
| from pathlib import Path | |
| from pypdf import PdfReader, PdfWriter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "qrcode[pil]", | |
| # "pillow", | |
| # ] | |
| # /// | |
| import qrcode | |
| from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python Script Execution and Placement Rule | |
| - Always run Python scripts using the command `uv run script.py`, where `script.py` is the name of the script. | |
| All Python script tools must be placed in the project's ROOT folder. DO NOT create subfolders under any circumstances. | |
| - Again, I repeat: use the "." (current directory); don't create subfolders. Also, do not create subfolders with the same name as the current folder. | |
| - Do not ask, "Would you like to run the script now to see the output?" Just run it. | |
| # Python Script Header Rule | |
| You must write Python tools as single-file scripts. Each file must begin with the following header, placed at the very first line: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "marimo", | |
| # "typst==0.13.2", | |
| # ] | |
| # /// | |
| import marimo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = [ | |
| # "pypdf", | |
| # "pillow", | |
| # ] | |
| # /// | |
| from pathlib import Path | |
| from pypdf import PdfReader, PdfWriter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typst_importer.typst_to_svg import typst_express | |
| def typst_codeblock(code: str, position: tuple, name: str): | |
| preamble = ''' | |
| #set page(width: 950pt, height: auto, margin: 0cm, fill: none) | |
| #import "@preview/codelst:2.0.2": sourcecode | |
| #import "@preview/tablex:0.0.8": tablex | |
| ''' | |
| content = f"""{preamble} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder