Skip to content
Snippets Groups Projects
Select Git revision
  • 4b5d06d4ee4744facfbab5255578e50d044d8da5
  • master default protected
2 results

fonts.css

Blame
  • README.md 7.43 KiB

    Bob

    Bob is an HTML and HTML fragment builder

    Documentation

    To check out docs and examples, visit gitlab.schukai.com/oss/bob

    Installation

    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

    Nix/Flake Support

    This repository contains a file called flake.nix. You can install this program using the nix package manager.

    Usage

    Template

    Prepare

    bob template prepare --input ./templates/ --output ./output/ --data-file ./data.yaml

    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 with the bob html generate command.

    This command prepares the title, description, keywords, and other metadata for the templates. Furthermore, it will parse the templates for images, anchors, and text.

    If the argument --data-file is not set, the data YAML will be written to ./output/data.yaml.

    Original Parsed
    <html lang="en"><head> <html lang="en" data-attributes="lang path:lang"><head>
    <title>Bob</title> <title data-attributes="title path:title">Bob</title>
    <meta name="description" content="Bob is a html and html fragment builder"> <meta name="description" content="Bob is a html and html fragment builder" data-attributes="description path:meta.description">
    <img alt="alt text" title="my title" src="..." <img alt="alt text" title="my title" src="..." data-attributes="alt path:img.id1003.alt title path:img.id1003.title src path:img.id1003.src">
    <a href="https://gitlab.schukai.com/oss/bob"> <a href="https://gitlab.schukai.com/oss/bob" data-attributes="href path:a.id1004.href">
    <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>

    If you want to translate the text, you can copy the default data.yaml to a new file and translate the text there.

    A good practice is to use the language code as the file name. For example, de.yaml for German, en.yaml for English, etc.

    Beside text, images and metadata, special attributes are also extracted. For example, the Monster datatable headers data-monster-head are extracted.

    <monster-datatable>
        <template id="datatable-order-list-row">
            <div data-monster-head="OID" ...></a></div>
        ...