-
Notifications
You must be signed in to change notification settings - Fork 55
How to install the MMD Support Package mmd_merge.pl in Windows
In general, the scripts in bin
act as shortcuts to the binary with certain command-line options to emulate the behavior of the old convenience scripts. These shell scripts will run on Mac OS X or *nix. They run on Windows with the proper support files installed. Refer to the Syntax FAQ
How do I split a MultiMarkdown document into several parts? for general installation instructions. FAQ MMSplit
mmd_merge requires a Perl interpreter to function. If Perl has not yet been installed, the Perl package from ActiveState has given good service and is easy to install. Windows Perl
To install on Windows, download fletcher-MMD-Support-3.5-1-g1a80af5 from MMD-Support. The windows user places the script mmd_merge.pl in the MMD installation directory. If C:\Program\MultiMarkdown is the installation directory; place the fletcher-MMD-Support-3.5-1-g1a80af5\fletcher-MMD-Support-1a80af5\Utilities\mmd_merge.pl in this directory.
Build a simple suite to test the installation. Make it easy and for the test put all files in the same directory to avoid the typical path problems. After copying the binary to the directory the test installation looks something like this.
- Body1.md
- Body2.md
- index.md
- metadata.md
- mmd_merge.pl
Some simple file contents for the installation test follow at the end. Here is a brief functional description of the files. "index.md" is an index or list of the files to be merged. "metadata.md" is required and contains the metatags. Without this file the merge does not function. Metadata is necessary for a complete document, but it doesn't have to be in a separate file. It is up to the individual and the workflow. "Body1.md" and "Body2.md" would be the file contents to merge. Any mime type is suitable for the separate document file extensions. Refer to the FAQ How do I split a MultiMarkdown document into several parts? for further details.
- index.md
- metadata.md
- Body1.md
- Body2.md
Change the working directory to the install directory and use these commands (in a Perl console) to execute the script.
- cd C:\Program\MultiMarkdown
- Command for output to the console. -- perl mmd_merge.pl index.md
- Command for output to a file. -- perl mmd_merge.pl index.md > Combine.md
Following successful execution; files from other directories can be merged.
Copy the file contents to a file with the name given in the numbered line.
-
index.md:
# MMD index file metadata.md Body1.md Body2.md
-
metadata.md
Title: A Sample MultiMarkdown Document Author: Fletcher T. Penney Date: February 9, 2011 Comment: This is a comment intended to demonstrate metadata that spans multiple lines, yet is treated as a single value. Test: And this is a new key-value pair.
-
Body1.md:
# Header Body1 # This is the first simple paragraph of Body1. - It has a one-liner list. Body1 is complete.
-
Body2.md:
# Header Body2 # This is the first simple paragraph of Body2. - It has a one-liner list. Body2 is complete.
Offering support at MultiMarkdown Google Groups; questions about Perl and Windows can be sent to the list for discussion. But the author does not have resources to personally support those programs not distributed or written by him. Drop by the list to get some good information on methods using MultiMarkdown to facilitate your document generation and shorten workflow.