Generalize file/line fetching for QC report

parent a832af8f
......@@ -115,12 +115,21 @@ reports/progress.md: $(CCMTOOLKITDIR)/languages.yml repository-lastcommit.ts
echo date: $(shell LANG=$(LANGUAGE) date)
echo ---
reports/qc.md: book_bbh/en/bbh.md book_bbh/tr/bbh.md
awk "NR==154" $(word 1,$^) | read en
awk "NR==154" $(word 2,$^) | read tr
QCBOOK=bbh
QCLINE=154
reports/qc.md: book_$(QCBOOK)/en/$(QCBOOK).md book_$(QCBOOK)/tr/$(QCBOOK).md force
awk "NR==$(QCLINE)" $(word 1,$^) | read en
awk "NR==$(QCLINE)" $(word 2,$^) | read tr
sep="\hfill{}"
scale=" \n\n (kabul edilmez)$${sep}0$${sep}1$${sep}2$${sep}3$${sep}4$${sep}5$${sep}6$${sep}7$${sep}8$${sep}9$${sep}10$${sep}(olağanüstü)"
{
echo ---
echo header-includes:
echo -E ' - \setlength\LTleft{0pt}'
echo -E ' - \setlength\LTright{0pt}'
echo -E ' - \setlength\parindent{0pt}'
echo ---
for author in "Toğrul Salamzade"; do
echo "# Kalite Kontrol Formu"
echo
......@@ -137,9 +146,9 @@ reports/qc.md: book_bbh/en/bbh.md book_bbh/tr/bbh.md
echo ": $(call versioninfo)"
echo
echo "Örnek kaynağı:"
echo ": Satır 154; $^"
echo ": Satır $(QCLINE); $^"
echo
echo "|[Çeviri](https://gitlab.alerque.com/ccm/book_bbh/blob/master/tr/bbh.md#L154)|[Orijinal](https://gitlab.alerque.com/ccm/book_bbh/blob/master/en/bbh.md#L154)|"
echo "|[Çeviri](https://gitlab.alerque.com/ccm/book_bbh/blob/master/tr/bbh.md#L$(QCLINE))|[Orijinal](https://gitlab.alerque.com/ccm/book_bbh/blob/master/en/bbh.md#L$(QCLINE))|"
echo "|:-|:-|"
echo "|$${tr}|$${en}|"
echo
......@@ -158,6 +167,4 @@ reports/qc.md: book_bbh/en/bbh.md book_bbh/tr/bbh.md
echo "...\hrulefill{}\n\n"
echo "...\hrulefill{}."
done
} |
$(PANDOC) $(PANDOCARGS) -o $@
cat $@
} | $(PANDOC) $(PANDOCARGS) -o $@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment