compwright/ openrocket-file-utils
OpenRocket 文件工具
v1.0.0
2024-01-18 15:44 UTC
Requires
- league/csv: ^9.14
- symfony/console: ^7.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- squizlabs/php_codesniffer: ^3.8
This package is auto-updated.
Last update: 2024-09-18 23:06:28 UTC
README
命令行工具,用于从 OpenRocket (.ork) 文件生成报告
系统要求
- PHP 8.2 或更高版本
- Composer
安装
要安装,请确保您已安装系统要求,然后运行
$ composer global require compwright/openrocket-file-utils
注意:这将安装到
~/.composer/vendor/bin/
,请确保此目录在您的路径中$ export PATH=~/.composer/vendor/bin:$PATH
要升级,运行
$ composer global update
用法
orktools
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
bom Create a bill of materials (BOM)
completion Dump the shell completion script
fin-stats Get production stats about the fins
help Display help for a command
list List commands
命令
orktools bom
Description:
Create a bill of materials (BOM)
Usage:
bom [options] [--] <file>
Arguments:
file OpenRocket (.ork) file path
Options:
-f, --format=FORMAT Output format [default: "ascii"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
示例
$ orktools bom resources/CenturiArrow300.ork
+----------+-----------------+---------------------------+---------------------+---------+
| quantity | type | name | manufacturer | part |
+----------+-----------------+---------------------------+---------------------+---------+
| 1 | nosecone | Nose Cone, PNC-89 | SEMROC | BC-846G |
| 1 | bodytube | Body Tube, ST-8800 | SEMROC | ST-8800 |
| 1 | bulkhead | Coupler, BTC-8 | SEMROC Astronautics | BTC-8 |
| 1 | bodytube | Body Tube, ST-8157 | SEMROC | ST-8157 |
| 1 | shockcord | Shock Cord | | |
| 1 | bodytube | 18mm MMT, ST-730 | SEMROC | ST-730 |
| 1 | centeringring | Centering Ring, CR-78 | | |
| 1 | engineblock | Engine Block, TR-7 | SEMROC Astronautics | TR-7 |
| 1 | trapezoidfinset | Yellow fin | | |
| 1 | trapezoidfinset | Yellow fin | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | bodytube | Gap | | |
| 1 | bodytube | 18mm MMT, ST-730 | SEMROC | ST-730 |
| 1 | tubecoupler | Tube Coupler, HTC-7BP | SEMROC | HTC-7B |
| 1 | engineblock | Engine Block, TR-7 (half) | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | trapezoidfinset | Black fin | | |
| 1 | bodytube | 18mm MMT, ST-730 | SEMROC | ST-730 |
| 1 | tubecoupler | Tube Coupler, HTC-7BP | SEMROC | HTC-7B |
| 1 | engineblock | Engine Block, TR-7 (half) | | |
| 1 | trapezoidfinset | Yellow fin | | |
| 1 | trapezoidfinset | Yellow fin | | |
| 1 | trapezoidfinset | Yellow fin | | |
| 1 | trapezoidfinset | Yellow fin | | |
+----------+-----------------+--------- total: 27 -------+---------------------+---------+
orktools fin-stats
Description:
Get production stats about the fins
Usage:
fin-stats [options] [--] <file>
Arguments:
file OpenRocket (.ork) file path
Options:
-f, --format=FORMAT Output format [default: "ascii"]
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
示例
注意:显示的单位是米。
$ orktools fin-stats resources/CenturiArrow300.ork
+------------+------------------+
| name | perimeter |
+------------+------------------+
| Yellow fin | 0.17311799578536 |
| Yellow fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Black fin | 0.17311799578536 |
| Yellow fin | 0.17311799578536 |
| Yellow fin | 0.17311799578536 |
| Yellow fin | 0.17311799578536 |
| Yellow fin | 0.17311799578536 |
+--- total: 2.0774159494244 ----+
输出格式
支持以下输出格式
ascii
(默认)csv
html
json
许可证
在 MIT 开源许可证下授权。