============================================================================= FILE: README-patch.txt SUMMARY: This file is a step-by-step guide explaining how to produce a snapshot of the Clementine Vulgate project text as it stood on any given date. AUTHOR: little.mouth@soon.com LAST UPDATED: 7/6/06 ============================================================================= 0. NOTE ON OPERATING SYSTEMS Everything used in this guide works on Windows, Linux, and the Mac. For things that are platform-specific but trivial to adapt, I've used Windows syntax, trusting Linux users to have the wherewithal to make the necessary changes. If you're a Mac user, then you already know best, or think you do, which comes to the same thing. If you're a Windows user unfamiliar with command line tools, this guide may look horrifying, but really it's just a matter of mechanically following the steps listed. If anything is unclear, or if something doesn't work, email me (little.mouth@soon.com) and I'll be happy to help. 0': SPECIAL NOTE FOR USERS OF LINUX/MAC OS X/OTHER *NIX The line-endings in the diff files will probably cause problems. To compensate, you should run the following command on every .diff file you download: sed -r -i -e 's/^(\+\+|--|@@)(.*)\r$/\1\2/' DDMMYY.diff You will probably need a non-ancient version of GNU sed for this to work. Or instead, you can run the fixdiffs.sh script from the top-level clemtext/ directory (you may need to chmod 700 it first). E.g. if you're in the source/ directory, you can do something like ../fixdiffs.sh latest.diff 1. INSTALL ESSENTIAL TOOLS The GNU Patch program is required. This is free software. It will already be present on most Linux installations; for Windows users, it is available as part of the GnuWin32 collection. I have prepared a zip file containing Windows versions of Patch, as well as Sed and md5sum (see below), which you can download from . You should extract these programs. In Windows XP, right-click on the downloaded file -> Extract All... -> Next -> type C:\ when asked to select a folder -> Next -> Finish. Note: The source to the Windows tools is available at , but you are advised to get the latest version from . 2. [OPTIONAL] INSTALL ADDITIONAL TOOLS If you want to create an HTML version of the text, you must install the free program Perl . If you want to create a PDF version of the text, you must also install the free program LaTeX . (Linux users: you will also need the following packages: babel, geometry, titlesec, fancyhdr, graphicx, lettrine, mathpazo, needspace. These are all available from CTAN .) 3. DOWNLOAD THE LATEST SOURCE TEXT AND SCRIPTS Next, download and unzip it, as in step 1. Make sure you extract it to the same folder as the tools from step 1. Now open a command prompt (Start Menu -> Programs -> Accessories -> Command Prompt), and type: path c:\clemtext\bin;%path% cd c:\clemtext\source (If you extracted the files to a folder other than c:\ in steps 1 and 3, you should use that as the prefix to clemtext in both of these lines.) Keep the command prompt open. 4. CONVERT THE LATEST TEXT BACK TO THE QUASIMODO TEXT The Quasimodo text is the first released text; all subsequent texts are derived from this one. To get back from the latest text to the Quasimodo text, type the following at the command prompt: patch -R < latest.diff 5. DOWNLOAD THE PATCH FOR THE VERSION OF THE TEXT YOU WISH TO RECREATE You can see all the different versions of the text that have been released at . Each version is named after the date of its release, as ddmmyy.diff, where dd/mm/yy is the release date. Download the version(s) that you want to recreate, and unzip them exactly as in step 1, to the same directory. I'll assume as an example that we're interested in the 05/05/05 text. 6. APPLY THE PATCH Run patch from the source directory. At the command prompt: patch < 050505.diff The files in the source directory are replaced by those from the given date. If you later want to produce another version of the text, you should first unapply the current patch to return to the Quasimodo text: patch -R < 050505.diff and then continue from step 5. You can always check the current version of the text, and how to get back to the Quasimodo text, by reading restore.txt in the source directory. 7. [OPTIONAL] VERIFY THE INTEGRITY OF THE TEXT Go to and download the md5 checksums for the version of the text you've just created: the file will be called ddmmyy.md5, where dd/mm/yy is the date of the text. We'll stick with 05/05/05 as an example. Download it to c:\clemtext\source, or wherever you've put everything else. Now, back at the command prompt, type md5sum -c 050505.md5 and check that everything's ok. 8. [OPTIONAL] CONVERT THE TEXT TO OTHER FORMATS You need additional tools for this (see step 2). To convert the source files to HTML: cd .. perl makehtml.pl cd source The HTML files appear in the html directory in clemtext. To convert the source files to PDF: cd .. perl makelatex.pl makepdf-vulgate makepdf-twocolumn cd source The PDF files appear in the latex directory in clemtext. (Note: under Linux, you should do chmod 700 *.bat, then ./makepdf-vulgate.bat and ./makepdf-twocolumn.bat instead of makepdf-vulgate and makepdf-twocolumn.) 9. CHANGELOG FOR THIS DOCUMENT 03/04/05 - initial version 07/06/06 - add section 0' giving instructions for fixing up line endings for the diff files on *nix.