Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ it](https://github.com/vanous/gDetour/archive/refs/heads/master.zip) and uzip.

Inside the downloaded/unzipped repository, run:

```
```bash
uv run run.py
```

Expand All @@ -121,19 +121,24 @@ It will open up the application interface in a webbrowser window.

### Install requirements

- `npm i`
- `uv sync`

### Run just the frontend svelte app
#### Back end (flask)

```
npm run dev -- --open
```bash
uv sync
```

### Run the whole application
#### Front end (svelte)

```bash
cd frontend`
npm i
```
uv run run.py

### Run just the frontend svelte app

```bash
cd frontend
npm run dev -- --open
```

## Contributions
Expand Down
5 changes: 2 additions & 3 deletions backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ def get_modes():
filepath = Path(local / "upload")
full_path = Path(filepath / fixture)
gdtf_fixture = pygdtf.pygdtf.FixtureType(full_path)
modes = pygdtf.utils.get_dmx_modes_info(
gdtf_fixture, include_channels=True, include_channel_functions=True
)
modes = gdtf_fixture.dmx_modes.as_dict()

print("Received DMX Mapping:", data) # Print the received data to the console
return jsonify(
{"status": "success", "data": modes}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/Modes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,20 @@
id: node_i + item.dmx,
dmx: item.dmx,
default: item.default,
attribute: item.id,
attribute: item.attribute,
geometry: item.geometry,
type: node_type,
[node_edge]: node_position,
data: {
label: `${item.dmx} ${item.geometry}: ${item.id}`,
label: `${item.dmx} ${item.geometry}: ${item.attribute}`,
},
address: `${item.geometry}_${item.id}`,
address: `${item.geometry}_${item.attribute}`,
position: { x: node_x, y: node_y * index },
connectable: true,
});

console.log(
`DMX: ${item.dmx}, Geo: ${item.geometry}, Attr: ${item.id}`
`DMX: ${item.dmx}, Geo: ${item.geometry}, Attr: ${item.attribute}`
);
default_dmx.push(item.default);
});
Expand Down Expand Up @@ -178,8 +178,8 @@
<!-- Added is-fullwidth here -->
<select bind:value={mode} on:change={getMode}>
{#each modes as item}
<option value={item.mode_dmx_channels[0]}>
{item.mode_name} ({item.mode_dmx_channel_count}ch)
<option value={item.dmx_channels}>
{item.name} ({item.dmx_channels_count}ch)
</option>
{/each}
</select>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requires-python = ">=3.13"
dependencies = [
"flask>=3.1.0",
"ifaddr>=0.2.0",
"pygdtf>=1.0.6.dev2",
"pygdtf>=1.1.0",
"sacn>=1.10.0",
"websockets>=14.2",
]
Expand Down
46 changes: 23 additions & 23 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.