Skip to content
Snippets Groups Projects
Verified Commit 84c3b217 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: complete documentation

parent 4c994f85
No related branches found
No related tags found
No related merge requests found
# Bob # Bob
bob is a html and html fragment builder bob is an HTML and HTML fragment builder
## Documentation ## Documentation
...@@ -8,6 +8,9 @@ To check out docs and examples, visit [gitlab.schukai.com/oss/bob](https://gitla ...@@ -8,6 +8,9 @@ To check out docs and examples, visit [gitlab.schukai.com/oss/bob](https://gitla
## Installation ## Installation
```bash
wget -O ~/.local/bin/bob http://download.schukai.com/tools/bob/bob-$( uname -s | tr [:upper:] [:lower:])-$(echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`) && chmod u+x ~/.local/bin/bob
```
## Usage ## Usage
...@@ -19,11 +22,11 @@ To check out docs and examples, visit [gitlab.schukai.com/oss/bob](https://gitla ...@@ -19,11 +22,11 @@ To check out docs and examples, visit [gitlab.schukai.com/oss/bob](https://gitla
bob template prepare --input ./templates/ --output ./output/ bob template prepare --input ./templates/ --output ./output/
``` ```
This will create a `./output/` directory with all parsed templates from `./templates/` directory. This will create files in the `./output/` directory with all parsed templates from `./templates/` directory.
Also, a data YAML. This data YAML is used to generate the final files. Also, a data YAML. This data YAML is used to generate the final files.
This command prepares the title, description, keywords, and other metadata for the templates. This command prepares the title, description, keywords, and other metadata for the templates.
Also, it will parse the templates for images, anchors, and text. Furthermore, it will parse the templates for images, anchors, and text.
| Original | Parsed | | Original | Parsed |
|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| |-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
...@@ -35,9 +38,69 @@ Also, it will parse the templates for images, anchors, and text. ...@@ -35,9 +38,69 @@ Also, it will parse the templates for images, anchors, and text.
| `<p>Bob is a html and html fragment builder</p>` | `<p><span data-attributes="text path:p.id1005.text">Bob is a html and html fragment builder</span></p>` | | `<p>Bob is a html and html fragment builder</p>` | `<p><span data-attributes="text path:p.id1005.text">Bob is a html and html fragment builder</span></p>` |
#### HTML
##### Generate
This will generate HTML files from the prepared templates.
```bash
bob template generate --input ./output/ --output ./output/
```
##### Sync
This will sync HTML nodes from a source to a destination.
```bash
bob template sync --specification ./specification.yaml
```
The structure of the specification file is as follows:
```yaml
sync:
- source:
path: './source.html'
selector: '#mainscript'
destination:
path: './'
exclude:
- ./source.html
```
The `source` is the source file and the `selector` is the selector to find the node to sync.
The `destination` is the destination directory and the `exclude` is a list of files to exclude.
Relative paths are relative to the specification file.
#### Cut
This will cut a node from a source file and save it to a destination template file.
```bash
bob template cut --specification ./specification.yaml
```
The structure of the specification file is as follows:
```yaml
snippet:
-
source: ./test.html
selector: 'head'
destination: ./snippets/container.html
attribute:
- selector: 'li'
name: 'class'
value: 'list-item'
replacement:
-
selector: '#myid'
content: 'replacement content'
```
Relative paths are relative to the specification file.
## Questions ## Questions
...@@ -52,7 +115,7 @@ issue. Issues not conforming to the guidelines may be closed immediately. ...@@ -52,7 +115,7 @@ issue. Issues not conforming to the guidelines may be closed immediately.
## License ## License
© schukai GmbH, Released under the AGPL 3.0 License. © schukai GmbH, released under the AGPL 3.0 License.
[AGPL](https://www.gnu.org/licenses/agpl-3.0.de.html) [AGPL](https://www.gnu.org/licenses/agpl-3.0.de.html)
......
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<style>
body {
background-color: #ffffff;
}
</style>
<title>Download Portal schukai GmbH</title>
</head>
<body>
<div class="d-flex flex-column align-items-center justify-content-center"
style="height:100vh;">
<div class="text-center">
<a href="https://www.schukai.com" class="text-decoration-none text-white text-decoration"><img
src="https://cdn.alvine.io/image/logo/schukai-rot.svg" width="300px"></a>
<br>
<div class="card mt-5">
<div class="card-header">
bob
</div>
<ul class="list-group">
<li class="list-group-item"><a class="text-decoration-none link-danger" href="./bob-linux-386">bob-linux-386</a></li>
<li class="list-group-item"><a class="text-decoration-none link-danger" href="./bob-linux-amd64">bob-linux-amd64</a></li>
<li class="list-group-item"><a class="text-decoration-none link-danger" href="./bob-linux-arm">bob-linux-arm</a></li>
<li class="list-group-item"><a class="text-decoration-none link-danger" href="./bob-linux-arm64">bob-linux-arm64</a></li>
<li class="list-group-item"><a class="text-decoration-none link-danger" href="./bob-windows">bob-windows</a></li>
</ul>
</div>
<p class="mt-5">
<a href="https://about.schukai.com/de/impressum/" class="text-decoration-none text-decoration"
style="color:#c10000">Imprint</a></p>
</div>
</div>
<!--
<div class="d-flex flex-column align-items-center justify-content-center"
style="height:100vh;">
<div class="d-block">
<div><img src="signet.svg" height="10%"></div>
<div>
</div>
</div>
</div>
<div class="text-center mb-2 fixed-bottom">
<div class="row">
<div class="col">
</div>
</div>
</div> -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
</body>
</html>
...@@ -14,6 +14,8 @@ DOCUMENTATION_PATH ?= $(PROJECT_ROOT)documentation/ ...@@ -14,6 +14,8 @@ DOCUMENTATION_PATH ?= $(PROJECT_ROOT)documentation/
RESOURCE_PATH ?= $(APPLICATION_PATH)resource/ RESOURCE_PATH ?= $(APPLICATION_PATH)resource/
SOURCE_PATH ?= $(APPLICATION_PATH)source/ SOURCE_PATH ?= $(APPLICATION_PATH)source/
WEB_PATH ?= $(APPLICATION_PATH)web/
## SCRIPTS_PATH IS DEPRECATED ## SCRIPTS_PATH IS DEPRECATED
SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/ SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment