casile 0.14.4

The command line interface to the CaSILE toolkit, a book publishing workflow employing SILE and other wizardry
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
deepl/%.md: $(BUILDDIR)/deepl/%.docx
	mkdir -p $(@D)
	$(PANDOC) \
		$(PANDOCARGS) \
		$(PANDOCFILTERS) $(PANDOCFILTERARGS) \
		$^ -o $@

targetlang = $(notdir $(abspath $(dir $1)))
deepldeps = $(call pattern_list,$(shell $(_ENV) list_related_files.zsh srcid $(basename $(notdir $1))),.docx -manifest.yml)

$(BUILDDIR)/deepl/%.docx: $$(call deepldeps,$$@)
	$(YQ) -r '.lang' $(filter %-manifest.yml,$^) | read srclang
	$(DEEPL) document --from "$${srclang}" --to "$(call targetlang,$@)" $< $(@D)
	mv $(@D)/$< $@ ||: