tdfw 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tdfw/__init__.py ADDED
File without changes
tdfw/cli.py ADDED
@@ -0,0 +1,62 @@
1
+ import os
2
+ import click
3
+
4
+ def ensure_dir(path):
5
+ if not os.path.exists(path):
6
+ os.makedirs(path)
7
+
8
+ @click.group()
9
+ def cli():
10
+ """TouchDesigner Framework CLI (tdfw)"""
11
+ pass
12
+
13
+ @click.command()
14
+ @click.argument("app_name")
15
+ def start_app(app_name):
16
+ """Scaffold a new TouchDesigner app"""
17
+ base = os.path.abspath(app_name)
18
+ ensure_dir(base)
19
+
20
+ for folder in ["BAT", "DAT", "LOG"]:
21
+ ensure_dir(os.path.join(base, folder))
22
+
23
+ with open(os.path.join(base, "README.md"), "w") as f:
24
+ f.write(f"# {app_name}\nGenerated by tdfw\n")
25
+
26
+ with open(os.path.join(base, ".gitignore"), "w") as f:
27
+ f.write("*.toe\n*.log\n")
28
+
29
+ bat_path = os.path.join(base, "BAT", f"{os.path.basename(app_name)}.bat")
30
+
31
+ with open(bat_path, "w") as f:
32
+ f.write(f"""@echo off
33
+ set NODE=DEV
34
+ start "" "C:\\Program Files\\Derivative\\TouchDesigner\\bin\\TouchDesigner.exe" "{app_name}.toe"
35
+ """)
36
+
37
+ for ext in ["StartupExt", "SettingsExt", "StateExt"]:
38
+ ext_path = os.path.join(base, "DAT", f"{ext}.py")
39
+ with open(ext_path, "w") as f:
40
+ f.write(f"class {ext}:\n def __init__(self, ownerComp):\n self.ownerComp = ownerComp\n")
41
+
42
+ click.echo(f"✅ Created TouchDesigner app scaffold at {base}")
43
+
44
+ @click.command()
45
+ @click.argument("ext_name")
46
+ def create_ext(ext_name):
47
+ """Create a new extension stub"""
48
+ path = os.path.join("DAT", f"{ext_name}.py")
49
+ if not os.path.exists("DAT"):
50
+ click.echo("❌ No DAT directory found. Run start-app first.")
51
+ return
52
+
53
+ with open(path, "w") as f:
54
+ f.write(f"""class {ext_name}:
55
+ \"\"\"{ext_name} description\"\"\"
56
+ def __init__(self, ownerComp):
57
+ self.ownerComp = ownerComp
58
+ """)
59
+ click.echo(f"✅ Created extension stub: {path}")
60
+
61
+ cli.add_command(start_app)
62
+ cli.add_command(create_ext)
@@ -0,0 +1,41 @@
1
+ Metadata-Version: 2.4
2
+ Name: tdfw
3
+ Version: 0.1.0
4
+ Summary: TouchDesigner Framework CLI scaffold tool for opinionated State Driven Command and Control/Code Driven project architecture
5
+ Author-email: Michael Kramer <michael.kramer.guitar@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/MichaelKramerGuitar/tdfw
8
+ Project-URL: Repository, https://github.com/MichaelKramerGuitar/tdfw
9
+ Project-URL: Issues, https://github.com/MichaelKramerGuitar/tdfw/issues
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click
14
+ Dynamic: license-file
15
+
16
+ ![Coverage](https://codecov.io/gh/MichaelKramerGuitar/tdfw/branch/main/graph/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
17
+
18
+
19
+ # tdfw
20
+ TouchDesigner Framework CLI scaffold tool with an opinionated slant towards State Driven/Code Driven project architecture.
21
+
22
+ ## About
23
+
24
+ Hi, I'm Michael. I play guitar and write code. I was introduced to TouchDesigner by my friend Andrew Zolty, who's also known as `BREAKFAST`. He's an incredible kinetic artist.
25
+
26
+ Getting started with TouchDesigner as a GUI never really happened for me. I started a few YouTube courses on it but didn't have the time to follow through and learn how to use the interface.
27
+
28
+ But the concept of a network of nodes and subnodes made sense to my programmer/software engineer brain. I thought "there must be a purely code driven way to architect these TouchDesinger apps". So I looked on YouTube and found [this](https://www.youtube.com/watch?v=nQT7EhYCVg0) video (read more about that in [BACKGROUND.md](./BACKGROUND.md)). I was thrilled and what has resulted is essentially this tool which abstracts out all the boilerplate he gives.
29
+
30
+ # How To Use
31
+
32
+ ```bash
33
+ # Install
34
+ uv pip install tdfw
35
+
36
+ # Start a TouchDesigner App
37
+ tdfw start-app <MyFirstApp>
38
+
39
+ # Create a Python Extension stub (from your TouchDesigner Project Root i.e. the dir with the <MyFirstApp>.toe file)
40
+ tdfw create-ext <MyFirstExt>
41
+ ```
@@ -0,0 +1,8 @@
1
+ tdfw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ tdfw/cli.py,sha256=Zj7rAVTt8CCsWmNlt1El3cWlHg6mIFg1NMmcuSDsHdc,1823
3
+ tdfw-0.1.0.dist-info/licenses/LICENSE,sha256=05n4WcQHvyc-Fi8IFQRxbrCw4DiQd1J7PodC656Vliw,1076
4
+ tdfw-0.1.0.dist-info/METADATA,sha256=i9It7WBAC3bpPFYyuWXKjTzyGEkpzDX-uTrE_sPJBdE,1995
5
+ tdfw-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ tdfw-0.1.0.dist-info/entry_points.txt,sha256=sexsRrgHG_TItNlhrw0SZmJ1PpcT28-m5juhm-RIb24,38
7
+ tdfw-0.1.0.dist-info/top_level.txt,sha256=oziS-VKmCRbi7VujpSauiswWyOIEoFnOGzSW8uF9mok,5
8
+ tdfw-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ tdfw = tdfw.cli:cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MichaelKramerGuitar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ tdfw