rfem-table-export 0.2.0__tar.gz

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.
@@ -0,0 +1,25 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ # Version file generated at build time by hatch-vcs
4
+ rfem_export/_version.py
5
+ *.py[oc]
6
+ build/
7
+ dist/
8
+ wheels/
9
+ *.egg-info
10
+
11
+ # Virtual environments
12
+ .venv
13
+ .venv-*/
14
+
15
+ # RFEM gRPC client runtime artifacts
16
+ dlubal/
17
+ debug.log
18
+
19
+ # Export outputs
20
+ results/
21
+
22
+ # Editor / OS
23
+ .vscode/
24
+ .idea/
25
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Milkis
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,199 @@
1
+ Metadata-Version: 2.4
2
+ Name: rfem-table-export
3
+ Version: 0.2.0
4
+ Summary: Terminal UI for exporting RFEM 6 input and result tables to Excel
5
+ Project-URL: Homepage, https://github.com/Mark-Milkis/rfem-table-export
6
+ Project-URL: Repository, https://github.com/Mark-Milkis/rfem-table-export
7
+ Project-URL: Issues, https://github.com/Mark-Milkis/rfem-table-export/issues
8
+ Author-email: Mark Milkis <markmilkis@gmail.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: dlubal,engineering,excel,export,rfem,structural,tui
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: dlubal-api==2.14.3
23
+ Requires-Dist: openpyxl>=3.1
24
+ Requires-Dist: pandas>=2.0
25
+ Requires-Dist: textual>=0.80
26
+ Description-Content-Type: text/markdown
27
+
28
+ # rfem-table-export
29
+
30
+ A terminal UI (TUI) for exporting [RFEM 6](https://www.dlubal.com/en/products/rfem-fea-software/what-is-rfem)
31
+ tables — both model **inputs** and analysis **results** — to a formatted Excel
32
+ workbook. It attaches to an already-running RFEM 6 process over the Dlubal gRPC
33
+ API, lets you confirm the active model, pick tables from a tree that mirrors the
34
+ RFEM GUI navigators, and writes a new timestamped `.xlsx` with one sheet per
35
+ table plus an info sheet capturing export metadata and any warnings.
36
+
37
+ The table-picker UX is modeled on SAP2000's "Export Tables to Excel" dialog.
38
+
39
+ ## Features
40
+
41
+ - **Attach to a live model** — connects to the running RFEM 6 process and shows
42
+ the active model's name and path so you can verify you're exporting the right
43
+ one before you start.
44
+ - **Navigator-style table tree** — tables are organized exactly like the RFEM
45
+ GUI (Structure → Basic Objects → Nodes, …; Load Cases and Combinations; Loads;
46
+ Results → Nodes/Members/Lines/Surfaces).
47
+ - **Inputs and results** — model objects (nodes, members, surfaces, materials,
48
+ cross-sections, supports, hinges, load cases/combinations, loads) and static
49
+ result tables (support forces, internal forces, deformations) iterated across
50
+ every load case and combination.
51
+ - **Model units, no surprises** — values are written exactly as the RFEM API
52
+ returns them (the model's own units); the info sheet records this.
53
+ - **One workbook per export** — a new file is always written to `results/`;
54
+ nothing is overwritten.
55
+ - **Resilient** — a single problematic table produces a warning on the info
56
+ sheet rather than aborting the whole export.
57
+
58
+ ## Requirements
59
+
60
+ - Windows with **RFEM 6.14** installed and running, a model open, and the gRPC
61
+ web service / API enabled.
62
+ - A valid Dlubal API key (see [Configuration](#configuration)).
63
+ - Python 3.11+.
64
+
65
+ > **Version pin:** the `dlubal-api` client version must match the RFEM server
66
+ > version. This project pins `dlubal-api==2.14.3` for **RFEM 6.14**. If you run a
67
+ > different RFEM version, change the pin to match — mismatched versions cause
68
+ > object-type enum drift and silently wrong/empty exports.
69
+
70
+ ## Installation
71
+
72
+ ### Run without installing (recommended)
73
+
74
+ With [uv](https://docs.astral.sh/uv/) you can run the latest published release
75
+ directly — no clone, no virtualenv:
76
+
77
+ ```bash
78
+ uvx rfem-table-export
79
+ ```
80
+
81
+ Pin a specific version (handy for matching your RFEM/`dlubal-api` version):
82
+
83
+ ```bash
84
+ uvx rfem-table-export@0.2.0
85
+ ```
86
+
87
+ > The console command is also available as `rfem-export`; with `uvx` use the
88
+ > distribution name (`rfem-table-export`) so version pinning works.
89
+
90
+ ### From a clone (for development)
91
+
92
+ ```bash
93
+ uv sync
94
+ ```
95
+
96
+ Or with pip:
97
+
98
+ ```bash
99
+ pip install -e .
100
+ ```
101
+
102
+ ## Usage
103
+
104
+ 1. Start RFEM 6, open and (for result tables) solve your model.
105
+ 2. Launch the TUI:
106
+
107
+ ```bash
108
+ uv run rfem-export
109
+ # or
110
+ python -m rfem_export.app
111
+ ```
112
+
113
+ 3. Confirm the banner shows the correct active model.
114
+ 4. Navigate the tree and toggle the tables you want:
115
+
116
+ | Key | Action |
117
+ |---------|-------------------|
118
+ | `space` | Toggle table |
119
+ | `a` | Select all |
120
+ | `n` | Clear selection |
121
+ | `e` | Export |
122
+ | `r` | Reconnect to RFEM |
123
+ | `q` | Quit |
124
+
125
+ 5. Press `e`. The workbook is written to `results/rfem_export_<model>_<timestamp>.xlsx`.
126
+
127
+ ## Configuration
128
+
129
+ The API key is resolved in this order:
130
+
131
+ 1. `--api-key` command-line argument
132
+ 2. `RFEM_API_KEY` environment variable
133
+ 3. Dlubal's bundled `config.ini` (`[api_keys] default = …`), scanned across
134
+ installed RFEM versions
135
+
136
+ ```bash
137
+ uv run rfem-export --api-key YOUR_KEY
138
+ ```
139
+
140
+ ## Project layout
141
+
142
+ ```
143
+ rfem_export/
144
+ __init__.py
145
+ connection.py # API-key resolution, attach to RFEM, model info, unit summary
146
+ catalog.py # curated navigator tree of exportable tables (TableDef / Group)
147
+ extract.py # protobuf objects + result tables -> pandas DataFrames
148
+ excel.py # workbook writer: one sheet per table + info sheet
149
+ app.py # Textual TUI + console entry point
150
+ examples/
151
+ export_reactions.py # original single-table proof-of-concept
152
+ ```
153
+
154
+ ### Extending table coverage
155
+
156
+ Add a `TableDef` to the `TREE` in [`rfem_export/catalog.py`](rfem_export/catalog.py).
157
+ Both extraction and the TUI pick up new entries automatically — inputs are
158
+ extracted by enumerating object IDs of an `ObjectType`; results via
159
+ `get_result_table` across every loading.
160
+
161
+ ## Development
162
+
163
+ Lint and format with [ruff](https://docs.astral.sh/ruff/) (the same checks CI
164
+ runs):
165
+
166
+ ```bash
167
+ uvx ruff check . # lint
168
+ uvx ruff format --check . # formatting
169
+ uvx ruff format . # auto-format
170
+ ```
171
+
172
+ ## Versioning & releases
173
+
174
+ The package version is **derived automatically from git tags** via
175
+ [`hatch-vcs`](https://github.com/ofek/hatch-vcs) — there is no hardcoded
176
+ version to bump. Tag `vX.Y.Z` becomes version `X.Y.Z`.
177
+
178
+ To cut a release:
179
+
180
+ ```bash
181
+ git tag v0.2.0
182
+ git push origin v0.2.0
183
+ ```
184
+
185
+ Pushing the tag triggers the **Release** workflow, which lints, builds the
186
+ sdist/wheel, verifies the built version matches the tag, publishes to
187
+ [PyPI](https://pypi.org/p/rfem-table-export), and creates a GitHub release.
188
+
189
+ > **One-time PyPI setup:** publishing uses
190
+ > [Trusted Publishing (OIDC)](https://docs.pypi.org/trusted-publishers/), so no
191
+ > API token is stored. On PyPI, add a trusted publisher for this project with:
192
+ > owner `Mark-Milkis`, repository `rfem-table-export`, workflow
193
+ > `release.yml`, and environment `pypi`. (For the very first publish you may
194
+ > need to use the "pending publisher" flow since the project doesn't exist on
195
+ > PyPI yet.)
196
+
197
+ ## License
198
+
199
+ [MIT](LICENSE)
@@ -0,0 +1,172 @@
1
+ # rfem-table-export
2
+
3
+ A terminal UI (TUI) for exporting [RFEM 6](https://www.dlubal.com/en/products/rfem-fea-software/what-is-rfem)
4
+ tables — both model **inputs** and analysis **results** — to a formatted Excel
5
+ workbook. It attaches to an already-running RFEM 6 process over the Dlubal gRPC
6
+ API, lets you confirm the active model, pick tables from a tree that mirrors the
7
+ RFEM GUI navigators, and writes a new timestamped `.xlsx` with one sheet per
8
+ table plus an info sheet capturing export metadata and any warnings.
9
+
10
+ The table-picker UX is modeled on SAP2000's "Export Tables to Excel" dialog.
11
+
12
+ ## Features
13
+
14
+ - **Attach to a live model** — connects to the running RFEM 6 process and shows
15
+ the active model's name and path so you can verify you're exporting the right
16
+ one before you start.
17
+ - **Navigator-style table tree** — tables are organized exactly like the RFEM
18
+ GUI (Structure → Basic Objects → Nodes, …; Load Cases and Combinations; Loads;
19
+ Results → Nodes/Members/Lines/Surfaces).
20
+ - **Inputs and results** — model objects (nodes, members, surfaces, materials,
21
+ cross-sections, supports, hinges, load cases/combinations, loads) and static
22
+ result tables (support forces, internal forces, deformations) iterated across
23
+ every load case and combination.
24
+ - **Model units, no surprises** — values are written exactly as the RFEM API
25
+ returns them (the model's own units); the info sheet records this.
26
+ - **One workbook per export** — a new file is always written to `results/`;
27
+ nothing is overwritten.
28
+ - **Resilient** — a single problematic table produces a warning on the info
29
+ sheet rather than aborting the whole export.
30
+
31
+ ## Requirements
32
+
33
+ - Windows with **RFEM 6.14** installed and running, a model open, and the gRPC
34
+ web service / API enabled.
35
+ - A valid Dlubal API key (see [Configuration](#configuration)).
36
+ - Python 3.11+.
37
+
38
+ > **Version pin:** the `dlubal-api` client version must match the RFEM server
39
+ > version. This project pins `dlubal-api==2.14.3` for **RFEM 6.14**. If you run a
40
+ > different RFEM version, change the pin to match — mismatched versions cause
41
+ > object-type enum drift and silently wrong/empty exports.
42
+
43
+ ## Installation
44
+
45
+ ### Run without installing (recommended)
46
+
47
+ With [uv](https://docs.astral.sh/uv/) you can run the latest published release
48
+ directly — no clone, no virtualenv:
49
+
50
+ ```bash
51
+ uvx rfem-table-export
52
+ ```
53
+
54
+ Pin a specific version (handy for matching your RFEM/`dlubal-api` version):
55
+
56
+ ```bash
57
+ uvx rfem-table-export@0.2.0
58
+ ```
59
+
60
+ > The console command is also available as `rfem-export`; with `uvx` use the
61
+ > distribution name (`rfem-table-export`) so version pinning works.
62
+
63
+ ### From a clone (for development)
64
+
65
+ ```bash
66
+ uv sync
67
+ ```
68
+
69
+ Or with pip:
70
+
71
+ ```bash
72
+ pip install -e .
73
+ ```
74
+
75
+ ## Usage
76
+
77
+ 1. Start RFEM 6, open and (for result tables) solve your model.
78
+ 2. Launch the TUI:
79
+
80
+ ```bash
81
+ uv run rfem-export
82
+ # or
83
+ python -m rfem_export.app
84
+ ```
85
+
86
+ 3. Confirm the banner shows the correct active model.
87
+ 4. Navigate the tree and toggle the tables you want:
88
+
89
+ | Key | Action |
90
+ |---------|-------------------|
91
+ | `space` | Toggle table |
92
+ | `a` | Select all |
93
+ | `n` | Clear selection |
94
+ | `e` | Export |
95
+ | `r` | Reconnect to RFEM |
96
+ | `q` | Quit |
97
+
98
+ 5. Press `e`. The workbook is written to `results/rfem_export_<model>_<timestamp>.xlsx`.
99
+
100
+ ## Configuration
101
+
102
+ The API key is resolved in this order:
103
+
104
+ 1. `--api-key` command-line argument
105
+ 2. `RFEM_API_KEY` environment variable
106
+ 3. Dlubal's bundled `config.ini` (`[api_keys] default = …`), scanned across
107
+ installed RFEM versions
108
+
109
+ ```bash
110
+ uv run rfem-export --api-key YOUR_KEY
111
+ ```
112
+
113
+ ## Project layout
114
+
115
+ ```
116
+ rfem_export/
117
+ __init__.py
118
+ connection.py # API-key resolution, attach to RFEM, model info, unit summary
119
+ catalog.py # curated navigator tree of exportable tables (TableDef / Group)
120
+ extract.py # protobuf objects + result tables -> pandas DataFrames
121
+ excel.py # workbook writer: one sheet per table + info sheet
122
+ app.py # Textual TUI + console entry point
123
+ examples/
124
+ export_reactions.py # original single-table proof-of-concept
125
+ ```
126
+
127
+ ### Extending table coverage
128
+
129
+ Add a `TableDef` to the `TREE` in [`rfem_export/catalog.py`](rfem_export/catalog.py).
130
+ Both extraction and the TUI pick up new entries automatically — inputs are
131
+ extracted by enumerating object IDs of an `ObjectType`; results via
132
+ `get_result_table` across every loading.
133
+
134
+ ## Development
135
+
136
+ Lint and format with [ruff](https://docs.astral.sh/ruff/) (the same checks CI
137
+ runs):
138
+
139
+ ```bash
140
+ uvx ruff check . # lint
141
+ uvx ruff format --check . # formatting
142
+ uvx ruff format . # auto-format
143
+ ```
144
+
145
+ ## Versioning & releases
146
+
147
+ The package version is **derived automatically from git tags** via
148
+ [`hatch-vcs`](https://github.com/ofek/hatch-vcs) — there is no hardcoded
149
+ version to bump. Tag `vX.Y.Z` becomes version `X.Y.Z`.
150
+
151
+ To cut a release:
152
+
153
+ ```bash
154
+ git tag v0.2.0
155
+ git push origin v0.2.0
156
+ ```
157
+
158
+ Pushing the tag triggers the **Release** workflow, which lints, builds the
159
+ sdist/wheel, verifies the built version matches the tag, publishes to
160
+ [PyPI](https://pypi.org/p/rfem-table-export), and creates a GitHub release.
161
+
162
+ > **One-time PyPI setup:** publishing uses
163
+ > [Trusted Publishing (OIDC)](https://docs.pypi.org/trusted-publishers/), so no
164
+ > API token is stored. On PyPI, add a trusted publisher for this project with:
165
+ > owner `Mark-Milkis`, repository `rfem-table-export`, workflow
166
+ > `release.yml`, and environment `pypi`. (For the very first publish you may
167
+ > need to use the "pending publisher" flow since the project doesn't exist on
168
+ > PyPI yet.)
169
+
170
+ ## License
171
+
172
+ [MIT](LICENSE)