In the process of generating a massive import for the upcoming Pdpedia, we are using wiki_import-1.1. After making sure the mediawiki maintenance scripts worked, and making sure that the Entropy PHP5 install was being found correctly by all the scripts, there was still one other thing that was preventing the script from working. This was the result each time:

hans@pow.idmi.poly.edu:wiki_import-1.1 # ./wiki_import.sh –sect “Top level”
Mandatory option –sect is not set.
Not all mandatory options are set.
wiki_import.sh $ $Revision: 1.1 $

mediawiki automatic file import script

Usage: wiki_import.sh [OPTIONS]…

The script is designed to import a whole folder of files into mediawiki, with
the folder directory tree mapped as wiki category hierarchy.

The specification of the file-to-import is passed from standard input.

Options:
-s, –sect=n the root category section of the wiki
of the imported article (mandatory)
-1, –header include standard header (category hierarchy path & notice)
-l, –link link to actual file on the web site

snip…

This is the key part:

hans@pow.idmi.poly.edu:wiki_import-1.1 # ./wiki_import.sh –sect “Top level”
Mandatory option –sect is not set.
Not all mandatory options are set.

As you can see, the –sect object is definitely being set. It turns out that Mac OS X’s getopt has different syntax than GNU getopt, and wiki_import-1.1 expects GNU getopt. So I installed GNU getopt using Fink, and all is well.

fink install getoptbin