Skip to content

Commit

Permalink
Merge branch 'branch-preview' into branch-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Oct 16, 2024
2 parents 7a0044d + ead36b2 commit 18461e3
Show file tree
Hide file tree
Showing 32 changed files with 628 additions and 32 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/asciidoc_2_gh_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
- name: Verify Mermaid CLI installation
run: mmdc --version

- name: Convert AsciiDoc to HTML5
run: cd fj-doc-guide;mvn clean asciidoctor:process-asciidoc@asciidoc-to-html
- name: Convert AsciiDoc to HTML5 and PDF
run: cd fj-doc-guide;mvn clean asciidoctor:process-asciidoc@asciidoc-to-html asciidoctor:process-asciidoc@asciidoc-to-pdf

- name: Build Legacy Pages
uses: actions/jekyll-build-pages@main
Expand All @@ -64,6 +64,9 @@ jobs:
- name: Copy new site
run: cp -fr ./fj-doc-guide/target/generated-html5/ ./fj-doc-guide/target/site/guide/

- name: Copy pdf buide
run: cp -fr ./fj-doc-guide/target/generated-pdf/fj-doc-guide-*.pdf ./fj-doc-guide/target/site/guide/fj-doc-guide.pdf

- name: Setup Pages
uses: actions/configure-pages@main

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_maven_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ jobs:
maven-additional-profiles: ',buildreact'
disable-maven-dependency-submission: ${{ vars.DISABLE_MAVEN_DEPENDENCY_SUBMISSION }}
disable-upload-sarif: ${{ vars.DISABLE_UPLOAD_SARIF }}
maven-core: '2'
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- [fj-doc-maven-plugin] support for asciidoc doc handler (fj-doc-version 8.8.7+)
- [fj-doc-maven-plugin] updated readme information for quarkus-3 flavour
- [fj-doc-guide] added pdf documentation
- [fj-doc-playground-quarkus] fj-doc-ext-kotlin-version set to 0.4.2

## [8.9.2] - 2024-10-14

### Changed
Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Framework to produce documents in different output formats starting from an XML
[![Online playground](https://img.shields.io/badge/Try%20Now-Online%20Playground-1AC736?style=for-the-badge&logo=Onlinect%20Playground&logoColor=white)](https://docs.fugerit.org/fj-doc-playground/home/)
[![Fugerit Github Project Conventions](https://img.shields.io/badge/Fugerit%20Org-Project%20Conventions-1A36C7?style=for-the-badge&logo=Onlinect%20Playground&logoColor=white)](https://universe.fugerit.org/src/docs/conventions/index.html)

[![view - Guide](https://img.shields.io/badge/view-Guide-blue?style=for-the-badge)](https://venusdocs.fugerit.org/guide/ "Go to project documentation")
[![HTML - Guide](https://img.shields.io/badge/HTML-Guide-blue?style=for-the-badge)](https://venusdocs.fugerit.org/guide/ "Go to project HTML documentation")
[![PDF - Guide](https://img.shields.io/badge/PDF-Guide-red?style=for-the-badge)](https://venusdocs.fugerit.org/guide/fj-doc-guide.pdf "Go to project PDF documentation")

The Core library (fj-doc-base) is all you need to start, even though typically you will use at least :
* [fj-doc-base](fj-doc-base/README.md)
Expand All @@ -38,14 +39,6 @@ Full build is made by :

`mvn clean install -P full,test`

Or with the maven wrapper for linux :

`./mvnw clean install -P full,test`

Or with the maven wrapper for windows :

`./mvnw clean install -P full,test`

### Run

The Fugerit Venus Doc project is a library for generating documents to be included.
Expand Down
10 changes: 5 additions & 5 deletions fj-doc-guide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<properties>
<!-- asciidoc properties -->
<asciidoctor.maven.plugin.version>3.0.0</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>2.3.15</asciidoctorj.pdf.version>
<asciidoctorj.version>2.5.12</asciidoctorj.version>
<asciidoctorj.diagram.version>2.3.0</asciidoctorj.diagram.version>
<asciidoctorj.diagram-plantuml.version>1.2024.3</asciidoctorj.diagram-plantuml.version>
<asciidoctorj.pdf.version>2.3.18</asciidoctorj.pdf.version>
<asciidoctorj.version>3.0.0</asciidoctorj.version>
<asciidoctorj.diagram.version>2.3.1</asciidoctorj.diagram.version>
<asciidoctorj.diagram-plantuml.version>1.2024.5</asciidoctorj.diagram-plantuml.version>
<asciidoctorj.diagram-ditaamini.version>1.0.3</asciidoctorj.diagram-ditaamini.version>
<jruby.version>9.4.6.0</jruby.version>
<jruby.version>9.4.8.0</jruby.version>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
<pdf-output-folder>${project.build.directory}/generated-pdf</pdf-output-folder>
<html-output-folder>${project.build.directory}/generated-html5</html-output-folder>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
:author: Matteo Franci
:revnumber: v1.0.0
:revdate: June XX, 2024
:revdate: October 15, 2024
:email: [email protected]
:description: This is a comparison of a simple online demo photobook \
implemented with three popular java cloud ready framework.
:keywords: java, graalvm, spring, springboot, quarkus, micronaut
:description: Fugerit Doc Venus : document generation framework
:keywords: java, xml, json, yaml, kotlin, pdf, html, xlsx, csv, document generation
:encoding: utf-8
:lang: en
:toc: left
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[#doc-format-entry-point-info]
=== Doc Format Info Element

The _info_ element is available to setup some specific properties of the document.

Here is a link:https://venusdocs.fugerit.org/docs/html/doc_meta_info.html[list of possible info element].

For instance in this document we set following _info_ elements :

* margin
* doc-title
* doc-author
* doc-language
Some DocHandler will ignore some info elements.

[source,xml]
----
<?xml version="1.0" encoding="utf-8"?>
<doc
xmlns="http://javacoredoc.fugerit.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-1.xsd" >
<metadata>
<!-- Margin for document : left;right;top;bottom -->
<info name="margins">10;10;10;30</info>
<!-- documenta meta information -->
<info name="doc-title">Hello World</info>
<info name="doc-author">fugerit79</info>
<info name="doc-language">en</info>
</metadata>
<body>
<para>Hello World!</para>
</body>
</doc>
----
50 changes: 50 additions & 0 deletions fj-doc-guide/src/main/docs/asciidoc/chapters/06_0_base.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<<<
[#doc-handler-base]
=== [fj-doc-base]

Here are described the doc handlers included in the basic module, which usually is always included :

[source,xml]
----
<dependency>
<groupId>org.fugerit.java</groupId>
<artifactId>fj-doc-base</artifactId>
<version>${fj-doc-version}</version>
</dependency>
----

[#doc-handler-base-md-ext]
==== MarkDown (Extended)

This doc handler would render a MarkDown (Extended) document. The Basic and Extended version only differ for table management. Basic version will render tables in html.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<docHandler id="md-ext" info="md" type="org.fugerit.java.doc.base.typehandler.markdown.SimpleMarkdownExtTypeHandlerNoCommentsUTF8" />
----

[#doc-handler-base-md-basic]
==== MarkDown (Basic)

This doc handler would render a MarkDown (Basic) document. The Basic and Extended version only differ for table management. Basic version will render tables in html.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<docHandler id="md-basic" info="md" type="org.fugerit.java.doc.base.typehandler.markdown.SimpleMarkdownBasicTypeHandlerNoCommentsUTF8" />
----
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ To use this doc handler, you will need to add the following dependency :

This doc handler would render a full html document.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
Add this element to *<docHandlerConfig/>* :

[source,xml]
Expand All @@ -31,9 +37,33 @@ Add this element to *<docHandlerConfig/>* :
This doc handler would render only the body of the html document.
(useful to inject the body as a fragment).

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<docHandler id="html-fragment-fm" info="fhtml" type="org.fugerit.java.doc.freemarker.html.FreeMarkerHtmlFragmentTypeHandlerEscapeUTF8" />
----

[#doc-handler-freemarker-asciidoc]
==== Asciidoc (ADOC)

This doc handler would be rendered as an asciidoc document.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<docHandler id="asciidoc-fm" info="adoc" type="org.fugerit.java.doc.freemarker.asciidoc.FreeMarkerAsciidocTypeHandlerUTF8" />
----
14 changes: 13 additions & 1 deletion fj-doc-guide/src/main/docs/asciidoc/chapters/06_2_mod-fop.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<<<
[#doc-handler-mod-fop]
=== [fj-doc-mod-fop]
=== [fj-doc-mod-fop] A PDF/FO DocHandler

To use this doc handler, you will need to add the following dependency :

Expand All @@ -22,6 +22,12 @@ Usually Apache FOP uses link:https://www.w3.org/TR/xslt-30/[XSL Transformations]

This doc handler would render a full PDF document with default FOP configuration.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _NO_ (As Apache FOP is not ready).
Add this element to *<docHandlerConfig/>* :

[source,xml]
Expand Down Expand Up @@ -114,6 +120,12 @@ And here a link:https://venusdocs.fugerit.org/fj-doc-sample/src/main/resources/f

This doc handler would render a full link:https://xmlgraphics.apache.org/fop/fo.html[FO] intermediate document.

*In brief* :

- *compliance level* : _HIGH_
- *compliance detail* : All generic link:#doc-format-entry-point[Venus Doc Format] elements are supported.
- *native ready* : _YES_
[source,xml]
----
<!-- Type handler generating xls:fo style sheet -->
Expand Down
107 changes: 107 additions & 0 deletions fj-doc-guide/src/main/docs/asciidoc/chapters/06_3_mod-poi.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<<<
[#doc-handler-mod-poi]
=== [fj-doc-mod-poi] : a XLS/XLSX DocHandler

To use this doc handler, you will need to add the following dependency :

[source,xml]
----
<dependency>
<groupId>org.fugerit.java</groupId>
<artifactId>fj-doc-mod-poi</artifactId>
<version>${fj-doc-version}</version>
</dependency>
----

This module is based on link:https://poi.apache.org/[Apache POI Project].

[#doc-handler-mod-poi-basics]
==== POI Handler Basics

The following information apply to both xlsx and xls DocHandler.

You will need at least a table, with an _id_ set. (in this example the id is *data-table*).

And the link:https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#excel-table-id[excel-table-id] element with the comma separated enumeration of the table to render as sheet. :

[source,xml]
----
<info name="excel-table-id">data-table=print</info>
----

The given table (*data-table*) will be rendered as the named sheet (*print*) in the couple : *$tableId*=*$sheetName*.

Here is a full example.

[source,xml]
----
<?xml version="1.0" encoding="utf-8"?>
<doc
xmlns="http://javacoredoc.fugerit.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://javacoredoc.fugerit.org https://www.fugerit.org/data/java/doc/xsd/doc-2-1.xsd" >
<metadata>
<!-- property specific for xls/xlsx -->
<info name="excel-table-id">data-table=print</info>
</metadata>
<body>
<table columns="3" colwidths="30;30;40" width="100" id="data-table" padding="2">
<row>
<cell align="center" border-color="#000000" border-width="1"><para style="bold">Name</para></cell>
<cell align="center"><para style="bold">Surname</para></cell>
<cell align="center"><para style="bold">Title</para></cell>
</row>
<row>
<cell><para><![CDATA[Luthien]]></para></cell>
<cell><para><![CDATA[Tinuviel]]></para></cell>
<cell><para><![CDATA[Queen]]></para></cell>
</row>
<row>
<cell><para><![CDATA[Thorin]]></para></cell>
<cell><para><![CDATA[Oakshield]]></para></cell>
<cell><para><![CDATA[King]]></para></cell>
</row>
</table>
</body>
</doc>
----

More elements specific to excel format are available link:https://venusdocs.fugerit.org/docs/html/doc_meta_info.html#meta_xls[here].

[#doc-handler-mod-poi-xlsx]
==== Xlsx DocHandler

This doc handler would a XLSX document.

*In brief* :

- *compliance level* : _MEDIUM_
- *compliance detail* : Only single table elements of the link:#doc-format-entry-point[Venus Doc Format] are rendered.
- *native ready* : _NO_ (As Apache POI is not ready).
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<!-- XLSX type hanlder -->
<docHandler id="xlsx-poi" info="xlsx" type="org.fugerit.java.doc.mod.poi.XlsxPoiTypeHandler" />
----

[#doc-handler-mod-poi-xls]
==== Xls DocHandler

This doc handler would a XLS document.

*In brief* :

- *compliance level* : _MEDIUM_
- *compliance detail* : Only single table elements of the link:#doc-format-entry-point[Venus Doc Format] are rendered.
- *native ready* : _NO_ (As Apache POI is not ready).
Add this element to *<docHandlerConfig/>* :

[source,xml]
----
<!-- XLSX type hanlder -->
<docHandler id="xls-poi" info="xlsx" type="org.fugerit.java.doc.mod.poi.XlsPoiTypeHandler" />
----
Loading

0 comments on commit 18461e3

Please sign in to comment.