Adjust to personal needs

This commit is contained in:
2021-05-16 22:01:36 +02:00
parent cf6cb99174
commit 2e703347d6
13 changed files with 135 additions and 39 deletions

View File

@@ -0,0 +1,46 @@
kind: pipeline
type: docker
name: test
steps:
- name: hunspell_chapters
image: fastexitlane/hunspell:latest
commands:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.md; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
failure: ignore
- name: hunspell_appendix
image: fastexitlane/hunspell:latest
commands:
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- '[ -z "$HUNSPELL_FINDINGS" ] && exit 0 || exit 1'
failure: ignore
---
kind: pipeline
type: docker
name: build
steps:
- name: pandoc
image: fastexitlane/pandoc-latex:latest
commands:
- ./build.sh pandoc
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://git.kingofdog.de
files:
- main.pdf
when:
event:
- tag
trigger:
branch:
- main

View File

@@ -0,0 +1,37 @@
stages:
- test
- build
pandoc_latexmk:
image: fastexitlane/pandoc-latex:latest
stage: build
artifacts:
paths:
- main*.pdf
expire_in: 2d
script:
- ./build.sh pandoc
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- mv main.pdf main@$ci_commit_sha_short.pdf
hunspell_chapters:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in chapter/*.md; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true
hunspell_appendix:
image: fastexitlane/hunspell:latest
stage: test
script:
- export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- echo $HUNSPELL_FINDINGS
- test "$HUNSPELL_FINDINGS" == ""
allow_failure: true

View File

@@ -0,0 +1,31 @@
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: spellcheck
jobs:
- job: spellcheck_chapters
container: fastexitlane/hunspell:latest
continueOnError: true
steps:
- script: export HUNSPELL_FINDINGS=`for filename in chapter/*.md; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore $filename; done | sort | uniq`
- script: echo $HUNSPELL_FINDINGS
- script: test "$HUNSPELL_FINDINGS" == ""
- job: spellcheck_appendix
container: fastexitlane/hunspell:latest
continueOnError: true
steps:
- script: export HUNSPELL_FINDINGS=`for filename in appendix/*.tex; do hunspell -l -d de_DE_frami,en_US -p ./.hunspellignore -t $filename; done | sort | uniq`
- script: echo $HUNSPELL_FINDINGS
- script: test "$HUNSPELL_FINDINGS" == ""
- stage: build
jobs:
- job: pandoc_latexmk
steps:
- script: ./build.sh pandoc
displayName: Run Build Script with Pandoc Option
- task: PublishBuildArtifacts@1
inputs:
ArtifactName: main.pdf
PathtoPublish: ./main.pdf

View File

View File

@@ -0,0 +1,85 @@
% Makros
\newcommand{\dokumententyp}{Dokumententyp}
\newcommand{\abgabedatum}{\today}
\newcommand{\ort}{Ort}
\newcommand{\dokumententitel}{Titel}
\newcommand{\dokumentenuntertitel}{Untertitel}
\newcommand{\dokumentenautor}{Autor}
\newcommand{\matrikelnr}{Matrikel-Nr.}
\newcommand{\dokumentenautoradresse}{Adresse}
\newcommand{\dokumentenpruefer}{Prüfer}
\newcommand{\studiengang}{Studiengang}
\newcommand{\studiengruppe}{Studiengruppe}
\newcommand{\institution}{Institution}
% config
\input{config.tex}
% hyphenation
\input{additionals/hyphenation.tex}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%
%% document title page %%
%%%%%%%%%%%%%%%%%%%%%%%%%
\input{additionals/title.tex}
%%%%%%%%%%%%%
%% indexes %%
%%%%%%%%%%%%%
\pagenumbering{Roman}
% disclosure statement - uncomment if needed
% \input{additionals/disclosure.tex}
% \newpage
% executive summary - uncomment if needed
% \input{additionals/executive_summary.tex}
% \newpage
% table of contents
\tableofcontents
\newpage
% acronyms
\input{additionals/acronyms.tex}
\newpage
% list of figures
\listoffigures
\newpage
% list of tables
\listoftables
\newpage
% list of listings
\listoflistings
\newpage
%%%%%%%%%%%%%
%% content %%
%%%%%%%%%%%%%
\pagenumbering{arabic}
% when using pandoc workflow, we only need to include the build output
\input{chapter/out.tex}
\newpage
%%%%%%%%%%%%%
%% closing %%
%%%%%%%%%%%%%
% list of references
\input{additionals/references.tex}
\newpage
% appendix - uncomment if needed
% \begin{custom_appendix}
% \input{appendix/appendix.tex}
% \newpage
% \end{custom_appendix}
% affirmation
\input{additionals/affirmation.tex}
\end{document}

View File

@@ -0,0 +1,43 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "latexmk",
"type": "shell",
"command": "docker run --rm -u 1000 -v '${workspaceFolder}:/work/' -w /work/ fastexitlane/pandoc-latex:latest ./build.sh pandoc",
"group": {
"kind": "build",
"isDefault": true
},
"dependsOrder": "sequence",
"dependsOn": [
"clean"
]
},
{
"label": "clean",
"type": "shell",
"command": "docker run --rm -u 1000 -v '${workspaceFolder}:/work/' -w /work/ fastexitlane/pandoc-latex:latest ./build.sh clean",
"group": "none"
},
{
"label": "wordcount",
"type": "shell",
"command": "docker run --rm -u 1000 -v '${workspaceFolder}:/work/' -w /work/ fastexitlane/pandoc-latex:latest pandoc --lua-filter=/work/wordcount.lua /work/chapter/out.md",
"group": "none",
"problemMatcher": []
},
{
"label": "overusedwords",
"type": "shell",
"command": "cat chapter/out.md | tr 'A-ZÄÖÜ' 'a-zäöü' | sed --regexp-extended 's/\\\\acf?s?p?\\{([^}]+)\\}/\\1/g' | sed 's/-/ /g' | sed 's/[^a-zäöü ]//g' | tr -s '[[:space:]]' '\\n' | sort | uniq -c | sort -nr | head -n100 > words.txt",
"windows": {
"command": "wsl cat chapter/out.md `| tr 'A-ZÄÖÜ' 'a-zäöü' `| sed 's/-/ /g' `| sed 's/[^a-zäöü]//g' `> words.txt"
},
"group": "none",
"problemMatcher": []
}
]
}