<commit_before># jekyll-graphs

## Installation

Install the required renderers with your favourite package manager, e.g. on Ubuntu: `$ [sudo] apt-get install graphviz mscgen`, and place the `jekyll-graphs.rb` plugin in your sites `_plugins` directory.

## Usage

jekyll-graphs can be used in several ways, the most explicit way is to use liquid `{% renderer %}` blocks such as:

### Liquid tags

Liquid `{% *renderer* %}` blocks, where renderer is the name of the renderer, can be used wherever liquid is rendered.

    {% *renderer* %}
    /----+  DAAP /-----+-----+ Audio  /--------+
    | PC |<------| RPi | MPD |------->| Stereo |
    +----+       +-----+-----+        +--------+
       |                 ^ ^
       |     ncmpcpp     | | mpdroid /---------+
       +--------=--------+ +----=----| Nexus S |
                                     +---------+
    {% end*renderer* %}

### Pages with _file tags

jekyll-graphs will also process pages specified in `{% *renderer*_file *file* %}` tags.

    ---
    permalink: /some/path/image.png
    ---
    
    /----+  DAAP /-----+-----+ Audio  /--------+
    | PC |<------| RPi | MPD |------->| Stereo |
    +----+       +-----+-----+        +--------+
       |                 ^ ^
       |     ncmpcpp     | | mpdroid /---------+
       +--------=--------+ +----=----| Nexus S |
                                     +---------+

### Code blocks

The final way in which jekyll-graphs can be used is with code blocks when using the kramdown parser. For example:

        /----+  DAAP /-----+-----+ Audio  /--------+
        | PC |<------| RPi | MPD |------->| Stereo |
        +----+       +-----+-----+        +--------+
           |                 ^ ^
           |     ncmpcpp     | | mpdroid /---------+
           +--------=--------+ +----=----| Nexus S |
                                         +---------+
    {: *renderer*="*renderer*" }

This is the suggested method as it degrades the most gracefully outputting the source in `<pre><code>...</code></pre>` tags.

### Options

jekyll-graphs allows all the following options to be specified:

    encoding
        The encoding to use when proccessing the graphs. Defaults to the site encoding or utf-8.
    
    renderer
        The desired renderer. From the following lists:
	    graphviz: dot neato twopi circo fdp sfdp patchwork
	    tex: tex latex pdftex pdflatex xetex xelatex luatex lualatex
	    others: mscgen plantuml shaape
    
    format
        The output format of the svg. Supported values:
	    img: <img src="...svg" alt="..." title="...">
	    object: <object data="...svg" type="image/svg+xml"><a href="...svg">...</a></object>
	    embed: <embed src="...svg" type="image/svg+xml" />
	    iframe: <iframe src="...svg" sandbox="allow-scripts"></iframe>
	    url, uri, href: ...svg
	    svg: <svg ...>...</svg>
	
	Defaults to svg.

The liquid block and kramdown code block methods also permit the following extra options to be specified:

    dirname
        The output path of the rendered image. This may contain %{hash} which
        will be replaced by a hexadecimal string unquie to the image, and %{slug}
	which will be replaced with a slug either generated from the graph or
	the name of the renderer.
    
    name
        The output filename of the rendered image. This may contain %{hash}
        which will be replaced by a hexadecimal string unquie to the image, and %{slug}
	which will be replaced with a slug either generated from the graph or
	the name of the renderer.

The following global-only option may be specified:

    renderers
        It is a hash of key-values, with renderer names specified as keys and paths or
	arguments specified as values. If a string is provided, it is expected to be the
	path to the executable. If an array is provided, the first item will be treated as
	the path to an executable and the remaining items as command line arguments.
	
	The command line arguments for PlantUML must be specified to use it. They should be
	provided as [java, -jar, /path/to/plantuml.8021.jar].

#### Global Configuration

Global options may be set in your sites `_config.yml` file under the `jgraphs:` key. For example:

    jgraphs:
      dirname: /assets/images/
      format: object
      renderers:
        plantuml: [java, -jar, ~/plantuml.8021.jar]

#### Defaults

The following defaults are enforced:

    :encoding => "utf-8",
    :renderer => "dot",
    :scale => 1.0

## Acknowledgements

[Graphviz](http://graphviz.org/) was developed by [AT&T Labs Research](http://www.att.com/labs/) and other contributors.

[TeX](https://www.tug.org/) was created by [<NAME>](https://cs.stanford.edu/~uno/) and others.

[LaTeX](http://latex-project.org/) was created by [<NAME>](http://www.lamport.org/) and others.

[pdfTeX](https://www.tug.org/applications/pdftex/) was created by [<NAME>](<EMAIL>) and others.

[XeTeX](http://xetex.sourceforge.net/) was created by <NAME> and is developed by <NAME> and others.
<commit_msg>Fix tab/space issue in readme<commit_after># jekyll-graphs

## Installation

Install the required renderers with your favourite package manager, e.g. on Ubuntu: `$ [sudo] apt-get install graphviz mscgen`, and place the `jekyll-graphs.rb` plugin in your sites `_plugins` directory.

## Usage

jekyll-graphs can be used in several ways, the most explicit way is to use liquid `{% renderer %}` blocks such as:

### Liquid tags

Liquid `{% *renderer* %}` blocks, where renderer is the name of the renderer, can be used wherever liquid is rendered.

    {% *renderer* %}
    /----+  DAAP /-----+-----+ Audio  /--------+
    | PC |<------| RPi | MPD |------->| Stereo |
    +----+       +-----+-----+        +--------+
       |                 ^ ^
       |     ncmpcpp     | | mpdroid /---------+
       +--------=--------+ +----=----| Nexus S |
                                     +---------+
    {% end*renderer* %}

### Pages with _file tags

jekyll-graphs will also process pages specified in `{% *renderer*_file *file* %}` tags.

    ---
    permalink: /some/path/image.png
    ---
    
    /----+  DAAP /-----+-----+ Audio  /--------+
    | PC |<------| RPi | MPD |------->| Stereo |
    +----+       +-----+-----+        +--------+
       |                 ^ ^
       |     ncmpcpp     | | mpdroid /---------+
       +--------=--------+ +----=----| Nexus S |
                                     +---------+

### Code blocks

The final way in which jekyll-graphs can be used is with code blocks when using the kramdown parser. For example:

        /----+  DAAP /-----+-----+ Audio  /--------+
        | PC |<------| RPi | MPD |------->| Stereo |
        +----+       +-----+-----+        +--------+
           |                 ^ ^
           |     ncmpcpp     | | mpdroid /---------+
           +--------=--------+ +----=----| Nexus S |
                                         +---------+
    {: *renderer*="*renderer*" }

This is the suggested method as it degrades the most gracefully outputting the source in `<pre><code>...</code></pre>` tags.

### Options

jekyll-graphs allows all the following options to be specified:

    encoding
        The encoding to use when proccessing the graphs. Defaults to the site encoding or utf-8.
    
    renderer
        The desired renderer. From the following lists:
            graphviz: dot neato twopi circo fdp sfdp patchwork
            tex: tex latex pdftex pdflatex xetex xelatex luatex lualatex
            others: mscgen plantuml shaape
    
    format
        The output format of the svg. Supported values:
            img: <img src="...svg" alt="..." title="...">
            object: <object data="...svg" type="image/svg+xml"><a href="...svg">...</a></object>
            embed: <embed src="...svg" type="image/svg+xml" />
            iframe: <iframe src="...svg" sandbox="allow-scripts"></iframe>
            url, uri, href: ...svg
            svg: <svg ...>...</svg>
        
        Defaults to svg.

The liquid block and kramdown code block methods also permit the following extra options to be specified:

    dirname
        The output path of the rendered image. This may contain %{hash} which
        will be replaced by a hexadecimal string unquie to the image, and %{slug}
        which will be replaced with a slug either generated from the graph or
        the name of the renderer.
    
    name
        The output filename of the rendered image. This may contain %{hash}
        which will be replaced by a hexadecimal string unquie to the image, and %{slug}
        which will be replaced with a slug either generated from the graph or
        the name of the renderer.

The following global-only option may be specified:

    renderers
        It is a hash of key-values, with renderer names specified as keys and paths or
        arguments specified as values. If a string is provided, it is expected to be the
        path to the executable. If an array is provided, the first item will be treated as
        the path to an executable and the remaining items as command line arguments.
        
        The command line arguments for PlantUML must be specified to use it. They should be
        provided as [java, -jar, /path/to/plantuml.8021.jar].

#### Global Configuration

Global options may be set in your sites `_config.yml` file under the `jgraphs:` key. For example:

    jgraphs:
      dirname: /assets/images/
      format: object
      renderers:
        plantuml: [java, -jar, ~/plantuml.8021.jar]

#### Defaults

The following defaults are enforced:

    :encoding => "utf-8",
    :renderer => "dot",
    :scale => 1.0

## Acknowledgements

[Graphviz](http://graphviz.org/) was developed by [AT&T Labs Research](http://www.att.com/labs/) and other contributors.

[TeX](https://www.tug.org/) was created by [<NAME>](https://cs.stanford.edu/~uno/) and others.

[LaTeX](http://latex-project.org/) was created by [<NAME>](http://www.lamport.org/) and others.

[pdfTeX](https://www.tug.org/applications/pdftex/) was created by [<NAME>](<EMAIL>) and others.

[XeTeX](http://xetex.sourceforge.net/) was created by <NAME> and is developed by <NAME> and others.

{'fraction_non_alphanumeric': 0.16852601441405865, 'fraction_numerical': 0.0023694342975614574, 'mean_word_length': 1.8463051418937904, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 55, 'https://': 6, 'lorem ipsum': 0, 'www.': 8, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2692211', 'n_tokens_mistral': 3068, 'n_tokens_neox': 2921, 'n_words': 1056}