Re: Re-Proposing Package: Console_phpman instead of PHP_phpi

From: Date: Sun, 04 May 2003 18:01:05 +0000
Subject: Re: Re-Proposing Package: Console_phpman instead of PHP_phpi
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15843@lists.php.net to get a copy of this message
Still +1 for me. -- Regards. M.CHAILLAN Nicolas nicos@php.net www.WorldAKT.com Hébergement de sites internets. "Stefan Walk" <post@fuer-et.de> a écrit dans le message news: 20030504151718.GB31468@prp0.prp.physik.tu-darmstadt.de... > 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) > 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 > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > --h44FEIh9031732.1052061258/prp0.prp.physik.tu-darmstadt.de-- >

« previous php.pear.dev (#15843) next »