forked from Hg/htlle-da-vorlage
Spellcheck creates now an intermediate file with the spellcheck results and the make target intends the mis-spelled words
This commit is contained in:
parent
992edcfad1
commit
cd598e3e88
20
Makefile
20
Makefile
@ -10,6 +10,7 @@ BIBFILE=$(INPUTDIR)/literatur.bib
|
|||||||
METADATAFILE = $(INPUTDIR)/metadata.yaml
|
METADATAFILE = $(INPUTDIR)/metadata.yaml
|
||||||
OUTPUTFILE = $(OUTPUTDIR)/diplomarbeit.pdf
|
OUTPUTFILE = $(OUTPUTDIR)/diplomarbeit.pdf
|
||||||
LOGFILE = $(OUTPUTFILE).log
|
LOGFILE = $(OUTPUTFILE).log
|
||||||
|
SPELLERRORFILE = $(OUTPUTDIR)/spellcheck-results.txt
|
||||||
|
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
@ -30,7 +31,6 @@ help:
|
|||||||
|
|
||||||
|
|
||||||
# Helper Targets
|
# Helper Targets
|
||||||
|
|
||||||
build-stage:
|
build-stage:
|
||||||
# Kopieren der DA-Quellen in das staging Verzeichnis
|
# Kopieren der DA-Quellen in das staging Verzeichnis
|
||||||
@echo "Source directory = $(SOURCEDIR)"
|
@echo "Source directory = $(SOURCEDIR)"
|
||||||
@ -70,9 +70,17 @@ compile-pdf:
|
|||||||
@rsync -az $(LOGFILE) $(SOURCEDIR)/
|
@rsync -az $(LOGFILE) $(SOURCEDIR)/
|
||||||
|
|
||||||
do-spellcheck:
|
do-spellcheck:
|
||||||
# Überprüft die staging Dateien auf Rechtschreibfehler
|
|
||||||
@pandoc "$(STAGINGDIR)"/*.md -t plain | hunspell -d de_AT,de_AT_frami,en_US -p ignore.dict -l -t | sort | uniq
|
|
||||||
|
|
||||||
|
@echo "Performing a spellcheck on all Markdown files"
|
||||||
|
|
||||||
|
# Überprüft die staging Dateien auf Rechtschreibfehler
|
||||||
|
@pandoc "$(STAGINGDIR)"/*.md -t plain | hunspell -d de_AT,de_AT_frami,en_US -p ignore.dict -l -t | sort | uniq > "$(SPELLERRORFILE)"
|
||||||
|
|
||||||
|
# Ausgabe der Rechtschreibfehler
|
||||||
|
@cat "$(SPELLERRORFILE)" | sed 's/^/ /'
|
||||||
|
|
||||||
|
# Spell resultate zuueckkopieren
|
||||||
|
@rsync -az $(SPELLERRORFILE) $(SOURCEDIR)/
|
||||||
|
|
||||||
remove-stage:
|
remove-stage:
|
||||||
#Remove the staging directory
|
#Remove the staging directory
|
||||||
@ -85,5 +93,9 @@ spellcheck: build-stage do-spellcheck remove-stage
|
|||||||
|
|
||||||
pdf: build-stage compile-pdf remove-stage
|
pdf: build-stage compile-pdf remove-stage
|
||||||
|
|
||||||
|
# Special Targets
|
||||||
.PHONY: help pdf clean
|
.PHONY: help pdf clean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3
example/.gitignore
vendored
3
example/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/*.pdf
|
/*.pdf
|
||||||
/*.log
|
/*.log
|
||||||
|
/spellcheck-result.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user