aboutsummaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2022-06-26 17:28:49 +0200
committerbozo.kopic <bozo@kopic.xyz>2022-06-26 17:28:49 +0200
commit75cc60fd42c58cadc28f5eb4499f197604254aba (patch)
tree48513c9c59dd24207100fc2cf2c3118c8145dd72 /README.rst
parent7ae36a21d031c3d71e9015823c61380f88b0595d (diff)
WIP native implementation
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst84
1 files changed, 63 insertions, 21 deletions
diff --git a/README.rst b/README.rst
index 19c3161..8e893a7 100644
--- a/README.rst
+++ b/README.rst
@@ -37,26 +37,70 @@ Install
`https://github.com/bozokopic/opcut/releases`
-Run
----
+Usage
+-----
-Running server (default listening address http://0.0.0.0:8080)::
+`opcut` command is interface for execution of three distinct actions:
- $ opcut server
+ * `opcut calculate ...`
+
+ Calculation of cutting stock problem. Input parameters and result is
+ formated as JSON data (JSON, YAML or TOML).
+
+ * `opcut generate ...`
+
+ Generate output representation (SVG, PDF, ...) based on calculation
+ result.
+
+ * `opcut server ...`
+
+ Run HTTP server providing single-page web application interface and
+ OpenAPI interface.
+ (default listening address is http://0.0.0.0:8080).
+
+For additional command line arguments, run ``opcut --help`` or
+``opcut <action> --help``.
+
+
+`opcut calculate`
+'''''''''''''''''
+
+Example::
-Running command line utility::
+ $ opcut calculate --input-format yaml --output result.json << EOF
+ cut_width: 1
+ panels:
+ panel1:
+ width: 100
+ height: 100
+ items:
+ item1:
+ width: 10
+ height: 10
+ can_rotate: false
+ EOF
- $ opcut calculate ...
- $ opcut generate_output ...
-Additional command line arguments::
+`opcut generate`
+''''''''''''''''
- $ opcut --help
+Example::
+
+ $ opcut generate --output output.pdf result.json
+
+
+`opcut server`
+''''''''''''''
+
+Example::
+
+ $ opcut server
Development requirements
------------------------
+* C99 compiler (gcc, clang, ...)
* nodejs >=7
* yarn
@@ -80,28 +124,26 @@ Default task::
creates wheel package inside `build` directory.
-TODO
-----
-
-* global
-
- * create CONTRIBUTING
+JSON Schema
+-----------
-* optimizer
+.. literalinclude:: schemas/opcut.yaml
+ :language: yaml
- * add additional algorithms
- * evaluate python implementations and do native rewrites if needed
-* back-end
+OpenAPI
+-------
- * additional output formats
+.. literalinclude:: schemas/openapi.yaml
+ :language: yaml
License
-------
opcut - cutting stock problem optimizer
-Copyright (C) 2017-2022 Bozo Kopic
+
+Copyright (C) 2017-2022 Bozo Kopic
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by