Skip to content

Commit c7bf294

Browse files
committed
added support for graphviz dot diagrams in the pom. Added a tuto on converting a table of cooccurrences to a network
1 parent 10e2097 commit c7bf294

25 files changed

Lines changed: 353 additions & 83 deletions

pom.xml

Lines changed: 103 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
<version>1.0</version>
99
<packaging>jar</packaging>
1010
<properties>
11-
<doc>en/plugins/similarity-computer-en.adoc</doc>
11+
<doc>en/plugins/cooccurrences-computer-en.adoc</doc>
1212
<medium.publish>false</medium.publish>
13+
<asciidoctorj.diagram.version>1.5.0</asciidoctorj.diagram.version>
1314
</properties>
1415
<parent>
1516
<groupId>net.clementlevallois</groupId>
1617
<artifactId>AsciiiDocMavenJavaSE</artifactId>
1718
<version>1.0</version>
1819
</parent>
19-
2020
<build>
21+
<defaultGoal>process-resources</defaultGoal>
22+
2123
<!--
2224
Plugin attach to different phases of the build process to customize it.
2325
(see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#Lifecycle_Reference).
@@ -93,6 +95,11 @@
9395
<version>${asciidoctorj.pdf.version}</version>
9496
</dependency>
9597
<!-- AsciidoctorJ extensions -->
98+
<dependency>
99+
<groupId>org.asciidoctor</groupId>
100+
<artifactId>asciidoctorj-diagram</artifactId>
101+
<version>${asciidoctorj.diagram.version}</version>
102+
</dependency>
96103
<dependency>
97104
<groupId>net.clementlevallois</groupId>
98105
<artifactId>asciidoctorj-extensions</artifactId>
@@ -101,98 +108,112 @@
101108
</dependencies>
102109
<!-- Shared configurations across `executions`. Can be overwritten if needed by an executions -->
103110
<configuration>
111+
<requires>
112+
<require>asciidoctor-diagram</require>
113+
</requires>
114+
<attributes>
115+
<!-- Example below shows how to specify in this pom instead of System's PATH, the location of dot command of Graphviz, required by PlantUML libraries -->
116+
<!--Windows:-->
117+
<graphvizdot>C:\Program Files (x86)\Graphviz2.38\bin\dot.exe</graphvizdot>
118+
<imagesoutdir>${basedir}/src/main/asciidoc/images</imagesoutdir>
119+
120+
<!-- *nix :
121+
<graphvizdot>/usr/local/bin/dot</graphvizdot>
122+
-->
123+
</attributes>
124+
</configuration>
125+
104126
<!-- Current configuration uses default layout.
105127
I'd recommend keeping everything under `src/main/asciidoc`, docs, images, etc and use GIT or SVN to
106128
track versions.
107129
-->
108130
<!--
109131
<sourceDirectory>C:\Users\levallois\Google Drive\open\gephi tutorial\history-of-gephi\en\temp</sourceDirectory>
110132
-->
111-
</configuration>
112-
<executions>
113-
<execution>
114-
<id>generate-slides</id>
115-
<phase>generate-resources</phase>
116-
<goals>
117-
<goal>process-asciidoc</goal>
118-
</goals>
119-
<configuration>
120-
<sourceDocumentName>${doc}</sourceDocumentName>
121-
<outputDirectory>${basedir}/docs/generated-slides</outputDirectory>
122-
<backend>revealjs</backend>
123-
<templateDir>${basedir}/docs/asciidoctor-reveal.js-${asciidoctor-revealjs.version}/templates/slim</templateDir>
124-
<sourceHighlighter>coderay</sourceHighlighter>
125-
<attributes>
133+
<executions>
134+
<execution>
135+
<id>generate-slides</id>
136+
<phase>generate-resources</phase>
137+
<goals>
138+
<goal>process-asciidoc</goal>
139+
</goals>
140+
<configuration>
141+
<sourceDocumentName>${doc}</sourceDocumentName>
142+
<outputDirectory>${basedir}/docs/generated-slides</outputDirectory>
143+
<backend>revealjs</backend>
144+
<templateDir>${basedir}/docs/asciidoctor-reveal.js-${asciidoctor-revealjs.version}/templates/slim</templateDir>
145+
<sourceHighlighter>coderay</sourceHighlighter>
146+
<attributes>
126147

127-
As we are downloading reveal.js in runtime, it sits in a nonstandard folder `reveal.js-${revealjs.version}`
148+
As we are downloading reveal.js in runtime, it sits in a nonstandard folder `reveal.js-${revealjs.version}`
128149

129-
<revealjsdir>reveal.js-${revealjs.version}</revealjsdir>
130-
put here the reveal.js specific attributes
131-
see https://github.com/asciidoctor/asciidoctor-reveal.js/#revealjs-options
132-
<sourcedir>${basedir}/src/main/java</sourcedir>
133-
<revealjs_theme>white</revealjs_theme>
134-
<revealjs_transition>linear</revealjs_transition>
135-
<revealjs_maxscale>10.0</revealjs_maxscale>
136-
<project-version>${project.version}</project-version>
150+
<revealjsdir>reveal.js-${revealjs.version}</revealjsdir>
151+
put here the reveal.js specific attributes
152+
see https://github.com/asciidoctor/asciidoctor-reveal.js/#revealjs-options
153+
<sourcedir>${basedir}/src/main/java</sourcedir>
154+
<revealjs_theme>white</revealjs_theme>
155+
<revealjs_transition>linear</revealjs_transition>
156+
<revealjs_maxscale>10.0</revealjs_maxscale>
157+
<project-version>${project.version}</project-version>
137158

138-
</attributes>
139-
<extensions>
140-
<extension>
141-
<className>Controller.SlidesPreProcessor</className>
142-
</extension>
143-
</extensions>
159+
</attributes>
160+
<extensions>
161+
<extension>
162+
<className>Controller.SlidesPreProcessor</className>
163+
</extension>
164+
</extensions>
144165

145-
</configuration>
146-
</execution>
147-
<execution>
148-
<id>generate-pdf</id>
149-
<phase>generate-resources</phase>
150-
<goals>
151-
<goal>process-asciidoc</goal>
152-
</goals>
153-
<configuration>
154-
<sourceDocumentName>${doc}</sourceDocumentName>
155-
<outputDirectory>${basedir}/docs/generated-pdf</outputDirectory>
156-
<backend>pdf</backend>
157-
<sourceHighlighter>coderay</sourceHighlighter>
158-
<attributes>
159-
<path>${basedir}</path>
160-
<icons>font</icons>
161-
<pagenums/>
162-
<toc/>
163-
</attributes>
164-
<extensions>
165-
<extension>
166-
<className>Controller.PdfPreProcessor</className>
167-
</extension>
168-
</extensions>
166+
</configuration>
167+
</execution>
168+
<execution>
169+
<id>generate-pdf</id>
170+
<phase>generate-resources</phase>
171+
<goals>
172+
<goal>process-asciidoc</goal>
173+
</goals>
174+
<configuration>
175+
<sourceDocumentName>${doc}</sourceDocumentName>
176+
<outputDirectory>${basedir}/docs/generated-pdf</outputDirectory>
177+
<backend>pdf</backend>
178+
<sourceHighlighter>coderay</sourceHighlighter>
179+
<attributes>
180+
<path>${basedir}</path>
181+
<icons>font</icons>
182+
<pagenums/>
183+
<toc/>
184+
</attributes>
185+
<extensions>
186+
<extension>
187+
<className>Controller.PdfPreProcessor</className>
188+
</extension>
189+
</extensions>
169190

170-
</configuration>
171-
</execution>
172-
<execution>
173-
<id>generate-html</id>
174-
<phase>generate-resources</phase>
175-
<goals>
176-
<goal>process-asciidoc</goal>
177-
</goals>
178-
<configuration>
179-
<sourceDocumentName>${doc}</sourceDocumentName>
180-
<outputDirectory>${basedir}/docs/generated-html</outputDirectory>
181-
<backend>html</backend>
182-
<sourceHighlighter>coderay</sourceHighlighter>
183-
<extensions>
184-
<extension>
185-
<className>Controller.HtmlPreProcessor</className>
186-
</extension>
187-
</extensions>
188-
<attributes>
189-
<icons>font</icons>
190-
<pagenums/>
191-
<toc/>
192-
</attributes>
193-
</configuration>
194-
</execution>
195-
</executions>
191+
</configuration>
192+
</execution>
193+
<execution>
194+
<id>generate-html</id>
195+
<phase>generate-resources</phase>
196+
<goals>
197+
<goal>process-asciidoc</goal>
198+
</goals>
199+
<configuration>
200+
<sourceDocumentName>${doc}</sourceDocumentName>
201+
<outputDirectory>${basedir}/docs/generated-html</outputDirectory>
202+
<backend>html</backend>
203+
<sourceHighlighter>coderay</sourceHighlighter>
204+
<extensions>
205+
<extension>
206+
<className>Controller.HtmlPreProcessor</className>
207+
</extension>
208+
</extensions>
209+
<attributes>
210+
<icons>font</icons>
211+
<pagenums/>
212+
<toc/>
213+
</attributes>
214+
</configuration>
215+
</execution>
216+
</executions>
196217
</plugin>
197218
<plugin>
198219
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)