Adjust to personal needs
This commit is contained in:
46
templates/markdown/.drone.yml
Normal file
46
templates/markdown/.drone.yml
Normal 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
|
37
templates/markdown/.gitlab-ci.yml
Normal file
37
templates/markdown/.gitlab-ci.yml
Normal 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
|
||||
|
31
templates/markdown/azure-pipelines.yml
Normal file
31
templates/markdown/azure-pipelines.yml
Normal 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
|
||||
|
0
templates/markdown/github-workflow.yml
Normal file
0
templates/markdown/github-workflow.yml
Normal file
85
templates/markdown/main.tex
Normal file
85
templates/markdown/main.tex
Normal 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}
|
43
templates/markdown/tasks.json
Normal file
43
templates/markdown/tasks.json
Normal 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": []
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user