Skip to content

Commit 5da0693

Browse files
author
Valentin Deyringer
committed
fix: fix paths to scripts and misc files
do some restructuring of directories
1 parent 7e1c6ea commit 5da0693

File tree

8 files changed

+24
-20
lines changed

8 files changed

+24
-20
lines changed

.github/workflows/generate-author-guide.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ jobs:
1414
with:
1515
python-version: '3.10'
1616
- name: merge usage documentation files into one
17-
run: python docs/md_merge.py --input docs/user --lang en --output docs --name author_guide.md
17+
run: python scripts/md_merge.py --input user --lang en --output . --name author_guide.md
1818
- name: convert markdown to docx
1919
uses: docker://pandoc/latex:2.19
2020
with:
2121
args: >-
22-
docs/author_guide.md
22+
author_guide.md
2323
-f markdown
2424
-t docx
25-
-o docs/author_guide.docx
26-
--lua-filter=docs/filters.lua
27-
--defaults=docs/defaults.yaml
25+
-o author_guide.docx
26+
--lua-filter=etc/filters.lua
27+
--defaults=etc/defaults.yaml
2828
- name: convert docx to PDF/UA
2929
uses: jmservera/[email protected]
3030
with:
3131
command:
3232
libreoffice --headless --terminate_after_init
33-
&& cp docs/customModule.xba ${HOME}/.config/libreoffice/4/user/basic/Standard/
33+
&& cp etc/customModule.xba ${HOME}/.config/libreoffice/4/user/basic/Standard/
3434
&& sed -i '4i\ <library:element library:name="customModule"/>' ${HOME}/.config/libreoffice/4/user/basic/Standard/script.xlb
3535
&& sed -i '3i<item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="WarnAlienFormat" oor:op="fuse"><value>false</value></prop></item>' ${HOME}/.config/libreoffice/4/user/registrymodifications.xcu
36-
&& libreoffice --headless --invisible "macro:///Standard.customModule.UpdateIndexes(${GITHUB_WORKSPACE}/docs/author_guide.docx)"
36+
&& libreoffice --headless --invisible "macro:///Standard.customModule.UpdateIndexes(${GITHUB_WORKSPACE}/author_guide.docx)"
3737
&& sed -i '3i<item oor:path="/org.openoffice.Office.Common/Filter/PDF/Export"><prop oor:name="PDFUACompliance" oor:op="fuse"><value>true</value></prop></item>' ${HOME}/.config/libreoffice/4/user/registrymodifications.xcu
38-
&& libreoffice --headless --convert-to pdf:writer_pdf_Export --outdir docs docs/author_guide.docx
38+
&& libreoffice --headless --convert-to pdf:writer_pdf_Export --outdir . author_guide.docx
3939
- name: upload the author guide
4040
uses: actions/upload-artifact@v3
4141
with:
42-
name: author-guide.pdf
43-
path: docs/author_guide.pdf
42+
name: author_guide.pdf
43+
path: author_guide.pdf

.github/workflows/github-pages.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
with:
1818
python-version: '3.10'
1919
- name: merge usage documentation files into one
20-
run: python docs/md_merge.py --input docs/user --lang en --output docs --name author_guide.md
20+
run: python scripts/md_merge.py --input user --lang en --output . --name author_guide.md
2121
- name: convert markdown to html
2222
uses: docker://pandoc/latex:2.19
2323
with:
2424
args: >-
25-
docs/author_guide.md
25+
author_guide.md
2626
-f markdown
2727
-t html
2828
-o public/index.html
29-
--lua-filter=docs/filters.lua
30-
--defaults=docs/defaults.yaml
29+
--lua-filter=etc/filters.lua
30+
--defaults=etc/defaults.yaml
3131
- name: deploy to GitHub pages
3232
uses: JamesIves/github-pages-deploy-action@v4
3333
with:

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,34 @@ Additionally, an author guide is generated as PDF document.
99
The author guide is a concatenation of the usage documentation files compiled into an accessible PDF document.
1010
To generate this document the following steps are necessary:
1111

12-
* Merge the usage documentation files (`*-usage.en.md`) using the script `md_merge.py`.
12+
* Merge the usage documentation files (`*-usage.en.md`) using the
13+
[md_merge.py](https://github.com/secvisogram/secvisogram-documentation/blob/main/scripts/md_merge.py) script.
1314

14-
`python docs/md_merge.py --input docs/user --lang en --output docs --name author_guide.md`
15+
`python scripts/md_merge.py --input user --lang en --output . --name author_guide.md`
1516

1617
This script allows for selecting a specific language, see the `--lang` flag.
1718
See [below](#translating-the-documentation) for details on how to translate the documentation.
1819

1920
* Convert the resulting markdown file into docx format.
2021

21-
`pandoc docs/author_guide.md -f markdown -t docx -o docs/author_guide.docx -V block-headings --table-of-contents --lua-filter=docs/filters.lua --defaults=docs/defaults.yaml`
22+
`pandoc author_guide.md -f markdown -t docx -o author_guide.docx --lua-filter=etc/filters.lua --defaults=etc/defaults.yaml`
2223

2324
* Populate the documents' table of contents with a custom macro.
2425

2526
`libreoffice --headless --invisible "macro:///Standard.customModule.UpdateIndexes(/absolute/path/to/author_guide.docx)"`
2627

27-
This requires the [custom macro](https://github.com/secvisogram/secvisogram-documentation/blob/main/customModule.xba) to be available in libreoffice.
28+
This requires the absolute path to the generated docx file and the
29+
[custom macro](https://github.com/secvisogram/secvisogram-documentation/blob/main/etc/customModule.xba) to be
30+
available in libreoffice.
2831

2932
* Convert the docx file into an accessible PDF with libreoffice.
3033

31-
`libreoffice --headless --convert-to pdf:writer_pdf_Export --outdir docs docs/author_guide.docx`
34+
`libreoffice --headless --convert-to pdf:writer_pdf_Export --outdir . author_guide.docx`
3235

3336
To generate an accessible PDF this requires Universal Access Compliance to be enabled in libreoffice.
3437

35-
The title and author of the resulting document can be changed in `defaults.yaml`.
38+
The title and author of the resulting document can be changed in
39+
[etc/defaults.yaml](https://github.com/secvisogram/secvisogram-documentation/blob/main/etc/defaults.yaml).
3640

3741
A GitHub action is used to automate these steps and publish the English author guide as an artifact.
3842
See the [generate-author-guide.yml](https://github.com/secvisogram/secvisogram-documentation/blob/main/.github/workflows/generate-author-guide.yml) workflow.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)