OpenSite/Reference/Commands/Document demo: Difference between revisions

From BathAfrica Documentation
Jump to navigation Jump to search
Use BathAfrica sidebar contents without duplicate inline contents box
Link adjacent OpenSite reference pages in reading order
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{OpenSite scope}}
{{BathAfrica Command
{{BathAfrica Command
|review=Development documentation for OpenSite 0.0.1, source snapshot 77c3fee (Phase 13C). Reviewed against implementation on 29 October 2026. Tests and the Windows desktop were not rerun for this publication; this is not a released-product support claim.
|id=cli.document.demo
|id=cli.document.demo
|summary=Edit, undo, redo, save, and reload the rectangular section in one process.
|summary=Edit, undo, redo, save, and reload the rectangular section in one process.
Line 14: Line 14:
}}
}}


== Try this workflow ==
[[OpenSite/Guides/First document|First document]] — a worked lesson with expected results.


== Documentation basis ==
== Documentation basis ==
Line 25: Line 28:
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]]
[[Category:OpenSite documentation]]
[[Category:OpenSite documentation]]
<div class="os-page-nav">{{Docnav|OpenSite/Reference/Commands/Command discovery|OpenSite/Reference/Commands/Create an example document|OpenSite/Guides|All guides}}</div>

Latest revision as of 14:14, 29 October 2026

OpenSite 0.0.1 · DevelopmentSource scope and availability


Edit, undo, redo, save, and reload the rectangular section in one process.

Stable identifier
cli.document.demo

Implementation milestone

Roadmap phase 1 (historical Phase 1).

Units

Printed width, height, area, Ixx, and Iyy are canonical SI.

Terminal example

opensite-cli document demo --output section-demo.osdoc

Python access

The CLI verb has no separate function. Undo and redo are document.undo and document.redo on Document commands. examples/python/document_edit.py runs that sequence.

Output

Five stdout lines: created, edited, undone, redone, and reloaded. Created area is 0.18, Ixx is 0.0054, and Iyy is 0.00135. Edited width 0.40 m gives area 0.24, Ixx 0.0072, and Iyy 0.0032. Reloaded prints modified=0.

Errors

Exit 1 if a step fails. Exit 2 if --output is missing.

Limitations

Undo history is not stored in the file. The demo is not an analysis. Numbers use the CLI's default formatting, so 0.30 m prints as 0.3.

Verification evidence

Repository evidence references (not rerun for this publication): CTest cli.document. The same five lines are recorded in docs/verification/Phase-1-Acceptance.md.


Try this workflow

First document — a worked lesson with expected results.

Documentation basis

Source-reviewed against development commit 77c3fee13944bcc4b5d487c77eb1f82fbe4c6ea7, branch feature/phase-13c-properties-python-expressions. This review inspected the implementation and repository evidence; it did not run the Windows application or repeat CTest.

  • src/cli/main.cpp
  • src/cli/document_commands.cpp
  • src/cli/preference_commands.cpp
  • src/application/builtins.cpp

OpenSite overview · Reference · Guides