Re: Re-Proposing Package: Console_phpman instead of PHP_phpi
| From: | Anders Hellström | Date: | Sun, 04 May 2003 19:44:42 +0000 |
| Subject: | Re: Re-Proposing Package: Console_phpman instead of PHP_phpi | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15846@lists.php.net to get a copy of this message | ||
Hi,
+1, but please keep it as phpman.
- Anders
At 15.41 -0400 03-05-04, Greg Beaver wrote:
>Hi,
>
>+1 here.
>
>I would suggest calling it phpmanual, the extra 3 characters are clearer, and it will be less
>confusing to windows/mac users. I think that is clearet than phphelp as well. package name
>Console_phpmanual.
>
>Windows/mac users may confuse the "man" part with male, as if you were coding some
>kind of superhero in PHP :)
>
>Small suggestions:
>
>-change the VERSION constant to PHPMANUAL_VERSION to avoid any potential conflicts with other
>packages
>-use @var tags for class data members
>(http://www.phpdoc.org/docs/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.var.pkg)
>-both @param void and @return void are assumed, you can remove those from the source
>-the constructor name should be changed to Console_phpman[ual]()
>-try:
>@include PEAR_INSTALL_DIR.'/data/PHP_phpman/phpman_config.php';
>to avoid notices
>-Consider using the System package for your directory manipulation functions
>
>That's all.
>
>Greg
>
>Stefan Walk wrote:
>>Hi!
>>
>>Since there was the request of renaming the package and `Console_phpman'
>>closely resembles what this program is, namely a commandline version of
>>the php manual, i'm now re-proposing the package in the category
>>Console under the name Console_phpman.
>>
>>Here's a copy of the original eMail with
phpi' replaced with
>>phpman' -
>>the files at the website are updated too.
>>
>>Regards,
>>Stefan Walk
>> ---------------------------------------------------------------------
>>Some time ago, I asked if there was interest in a commandline version of
>>the PHP Manual, and there was. :) Now i've rewritten it and i think it
>>is ready to go into PEAR.
>>
>>phpman is handy when you are working in the console and want to look up
>>function syntax quickly - when i'm writing PHP in vim, i just do
>>:!phpman -f strpos
>>and don't have to open the browser to see if the haystack or the needle
>>is the first parameter ;)
>>
>>Output looks like this:
>>Function name: strpos
>>Description: Find position of first occurrence of a string
>>Syntax: int strpos(string haystack, string needle [, int
>> offset])
>>See also: strrpos, stripos, strrchr, substr, stristr, and strstr
>>
>>If the package Console_Color is available, you can choose to have the
>>output formatted in colors and bold, etc.
>>
>>The script reads the information it needs from the docbook XML files.
>>They are downloaded as a tarball, at the moment i've placed them at my
>>University, i hope they don't complain. ;)
>>
>>The files are either stored in a central place, if it is specified in
>>the configuration file, or in a directory ~/.phpman - you can have an own configuration file
>>in there, also.
>>
>>phpman has multi-language support, but the only language available at the moment is english
>>- a german language-file and manual tarball will
>>follow. I can pack other tarballs on request, but someone has to create
>>the language files for me. The format of the language file is trivial,
>>have a look at it :) If there are questions, send me a mail.
>>
>>You don't have to download and untar the files yourself, a simple phpman --update
>>should do the trick for you. There are two other classes
>>in the file, HTTP_Download and Console_ProgressBar. They enable phpman to keep you informed
>>of the status with a wget-style progress bar.
>>The Class HTTP_Download is neccessary to get the filesize of the remote file via the
>>Content_Length header without downloading the whole file in
>>one step, like HTTP_Request does, so that a callback - the update method of a progress bar,
>>for example - can be called for every chunk
>>that gets transferred.
>>Do you think those classes should be uncoupled from phpman and released as PEAR packages of
>>their own?
>>Source is at:
>> The script file - does nothing but instantiate the class and call its
>> main() function:
>> http://prp0.prp.physik.tu-darmstadt.de/~swalk/phpman.html
>> This file contains the classes: (it's quite large, 1330 lines)
>> O¶ñú
>> ÎHžn|™ãš®Œ�http://prp0.prp.physik.tu-darmstadt.de/~swalk/phpman_lib.html
>> This file is a sample config file:
>>
>> http://prp0.prp.physik.tu-darmstadt.de/~swalk/phpman_config.html
>> This is the base language file:
>>
>> http://prp0.prp.physik.tu-darmstadt.de/~swalk/language_base.dat
>>
>>I also packed a pear package for those who want to try it, it is at
>>
>> http://prp0.prp.physik.tu-darmstadt.de/~swalk/Console_phpman-0.1.tgz
>>
>>If nothing goes wrong, it should work simply by
>>pear install PHP_phpman-0.1.tgz
>>Then switch to the user you want to use phpman with (or edit the
>> configuration file in $data_dir/PHP_phpman) and do
>>phpman --update
>>You should see a progress bar while phpman is downloading the manual
>> tarball, then it will tell you that it is uncompressing it... if you
>> see a 'OK', phpman should work. phpman --usage should give you a short
>> usage description. phpman --help is in work :)
>>
>>So, what are your thoughts on it?
>>
>>Regards,
>>Stefan Walk
>>