Passage au format native pour la validation
This commit is contained in:
parent
91a10dfd48
commit
911ede376f
|
@ -1,16 +1,19 @@
|
||||||
INPUT_DATA_DIR = ../Tests-Data
|
INPUT_DATA_DIR = ../Tests-Data
|
||||||
CHANGELOG = ../CHANGELOG.md
|
CHANGELOG = ../CHANGELOG.md
|
||||||
BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json
|
BIBLIO_FILE = $(INPUT_DATA_DIR)/BIBLIO_CSL-Tests.json
|
||||||
|
CSL_FILE_SUFFIX = .csl
|
||||||
INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md
|
INPUT_FILE = $(INPUT_DATA_DIR)/CSL-Tests.md
|
||||||
STYLESHEETS_DIR = ..
|
STYLESHEETS_DIR = ..
|
||||||
VALIDATION_FILE_SUFFIX = _CSL-Validation.html
|
VALIDATION_FILE_SUFFIX = _CSL-Validation.native
|
||||||
OUTPUT_FILE_SUFFIX = _CSL-Tests.html
|
OUTPUT_FILE_SUFFIX = _CSL-Tests.native
|
||||||
CSL_FILE_SUFFIX = .csl
|
VISUALISATION_FILE_SUFFIX = .html
|
||||||
|
VISUALISATION_PREFIX = PROV_
|
||||||
|
HTML-VIEWER = palemoon
|
||||||
ifdef JOURNAL
|
ifdef JOURNAL
|
||||||
THIS_STYLE_DIR = $(STYLESHEETS_DIR)/$(JOURNAL)
|
THIS_STYLE_DIR = $(STYLESHEETS_DIR)/$(JOURNAL)
|
||||||
DOC_DIR = $(THIS_STYLE_DIR)
|
DOC_DIR = $(THIS_STYLE_DIR)
|
||||||
DOC_FILE = $(DOC_DIR)/GUIDE_$(JOURNAL)
|
DOC_FILE = $(DOC_DIR)/GUIDE_$(JOURNAL)
|
||||||
VALIDATION_PROV_FILE = $(PROV_PREFIX)$(JOURNAL)$(VALIDATION_FILE_SUFFIX)
|
VISUALISATION_FILE = $(VISUALISATION_PREFIX)$(JOURNAL)$(VISUALISATION_FILE_SUFFIX)
|
||||||
CSL_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(CSL_FILE_SUFFIX)
|
CSL_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(CSL_FILE_SUFFIX)
|
||||||
VALIDATION_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(VALIDATION_FILE_SUFFIX)
|
VALIDATION_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(VALIDATION_FILE_SUFFIX)
|
||||||
OUTPUT_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(OUTPUT_FILE_SUFFIX)
|
OUTPUT_FILE = $(THIS_STYLE_DIR)/$(JOURNAL)$(OUTPUT_FILE_SUFFIX)
|
||||||
|
@ -22,7 +25,7 @@ else
|
||||||
DOC_DIR = ../Documentation
|
DOC_DIR = ../Documentation
|
||||||
DOC_FILE = $(DOC_DIR)/GUIDE_CSL-Clio
|
DOC_FILE = $(DOC_DIR)/GUIDE_CSL-Clio
|
||||||
endif
|
endif
|
||||||
PANDOC_OPTIONS = -s \
|
PANDOC_OPTIONS = \
|
||||||
$(FILTERS_LIST_FIRST) \
|
$(FILTERS_LIST_FIRST) \
|
||||||
-C \
|
-C \
|
||||||
--bibliography=$(BIBLIO_FILE) \
|
--bibliography=$(BIBLIO_FILE) \
|
||||||
|
@ -30,22 +33,14 @@ PANDOC_OPTIONS = -s \
|
||||||
-M lang=fr \
|
-M lang=fr \
|
||||||
--wrap=none \
|
--wrap=none \
|
||||||
$(FILTERS_LIST_LAST)
|
$(FILTERS_LIST_LAST)
|
||||||
PROV_PREFIX = PROV_
|
COMMON_DOC_OPTIONS= -s \
|
||||||
HTML-VIEWER = palemoon
|
|
||||||
COMMON_DOC_OPTIONS=-s \
|
|
||||||
--filter pandoc-crossref \
|
--filter pandoc-crossref \
|
||||||
-L license-dans-metadonnees.lua \
|
-L license-dans-metadonnees.lua \
|
||||||
-L changelog-dans-annexes.lua \
|
-L changelog-dans-annexes.lua \
|
||||||
$(DOC_FILE).md \
|
$(DOC_FILE).md \
|
||||||
--resource-path=.:$(DOC_DIR)
|
--resource-path=.:$(DOC_DIR)
|
||||||
|
|
||||||
test : $(CSL_FILE) \
|
test: $(VALIDATION_FILE) $(OUTPUT_FILE)
|
||||||
$(VALIDATION_FILE) \
|
|
||||||
$(BIBLIO_FILE) \
|
|
||||||
$(INPUT_FILE)
|
|
||||||
pandoc $(PANDOC_OPTIONS) \
|
|
||||||
$(INPUT_FILE) \
|
|
||||||
-o $(OUTPUT_FILE)
|
|
||||||
echo "Résultat de la comparaison"
|
echo "Résultat de la comparaison"
|
||||||
echo "============="
|
echo "============="
|
||||||
diff -s -C 0 \
|
diff -s -C 0 \
|
||||||
|
@ -53,17 +48,22 @@ test : $(CSL_FILE) \
|
||||||
$(VALIDATION_FILE)
|
$(VALIDATION_FILE)
|
||||||
echo "============="
|
echo "============="
|
||||||
|
|
||||||
test-compact: test
|
test-compact: $(VALIDATION_FILE) $(OUTPUT_FILE)
|
||||||
dwdiff -3 $(OUTPUT_FILE) $(VALIDATION_FILE) | sort | uniq
|
dwdiff -3 $(OUTPUT_FILE) $(VALIDATION_FILE) | sort | uniq
|
||||||
|
|
||||||
|
$(OUTPUT_FILE): $(CSL_FILE) $(BIBLIO_FILE)
|
||||||
validation-prov: $(VALIDATION_PROV_FILE)
|
|
||||||
$(HTML-VIEWER) $(VALIDATION_PROV_FILE)
|
|
||||||
|
|
||||||
$(VALIDATION_PROV_FILE): $(BIBLIO_FILE) $(CSL_FILE) $(INPUT_FILE)
|
|
||||||
pandoc $(PANDOC_OPTIONS) \
|
pandoc $(PANDOC_OPTIONS) \
|
||||||
$(INPUT_FILE) \
|
$(INPUT_FILE) \
|
||||||
-o $(VALIDATION_PROV_FILE)
|
-t native \
|
||||||
|
-o $(OUTPUT_FILE)
|
||||||
|
|
||||||
|
visualisation: $(VISUALISATION_FILE)
|
||||||
|
$(HTML-VIEWER) $(VISUALISATION_FILE)
|
||||||
|
|
||||||
|
$(VISUALISATION_FILE): $(BIBLIO_FILE) $(CSL_FILE) $(INPUT_FILE)
|
||||||
|
pandoc -s $(PANDOC_OPTIONS) \
|
||||||
|
$(INPUT_FILE) \
|
||||||
|
-o $(VISUALISATION_FILE)
|
||||||
|
|
||||||
validation-docx: $(VALIDATION_DOCX_FILE)
|
validation-docx: $(VALIDATION_DOCX_FILE)
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ $(VALIDATION_DOCX_FILE): $(BIBLIO_FILE) $(CSL_FILE) $(INPUT_FILE)
|
||||||
$(INPUT_FILE): $(BIBLIO_FILE)
|
$(INPUT_FILE): $(BIBLIO_FILE)
|
||||||
./generer-md-pour-citeproc.sh $(BIBLIO_FILE) $(INPUT_FILE)
|
./generer-md-pour-citeproc.sh $(BIBLIO_FILE) $(INPUT_FILE)
|
||||||
|
|
||||||
install: $(VALIDATION_PROV_FILE)
|
install: $(OUTPUT_FILE)
|
||||||
mv $(VALIDATION_PROV_FILE) $(VALIDATION_FILE)
|
mv $(OUTPUT_FILE) $(VALIDATION_FILE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(STYLESHEETS_DIR)/*/*$(OUTPUT_FILE_SUFFIX)
|
rm $(STYLESHEETS_DIR)/*/*$(OUTPUT_FILE_SUFFIX)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user