<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Asciidoc on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/asciidoc/</link>
    <description>Recent content in Asciidoc on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Tue, 08 Nov 2022 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/asciidoc/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Modeling AWS Structures with PlantUML and AsciiDoc</title>
      <link>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</link>
      <pubDate>Tue, 08 Nov 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/modeling-aws-structures-with-plantuml-and-asciidoc/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The AWS shapes are included in the PlantUML stdlib .. simply include them as shown here:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;example.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
!include &amp;lt;awslib/AWSCommon&amp;gt;
!include &amp;lt;awslib/Analytics/ManagedStreamingforKafka&amp;gt;
!include &amp;lt;awslib/Database/RDS&amp;gt;
!include &amp;lt;awslib/General/Users&amp;gt;
!include &amp;lt;awslib/General/InternetGateway&amp;gt;

!include &amp;lt;kubernetes/k8s-sprites-labeled-25pct&amp;gt;

skinparam linetype ortho

title &amp;#34;AWS Context Diagram&amp;#34;


package &amp;#34;EKS Kubernetes Cluster&amp;#34; as eks_cluster {
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp1&amp;#34; as pod1
    component &amp;#34;&amp;lt;$pod&amp;gt;\napp2&amp;#34; as pod2
}

ManagedStreamingforKafka(kafka_pod, &amp;#34;Amazon MSK&amp;#34;, &amp;#34;Apache Kafka&amp;#34;)

RDS(pg_rds, &amp;#34;PostgreSQL&amp;#34;, &amp;#34;Sample Schema&amp;#34;)


Users(users, &amp;#34;AppUsers&amp;#34;,&amp;#34;editors, admins&amp;#34;)

InternetGateway(igw1, &amp;#34;Customer Gateway&amp;#34;, &amp;#34;Customer access to internal services&amp;#34;)

users -&amp;gt; igw1
igw1 --&amp;gt; pod1
igw1 --&amp;gt; pod2
pod1 --&amp;gt; pg_rds
pod1 --&amp;gt; kafka_pod
pod2 --&amp;gt; pg_rds
pod2 --&amp;gt; kafka_pod

@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>C4 Modeling with PlantUML and AsciiDoc</title>
      <link>https://www.hascode.com/c4-modeling-with-plantuml-and-asciidoc/</link>
      <pubDate>Tue, 01 Nov 2022 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/c4-modeling-with-plantuml-and-asciidoc/</guid>
      <description>&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;C4 models allow us to visualize software architecture by decomposition in containers and components.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Viewpoints are organized in hierarchical levels:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Context Diagrams (Level 1)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Container Diagrams (Level 2)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Component Diagrams (Level 3)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Code Diagrams (Level 4)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/plantuml-stdlib/C4-PlantUML&#34;&gt;C4-PlantUML&lt;/a&gt; offers a variety of macros and stereotypes that make modeling fun.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An example in &lt;a href=&#34;https://plantuml.com/&#34;&gt;PlantUML&lt;/a&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;sample.puml&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-plantuml&#34; data-lang=&#34;plantuml&#34;&gt;@startuml
!include &amp;lt;c4/C4_Context.puml&amp;gt;
!include &amp;lt;c4/C4_Container.puml&amp;gt;

left to right direction

Person(user, &amp;#34;User&amp;#34;)

System_Ext(auth, &amp;#34;AuthService&amp;#34;, &amp;#34;Provides authentication and authorization via OIDC&amp;#34;)

System_Boundary(zone1, &amp;#34;Some system boundary&amp;#34;) {


    System(lb, &amp;#34;Load Balancer&amp;#34;)

    System_Boundary(az, &amp;#34;App Cluster&amp;#34;) {
        System(app, &amp;#34;App Servers&amp;#34;) {
            Container(app1, &amp;#34;App1&amp;#34;, &amp;#34;Docker&amp;#34;, &amp;#34;Does stuff&amp;#34;)
            Container(app2, &amp;#34;App1&amp;#34;, &amp;#34;Docker&amp;#34;, &amp;#34;Does stuff&amp;#34;)

            ContainerDb(dbSess, &amp;#34;Session DB&amp;#34;, &amp;#34;Redis&amp;#34;)
            ContainerDb(db1, &amp;#34;RBMS 1&amp;#34;, &amp;#34;AWS RDS Postgres&amp;#34;)
            ContainerDb(db2, &amp;#34;RBMS 2&amp;#34;, &amp;#34;AWS RDS Postgres&amp;#34;)

            &amp;#39; both app servers sync sessions via redis
            Rel(app1, dbSess, &amp;#34;Uses&amp;#34;, &amp;#34;Sync Session&amp;#34;)
            Rel(app2, dbSess, &amp;#34;Uses&amp;#34;, &amp;#34;Sync Session&amp;#34;)

            &amp;#39; both app servers persist data in RDBMS
            Rel(app1, db1, &amp;#34;Uses&amp;#34;, &amp;#34;Persist/query relational data&amp;#34;)
            Rel(app2, db2, &amp;#34;Uses&amp;#34;, &amp;#34;Persist/query relational data&amp;#34;)
        }
    }
}

Rel(user, lb, &amp;#34;call&amp;#34;)
Rel(lb, app1, &amp;#34;delegate&amp;#34;)
Rel(lb, app2, &amp;#34;delegate&amp;#34;)
Rel(app1, auth, &amp;#34;Verify&amp;#34;, &amp;#34;User auth&amp;#34;)
Rel(app2, auth, &amp;#34;Verify&amp;#34;, &amp;#34;User auth&amp;#34;)

SHOW_FLOATING_LEGEND()

@enduml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>AsciiDoc Snippets</title>
      <link>https://www.hascode.com/asciidoc-snippets/</link>
      <pubDate>Fri, 10 May 2019 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/asciidoc-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_asciidoc_syntax_and_features&#34;&gt;AsciiDoc Syntax and Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_using_asciimath&#34;&gt;Using AsciiMath&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Include stem into document header&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;:stem:&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Then use inline, e.g.:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;stem:[sqrt(4) = 2]&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;or as block&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;[stem]
++++
sum_(i=1)^n i^3=((n(n+1))/2)^2
++++&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://asciimath.org/#syntax&#34;&gt;AsciiMath Syntax&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_collapsible_blockssections&#34;&gt;Collapsible Blocks/Sections&lt;/h3&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;.Click to show the content
[%collapsible]
====
Long content here...
====&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.asciidoctor.org/asciidoc/latest/blocks/collapsible/&#34;&gt;Source: Asciidoctor Docs&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_tools_and_ecosystem&#34;&gt;Tools and Ecosystem&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_docker_podman_container&#34;&gt;Docker / Podman Container&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Including stuff like:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Diagram with ERD and Graphviz integration (supports plantuml and graphiz diagrams)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor PDF&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor EPUB3&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor FB2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Mathematical&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor reveal.js&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AsciiMath&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Source highlighting using Rouge, CodeRay or Pygments&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Confluence&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Bibtex&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Kroki&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Asciidoctor Reducer&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Software Architecture Exploration and Validation with jqAssistant, Neo4j and Cypher</title>
      <link>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</link>
      <pubDate>Sun, 31 Dec 2017 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/software-architecture-exploration-and-validation-with-jqassistant-neo4j-and-cypher/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written about other software system analyzing and validation tools before but today I would like to introduce a new tool named jqAssistant that supports software architects, developers and analysts in a variety of tasks like analyzing given structures, validating architectural or quality constraints and generating reports.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore jqAssistant analyzes given projects or artifacts and stores the gathered information – that is enriched by a variety of existing plugin-ins – in a Neo4j graph database.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Documenting RESTful Webservices in Swagger, AsciiDoc and Plain Text with Maven and the JAX-RS Analyzer</title>
      <link>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</link>
      <pubDate>Tue, 16 Jun 2015 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/documenting-restful-webservices-in-swagger-asciidoc-and-plain-text-with-maven-and-the-jax-rs-analyzer/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;A variety of different tools exists to help us analyze RESTful web-services and create documentations for their APIs in different formats.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following tutorial I’d like to demonstrate how to document an existing JAX-RS web-service in multiple formats like Swagger, AsciiDoc or Plain Text using Maven, the JAX-RS Analyzer and the JAX-RS Analyzer Maven Plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The JAX-RS Analyzer gathers its information not only by reflection like most other tools but also by bytecode analysis and therefore does not require us to add special annotations for documentation to our code.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitHub Snippets</title>
      <link>https://www.hascode.com/github-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/github-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_github_actions&#34;&gt;GitHub Actions&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_step_to_check_variables_and_redistribute_as_env&#34;&gt;Step to check variables and redistribute as env&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following step does ..&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;check of given variables are set, if not, exit with an error that is visible in the action’s log&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;provide the given input as environment variable in &lt;code&gt;GITHUB_ENV&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;- name: configuration
      env:
        VAR1: ${{ needs.configure.outputs.something }}
        VAR2: ${{ vars.SOMETHING_OTHER }}/
        VAR3: &amp;#34;something_other_other&amp;#34;
      run: |
        for var in VAR1 VAR2 VAR3; do [ -n &amp;#34;${!var}&amp;#34; ] || { echo &amp;#34;$var is missing&amp;#34;; exit 1; }; echo &amp;#34;$var=${!var}&amp;#34; &amp;gt;&amp;gt; &amp;#34;$GITHUB_ENV&amp;#34;; done&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>GitLab Snippets</title>
      <link>https://www.hascode.com/gitlab-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/gitlab-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_generate_asciidoc_documentation_and_publish_it_with_gitlab_pages&#34;&gt;Generate AsciiDoc Documentation and Publish it with GitLab Pages&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We setup a repository and add a directory named &lt;code&gt;docs&lt;/code&gt; there .. this is the home of our AsciiDoc files.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We’re using &lt;a href=&#34;https://hub.docker.com/r/asciidoctor/docker-asciidoctor&#34;&gt;asciidoctor/docker-asciidoctor&lt;/a&gt; as Docker image for tool provisioning&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;This is the &lt;code&gt;.gitlab-ci.yml&lt;/code&gt;, we’re running the stage only when something in the &lt;code&gt;docs&lt;/code&gt; directory has changed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;stages:
  - &amp;#34;Build docs&amp;#34;

# The name of the job activates the GitLab pages publication
pages:
  image: asciidoctor/docker-asciidoctor
  stage: &amp;#34;Build docs&amp;#34;
  tags:
    - build
  script:
    - sh ./gen_docs.sh
    - mv output public
  only:
    refs:
      - master
    changes:
      - /docs/*
  artifacts:
    paths:
      - public
    expose_as: &amp;#39;Documentation Archive&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
