From 868e9fa6c80467da25753671b3a173aed3d9010f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 22 May 2025 15:21:34 -0400 Subject: [PATCH] manual: Convert cover SVG to a template file We generate the previous SVG by doing sed substitutions to insert the front cover and spine titles, plus the rear cover text. A follow-up commit will generate the French and Spanish covers as well. --- manual/Makefile | 10 +++++-- manual/cover/cover-en.sed | 13 +++++++++ manual/cover/{cover.svg => template.svg} | 37 ++++-------------------- 3 files changed, 25 insertions(+), 35 deletions(-) create mode 100644 manual/cover/cover-en.sed rename manual/cover/{cover.svg => template.svg} (97%) diff --git a/manual/Makefile b/manual/Makefile index b8e6eab0..75561fbb 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -11,7 +11,8 @@ ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5 MANUAL_ADOC_FILES=$(wildcard freedoom-manual-??.adoc) MANUAL_PDF_FILES=$(subst .adoc,.pdf,$(MANUAL_ADOC_FILES)) -COVER_PDF_FILES=cover.pdf +COVER_PDF_FILES=cover-en.pdf +COVER_SVG_FILES=$(patsubst %.pdf,cover/%.svg,$(COVER_PDF_FILES)) all: $(MANUAL_PDF_FILES) @@ -24,8 +25,11 @@ covers: $(COVER_PDF_FILES) freedoom-manual-%.pdf: freedoom-manual-%.adoc -asciidoctor-pdf $(ASCIIDOCTOR_FLAGS) $< -o $@ -cover.pdf: cover/cover.svg cover/serpentipede.png cover/minigunner.png +cover/cover-%.svg: cover/cover-%.sed cover/template.svg + sed -f $< < cover/template.svg > $@ + +cover-%.pdf: cover/cover-%.svg cover/serpentipede.png cover/minigunner.png inkscape -o $@ $< clean: - $(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES) + $(RM) $(MANUAL_PDF_FILES) $(COVER_PDF_FILES) $(COVER_SVG_FILES) diff --git a/manual/cover/cover-en.sed b/manual/cover/cover-en.sed new file mode 100644 index 00000000..3848d800 --- /dev/null +++ b/manual/cover/cover-en.sed @@ -0,0 +1,13 @@ +s/__BACK_TEXT__/\ +Freedoom is an open-content First-Person\ +Shooter (FPS) game that is Free and Open\ +Source Software. Developed by volunteers\ +since 2001, Freedoom is made available\ +under the 3-clause BSD license.\ +\ +This manual gives a wealth of information,\ +including how to play the game, strategy,\ +tips and tricks and more./ + +s/__FRONT_TITLE__/Game Manual/ +s/__SPINE_TITLE__/Freedoom Manual/ diff --git a/manual/cover/cover.svg b/manual/cover/template.svg similarity index 97% rename from manual/cover/cover.svg rename to manual/cover/template.svg index 98a0fe25..0681d084 100644 --- a/manual/cover/cover.svg +++ b/manual/cover/template.svg @@ -7,7 +7,7 @@ width="1157.12" height="817.91998" viewBox="0 0 1157.12 817.91998" - sodipodi:docname="cover.svg" + sodipodi:docname="template.svg" xml:space="preserve" inkscape:version="1.4 (e7c3feb100, 2024-10-09)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -141,7 +141,7 @@ sodipodi:role="line" id="tspan1" x="343.88354" - y="-573.65881">Freedoom Manual__SPINE_TITLE__Freedoom is an open-content First-Person Shooter (FPS) game that is Free and Open Source Software. Developed by volunteers since 2001, Freedoom is made available under the 3-clause BSD license. - -This manual gives a wealth of information, including how to play the game, strategy, tips and tricks and more. -__BACK_TEXT__Game Manual + y="479.11536">__FRONT_TITLE__