Open main menu

Gramps β

Changes

Manual Generation 5.1

1,100 bytes added, 26 February
Templates
{{man note|Manual Generation for Gramps 5.1.x and newer}}
The Gramps 5.1 offline PDF manual was created for various Language using various unix commandsand process described here.
It has these main stages:
* collating the chapters of the User Manual to local files
* cleaning the MediaWiki markdown and linking to a format appropriate to a single file
* converting the MediaWiki markdown HTML file to a PDF with internal links
== Preparing for consolidated manual creation ==
All of the pages must be compliant with the following restrictions
== Tools needed ==
To use the templates provided, your system must have the following Unix programs:* [https://man.freebsd.org/cgi/man.cgi?query=sed&sektion=1&format=html sed(1), ]* [https://man.freebsd.org/cgi/man.cgi?make(1), and make(1)]* [https://man.freebsd.org/cgi/man.cgi?query=curl curl(1) programs. ]The BSD version was used in the templates.  The command curl(1) is used to download the existing wiki page in HTML format. Then the scripts (sed commands) modify and assemble into a consolidated HTML file. The program [https://wkhtmltopdf.org/ wkhtmltopdf] (available on github) is used to convert the HTML to PDF.
== Download language-specific wiki pages ==
== Templates ==
A template for creating en, he, nl, and ru PDF manuals is provided [[File:UserManual51.zip]] . A template for version 5.2 is available for testing [[File:UserManual52.zip]] . The 5.2 version creates 6 manuals (en, he, nl, ru, fr, de). This version is backward compatible to 5.1 (See README for how to run the 5.2 scripts to generate the 5.1 PDF files). Copy a language template that is similar as a starting point. The template contains many files that will need customized. The he version uses wiki names that have a suffix of the language. The nl version translates each page name and is redirected from the wiki name that has a suffix.
* Makefile - rules for generating the PDF
* Update TOCFOOTOPT to translate '''''Published'''''
* Update SRCS to be the list of page names (not redirects). These should NOT have the language suffix on them.
* Update FILEPRE with the prefix name for all of the wiki pages. Needed if page namess names have been translated
* Update TARGETS to use the language suffix.
* Update target rules for language suffix.
== Update scripts ==
The scripts are the commands to the unix command [https://www.gnu.org/software/sed(1)/manual/sed.html#Introduction sed]. The templates all use the BSD version of sed, which is the most restrictive. gnu sed may require a slightly different syntax. The sed commands are processed in order.
* L.script - this file edits all chapter pages
** Put a page break at the top of each chapter
** Remove the bottom navigation table. This is optional
** Remove the bottom Language table
** Truncate the h1 heading to make the PDF footer and ToC (Table of Contents) easier to read
* main.script - this file edits the main wiki page
** Change the internal and external links to have a consistent name for the consolidated file
== Test ==
Run 'make' to create the chapter HTML files, consolidate and convert to PDF. This is an iterative process to find errors and fix. 'make clobber' will remove all created files for retrying.
 
==See also==
* [[User_manual_translations#Gramps_5.1.x_Manual|User Manual Translations]] list
* [[User manual]]
* [[Rollover for the manual]]
* [[Manual Generation]]
* [[Manual Generation 3.0]]
* [[Manual Generation 3.0 Prince]]
[[Category:Documentation]]
[[Category:Translators/Categories|*]]
166
edits