@@ -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:'replacementcontent'
```
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.