{"id":16942643,"url":"https://github.com/tmthrgd/ditaa-ditaa","last_synced_at":"2026-01-19T18:30:19.153Z","repository":{"id":21404583,"uuid":"24722535","full_name":"tmthrgd/ditaa-ditaa","owner":"tmthrgd","description":"ditaa-ditaa is a Jekyll plugin that leverages ditaa to convert diagrams drawn using ascii art into proper bitmap graphics. [Not maintained].","archived":false,"fork":false,"pushed_at":"2016-03-06T05:25:53.000Z","size":21,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-30T05:51:28.788Z","etag":null,"topics":["ascii-art","diagram","ditaa","jekyll","jekyll-ditaa","jekyll-plugin","kramdown","liquid","plugin","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmthrgd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-02T14:35:14.000Z","updated_at":"2021-06-14T16:55:39.000Z","dependencies_parsed_at":"2022-08-21T11:41:08.432Z","dependency_job_id":null,"html_url":"https://github.com/tmthrgd/ditaa-ditaa","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmthrgd%2Fditaa-ditaa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmthrgd%2Fditaa-ditaa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmthrgd%2Fditaa-ditaa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmthrgd%2Fditaa-ditaa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmthrgd","download_url":"https://codeload.github.com/tmthrgd/ditaa-ditaa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219850948,"owners_count":16556307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii-art","diagram","ditaa","jekyll","jekyll-ditaa","jekyll-plugin","kramdown","liquid","plugin","ruby"],"created_at":"2024-10-13T21:12:33.206Z","updated_at":"2026-01-19T18:30:19.082Z","avatar_url":"https://github.com/tmthrgd.png","language":"Ruby","readme":"# ditaa-ditaa\n\n[ditaa](http://ditaa.sourceforge.net/) – DIagrams Through Ascii Art – by Stathis Sideris is:\n\n\u003e a small command-line utility written in Java, that can convert diagrams drawn using ascii art ('drawings' that contain characters that resemble lines like | / - ), into proper bitmap graphics.\n\nWhich \"is best illustrated by the following example:\"\n\n    +--------+   +-------+    +-------+\n    |        | --+ ditaa +--\u003e |       |\n    |  Text  |   +-------+    |diagram|\n    |Document|   |!magic!|    |       |\n    |     {d}|   |       |    |       |\n    +---+----+   +-------+    +-------+\n        :                         ^\n        |       Lots of work      |\n        +-------------------------+\n\nWhich after conversion becomes:\n\n![ditaa image](example-one.png)\n\n\u003e ditaa interprets ascci art as a series of open and closed shapes, but it also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered.\n\n## Installation\n\nInstall the ditaa command-line utility with your favourite package manager, e.g. on Ubuntu: `$ [sudo] apt-get install ditaa`, and place the `ditaa-ditaa.rb` plugin in your sites `_plugins` directory.\n\n## Usage\n\nditaa-ditaa can be used in several ways, the most explicit way is to use liquid `{% ditaa %}` blocks such as:\n\n### Liquid tags\n\nLiquid `{% ditaa %}` blocks can be used wherever liquid is rendered.\n\n    {% ditaa %}\n    /----+  DAAP /-----+-----+ Audio  /--------+\n    | PC |\u003c------| RPi | MPD |-------\u003e| Stereo |\n    +----+       +-----+-----+        +--------+\n       |                 ^ ^\n       |     ncmpcpp     | | mpdroid /---------+\n       +--------=--------+ +----=----| Nexus S |\n                                     +---------+\n    {% endditaa %}\n\nwhich generates an image like the following:\n\n![ditaa image](example-two.png)\n\nTo maintain backwards compatibility with jekyll-ditaa options can be passed in command-line style like `{% ditaa -S -E %}` provided the trollop library is installed (`$ [sudo] gem install trollop`). It is preferred that options be passed using flags and attributes such as `{% ditaa round no-separation scale:0.75 %}`. Flags must not use the attribute syntax.\n\n### .ditaa pages\n\nditaa-ditaa will also process pages with the `.ditaa` extension.\n\n    ---\n    permalink: /some/path/image.png\n    ditaa:\n      round: true\n      separation: false\n      scale: 2\n    ---\n    \n    /----+  DAAP /-----+-----+ Audio  /--------+\n    | PC |\u003c------| RPi | MPD |-------\u003e| Stereo |\n    +----+       +-----+-----+        +--------+\n       |                 ^ ^\n       |     ncmpcpp     | | mpdroid /---------+\n       +--------=--------+ +----=----| Nexus S |\n                                     +---------+\n\nWhen using the `.ditaa` pages options can be passed through the ditaa front-matter object.\n\n### Code blocks\n\nThe final way in which ditaa-ditaa can be used is with code blocks when using the kramdown parser. For example:\n\n        /----+  DAAP /-----+-----+ Audio  /--------+\n        | PC |\u003c------| RPi | MPD |-------\u003e| Stereo |\n        +----+       +-----+-----+        +--------+\n           |                 ^ ^\n           |     ncmpcpp     | | mpdroid /---------+\n           +--------=--------+ +----=----| Nexus S |\n                                         +---------+\n    {: .ditaa}\n\nThis is the suggested method as it degrades the most gracefully outputting the source in `\u003cpre\u003e\u003ccode\u003e...\u003c/code\u003e\u003c/pre\u003e` tags.\n\nditaa-ditaa is invoked for code blocks when either the `.ditaa` or `.language-ditaa` classes are added (the latter to allow the simpler \u003ccode\u003e\u0026#96;\u0026#96;\u0026#96; language \\ ... \\ \u0026#96;\u0026#96;\u0026#96;\u003c/code\u003e syntax; although the latter may be removed in future and should not be depended upon). Flags (boolean options) can be specified using either classes, such as `.no-separation` and `.round`, or with IAL attributes with truthy or falsey values, such as `separation=\"false\"` and `round=\"true\"`. Valued options can be specified using IAL attributes, such as `scale=\"0.5\"`.\n\n### Options\n\nditaa-ditaa allows all relevant options that ditaa itself allows. The supported options (taken from DITAA(1)) are:\n\n    OPTIONS\n       -v, --verbose\n              Makes ditaa more verbose.\n    \n       -A, --no-antialias\n              Turns anti-aliasing off.\n    \n       -d, --debug\n              Renders the debug grid over the resulting image.\n    \n       -E, --no-separation\n              Prevents the separation of common edges of shapes.\n    \n       -e ENCODING, --encoding ENCODING\n              The encoding of the input file.\n    \n       -r, --round-corners\n              Causes all corners to be rendered as round corners.\n    \n       -s SCALE, --scale SCALE\n              A natural number that determines the size of the rendered image.\n              The units are fractions of the default  size  (2.5  renders  1.5\n              times bigger than the default).\n    \n       -S, --no-shadows\n              Turns off the drop-shadow effect.\n    \n       -t TABS, --tabs TABS\n              Tabs  are normally interpreted as 8 spaces but it is possible to\n              change that using this option. It is not advisable to  use  tabs\n              in your diagrams.\n\nThe `no-` prefix is not considered to be part of the option name, for instance in a `.ditaa` page shadows are disabled using `shadows: false` and NOT `no-shadows: true`.\n\nThe liquid block and kramdown code block methods also permit the following extra options to be specified:\n\n    dirname\n        The output path of the rendered image. This may contain %{hash} which\n        will be replaced by a hexadecimal string unquie to the image.\n    \n    name\n        The output filename of the rendered image. This may contain %{hash}\n        which will be replaced by a hexadecimal string unquie to the image.\n\n#### Global Configuration\n\nGlobal options may be set in your sites `_config.yml` file under the `ditaa:` key. For example:\n\n    ditaa:\n      dirname: /assets/images/\n      separation: false\n\nThe jekyll-ditaa options `ditaa_output_directory:` and `ditaa_debug_mode:` are supported for backwards compatibility.\n\n#### Defaults\n\nThe following defaults are enforced:\n\n    :antialias =\u003e true,\n    :debug =\u003e false,\n    :separation =\u003e true,\n    :encoding =\u003e \"utf-8\",\n    :round =\u003e false,\n    :scale =\u003e 1.0,\n    :shadows =\u003e true,\n    :tabs =\u003e 8,\n    :verbose =\u003e false,\n    :dirname =\u003e \"/images/ditaa\",\n    :name =\u003e \"ditaa-%{hash}.png\"\n\n## Acknowledgements\n\nditaa-ditaa was inspired by [jekyll-ditaa](https://github.com/matze/jekyll-ditaa) by [Matthias Vogelgesang](http://bloerg.net/).\n\nThe command-line [ditaa](http://ditaa.sourceforge.net/) utility was written by [Efstathios (Stathis) Sideris](http://www.stathis.co.uk/).\n\nThe DITAA(1) manual page was written by David Paleino \u003cdapal@debian.org\u003e, for the Debian project.\n\n## License\n\nSee [LICENSE](https://github.com/tmthrgd/ditaa-ditaa/blob/master/LICENSE).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmthrgd%2Fditaa-ditaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmthrgd%2Fditaa-ditaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmthrgd%2Fditaa-ditaa/lists"}