Skip to content

Commit cbae779

Browse files
committed
init
0 parents  commit cbae779

29 files changed

+3874
-0
lines changed

.github/workflows/deploy-site.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build and deploy website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Build Asciidoc
17+
uses: docker://asciidoctor/docker-asciidoctor
18+
with:
19+
args: "asciidoctor out/cnf-reqs-1.3.adoc -o index.html"
20+
21+
- name: Copy output to docs/
22+
run: |
23+
mkdir docs
24+
cp -r out/images/ docs/images
25+
mv index.html docs/
26+
- name: Publish to GitHub Pages
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./docs

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Introduction
2+
3+
This repo is a scratch pad for a GDoc > Docx > AsciiDoc conversion workflow using a number of conversion steps.
4+
5+
Tools used: Libre Office, Pandoc, Nebel, AsciiDoctor.
6+
7+
**NOTE: This repo is a scratch pad only, content is not final or production ready, do not share**
8+
9+
## Gdoc > Docx steps
10+
11+
The GDoc file I reviewed had some mismatches in formatting which I tidied up. The pandoc conversion uses Document styles to apply formatting. Consistent Styles in GDoc mean the conversion is more consistent.
12+
13+
* Download the [CNF GDoc](https://docs.google.com/document/d/1NmqbdTHll4kMamcaarCBagN7ZYlHysVtaRlolAu56R8/edit) as .docx > "Save as ... docx"
14+
* Open the downloaded docx in libre Office, and clean up codeblocks (apply "Source Code" style to codeblocks), and definition list elements, etc using reference.docx as a formatting guide.
15+
* Save docx updates as "Word docx 2007 compatible".
16+
17+
## Pandoc conversion
18+
19+
```cmd
20+
pandoc -t asciidoc -f docx cnf-reqs_1.3.docx -o cnf-reqs_1.3.adoc --extract-media ./images --wrap=none
21+
```
22+
23+
## Split single AsciiDoc file into topic modules + assembly
24+
25+
```cmd
26+
nebel split --legacybasedir ./ cnf-reqs_1.3_single.adoc
27+
```
28+
29+
## Description of demo files
30+
31+
* `cnf-reqs_1.3.docx` is a minimally modified docx version of the cnf-reqs GDoc. Main change is tidying up codeblocks using "Source Code" paragraph style.
32+
* `cnf-reqs_1.3_single.adoc` is a cleaned up version of the pandoc conversion of `cnf-reqs_1.3.docx`
33+
* `out/` contains a chunked version of the AsciiDoc files. **This is close to what the final conversion should look like.**
34+
* `reference.docx` shows the supported styles for pandoc conversions.
35+
* `reference.adoc` generated from `reference.docx`
36+
* Single file is cut to assembly + out file using [nebel](https://github.com/fbolton/nebel#splitting-content)
37+
38+
## AsciiDoc-side cleanup
39+
40+
TODO: write a grep n replace script that does the following:
41+
42+
* `____` > ``
43+
* ` {blank}\n+\n` > ` `
44+
* Optional: `....\n` > `----\n`
45+
* Fix xrefs
46+
* Fix section titles, bullets, dl formatting
47+
* Run output through choppy/nebel - make sensible length topics

cnf-reqs_1.3.docx

289 KB
Binary file not shown.

cnf-reqs_1.3_single.adoc

Lines changed: 1806 additions & 0 deletions
Large diffs are not rendered by default.

images/media/image1.png

38.1 KB
Loading

images/media/image2.png

82.2 KB
Loading

images/media/image3.png

106 KB
Loading

out/cnf-reqs-1.3.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[id="cnf-reqs-1.3"]
2+
= CNF Requirements Version 1.3
3+
:doctype: book
4+
:toc: left
5+
:toclevels: 4
6+
7+
include::modules/intro.adoc[leveloffset=+1]
8+
9+
include::modules/cnf-dev-guidelines.adoc[leveloffset=+1]
10+
11+
include::modules/cloud-native-cnf-scc.adoc[leveloffset=+1]
12+
13+
include::modules/cnf-expectations.adoc[leveloffset=+1]
14+
15+
include::modules/cnf-core-edge.adoc[leveloffset=+1]
16+
17+
include::modules/cnf-paas-core-edge.adoc[leveloffset=+1]
18+
19+
include::modules/cnf-pod-permissions.adoc[leveloffset=+1]
20+
21+
include::modules/cnf-best-practices.adoc[leveloffset=+1]
22+
23+
include::modules/cnf-operator-best-practices.adoc[leveloffset=+1]
24+
25+
include::modules/cnf-container-best-practices.adoc[leveloffset=+1]
26+
27+
include::modules/cnf-networking.adoc[leveloffset=+1]
28+
29+
include::modules/cnf-app-services.adoc[leveloffset=+1]
30+
31+
include::modules/cnf-service-mesh.adoc[leveloffset=+1]
32+
33+
include::modules/cnf-app-def.adoc[leveloffset=+1]
34+
35+
include::modules/cnf-security.adoc[leveloffset=+1]

out/images/media/image1.png

38.1 KB
Loading

out/images/media/image2.png

82.2 KB
Loading

0 commit comments

Comments
 (0)