Skip to content

Commit

Permalink
Switched from docToolchain to asciidoctor
Browse files Browse the repository at this point in the history
  • Loading branch information
BAndiT1983 committed Apr 17, 2024
1 parent 1ae559e commit 41df7f2
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 24 deletions.
39 changes: 24 additions & 15 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,35 @@ on:

jobs:
deploy:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
env:
DTC_HEADLES: true
container:
image: uwebarthel/asciidoctor
volumes:
- ${{ github.workspace }}:/documents
defaults:
run:
working-directory: /documents
steps:
- uses: actions/checkout@v3
- name: setup
run: chmod +x dtcw
- name: generateHTML
run: ./dtcw generateHTML
- name: generatePDF
run: ./dtcw generatePDF
- name: Create build dirs
run: mkdir -p build/html build/pdf
- name: Build HTML
run: |
cp -r pages/images build/html/images
asciidoctor -r asciidoctor-kroki -D build --backend=html5 -o html/index.html pages/Main.adoc
- name: Build PDF
run: "asciidoctor-pdf -r asciidoctor-kroki -D build --backend=pdf -o pdf/apertus_docs.pdf pages/Main.adoc"
- name: copyHTMLToPublic
run: cp -r ./build/html5/ ./public
run: cp -r ./build/html/index.html ./public
- name: copyPDFToPublic
run: cp ./build/pdf/*.pdf ./public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
run: cp ./build/pdf/apertus_docs.pdf ./public
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# # if: ${{ github.ref == 'refs/heads/main' }}
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./public
5 changes: 1 addition & 4 deletions pages/Main.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
:repo-url: https://github.com/apertus-open-source-cinema/documentation-wiki
:pdf-themesdir: ../themes/
:pdf-fontsdir: ../themes/
:pdf-theme: apertus
include::config.adoc[]

[.text-right]
{repo-url}/blob/main/pages/{docname}{docfilesuffix}[Edit]
Expand Down
4 changes: 2 additions & 2 deletions pages/Page1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ That *_really_* has to go.

Can't pick one? Let's use them `*_all_*`.

:source-highlighter: coderay

Check out this example C source code:

[source, c]
----
#include <stdio.h>
Expand All @@ -72,6 +71,7 @@ int main() {
When connecting to the camera via Wifi the hostname is automatically set to `axiom.camera`.

This means you can use `axiom.camera` instead of the IP in your browser to access the WebUi or through ssh:
[source, shell]
----
ssh [email protected]
----
Expand Down
71 changes: 68 additions & 3 deletions pages/Page3.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== PlantUML

[plantuml, svg]
[plantuml]
....
skinparam ranksep 20
skinparam dpi 125
Expand All @@ -26,20 +26,85 @@ main_ts ==> (main.view)

== PlantUML (external file)

[plantuml, "syntax-example2", svg]
[plantuml, "syntax-example2"]
....
include::../data/test.puml[]
....

== Kroki!

[wavedrom]
[wavedrom, test_waveform, svg, opts=interactive]
....
{ signal: [
{ name: "clk2", wave: "p.....|..." },
{ name: "clk", wave: "p.....|..." },
{ name: "Data", wave: "x.345x|=.x", data: ["head", "body", "tail", "data"] },
{ name: "Request", wave: "0.1..0|1.0" },
{},
{ name: "Acknowledge", wave: "1.....|01." }
]}
....


[graphviz, inline]
....
digraph foo {
node [style=rounded]
node1 [shape=box]
node2 [fillcolor=yellow, style="rounded,filled", shape=diamond]
node3 [shape=record, label="{ a | b | c }"]
node1 -> node2 -> node3
}
....


[bytefield]
....
(defattrs :bg-green {:fill "#a0ffa0"})
(defattrs :bg-yellow {:fill "#ffffa0"})
(defattrs :bg-pink {:fill "#ffb0a0"})
(defattrs :bg-cyan {:fill "#a0fafa"})
(defattrs :bg-purple {:fill "#e4b5f7"})
(defn draw-group-label-header
"Creates a small borderless box used to draw the textual label headers
used below the byte labels for remotedb message diagrams.
Arguments are the number of columns to span and the text of the
label."
[span label]
(draw-box (text label [:math {:font-size 12}]) {:span span
:borders #{}
:height 14}))
....


[wireviz]
....
connectors:
X1:
type: D-Sub
subtype: female
pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
X2:
type: Molex KK 254
subtype: female
pinlabels: [GND, RX, TX]
cables:
W1:
gauge: "0.25 mm2"
length: 0.2
color_code: DIN
wirecount: 3
shield: true
connections:
-
- X1: [5,2,3]
- W1: [1,2,3]
- X2: [1,3,2]
-
- X1: 5
- W1: s
....
8 changes: 8 additions & 0 deletions pages/config.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:repo-url: https://github.com/apertus-open-source-cinema/documentation-wiki
:pdf-themesdir: ./themes/
:pdf-fontsdir: ./themes/
:pdf-theme: apertus
:source-highlighter: coderay
:kroki-fetch-diagram: true
:imagesdir: ./images
:imagesoutdir: pages/images

0 comments on commit 41df7f2

Please sign in to comment.