views:

190

answers:

1

How can you solve the following error messages given by PHPdoc?

I run madedoc.sh by the following command

Command

sudo ./makedoc.sh

I get

Error messages

PHP Version 5.2.6-3ubuntu4.2
phpDocumentor version 1.4.2

Parsing configuration file phpDocumentor.ini...
   (found in /usr/share/php/data/PhpDocumentor/)...

done
Maximum memory usage set at 256M after considering php.ini...
using tokenizer Parser

        ERROR: Converter PDFSmartyConverter specified by --output command-line option is not a class

        ERROR: No Converters have been specified by --output command-line option

        ERROR: No Converters have been specified by --output command-line option

Example of comments what I am trying to generate

/** Create HTML for tags
 * @param string @tags
 */
function create_tags_at_question ( $tags ) {
    echo ("<label for='tags'>Tags</label>"
        . "<input name='question[tags]' type='text' cols='92' class='tags' id='required'"
        . " value='" . $tags . "' />"
    );
}

My makedoc.sh for PHPdoc

#!/bin/bash
#/**
#  * title of generated documentation, default is 'Generated Documentation'
#  *
#  * @var               string TITLE
#  */
TITLE="komponentit"

#/**
#  * name to use for the default package. If not specified, uses 'default'
#  *
#  * @var               string PACKAGES
#  */
PACKAGES="default"

#/**
#  * name of a directory(s) to parse directory1,directory2
#  * $PWD is the directory where makedoc.sh
#  *
#  * @var               string PATH_PROJECT
#  */
PATH_PROJECT=$PWD:$PWD/handlers/:$PWD/handlers/searches/

#/**
#  * path of PHPDoc executable
#  *
#  * @var               string PATH_PHPDOC
#  */
PATH_PHPDOC=/usr/bin/phpdoc

#/**
#  * where documentation will be put
#  *
#  * @var               string PATH_DOCS
#  */
PATH_DOCS=$PWD/docs/

#/**
#  * what outputformat to use (html/pdf)
#  *
#  * @var               string OUTPUTFORMAT
#  */
OUTPUTFORMAT=pdf

#/**
#  * converter to be used
#  *
#  * @var               string CONVERTER
#  */
CONVERTER=Smarty

#/**
#  * template to use
#  *
#  * @var               string TEMPLATE
#  */
TEMPLATE=default

#/**
#  * parse elements marked as private
#  *
#  * @var               bool (on/off)           PRIVATE
#  */
PRIVATE=off

# make documentation
"$PATH_PHPDOC" -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
+2  A: 

Bear with me ... I don't know PHPdoc, so I'm guessing a little here, until the cavalry arrives.

Something about

"$PATH_PHPDOC" -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE

makes tokenizer Parser unhappy. Something in the syntax is not right.

All three errors relate to this line of makedoc.sh

  • --output is probably the long form of the -o you used in makedoc.sh
  • PdfSmartConverter in the first error seems to be made of several of the variables in makedoc.sh run together. Do you need spaces or some other delimiter?
  • do you need more ""
  • is 'pdf' enough of an outputformat specifier

As I said, I'm just guessing - but maybe it'll give you some ideas.

Now ... where is that cavalry?

pavium
The file is based on the official template file in the installer of PHPdoc. Your code is exactly the same in the installer. I did not change it. - **What do you mean by delimeter in this case?** - I apparently do not need more the character ". - PDF is allowed to be the outputformat according to the file.
Masi
I was thinking of the : between $OUTPUTFORMAT and $CONVERTER and $TEMPLATE. Oh well, I was just guessing, as I said, and I hoped that something in my answer would cause you to say 'Aha!' But you know PHPdoc better than I ever will. I hope someone comes up with the right answer soon.
pavium