HistView Api Doc | |
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Processing a history file and prepare it for HTML output
Constructor Summary | |
void | histview(string $infile, [string $basename]) Create an instance and read the input file into the internal array |
Method Summary | |
boolean | add_mark(string $name, string $symbol, string $icon) Add another mark to the set |
private string | getdlurl(string $type) Check whether there is a file to download - and create URL if any |
string | out() Generate the output page content |
private boolean | pline(string $line) Process a single line from the input file |
boolean | process() Process the input file |
void | set_basedir(string $type, string $dir) Override base URLs for archives. |
boolean | set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm]) Override default icon settings icons can either be a character/string or a complete IMG tag |
boolean | set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver]) Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug |
void | set_max_relnum(integer $relnum) Set the maximum release number To take our example from set_basedir again (dummy-0. |
void | set_relname(string $relname) Set the release extension for *. |
Constructor Detail |
void histview(string $infile, [string $basename])
Create an instance and read the input file into the internal array
infile
- input file namebasename
- basename for files (e.g. "histview" for histview-0.1.3-izzy1.noarch.rpm)Method Detail |
boolean add_mark(string $name, string $symbol, string $icon)
Add another mark to the set
name
- unique name for the marksymbol
- one character like '!' for a bugicon
- complete image tag or string to display instead of the symbolprivate string getdlurl(string $type)
Check whether there is a file to download - and create URL if any
type
- Type (one of tar, deb, rpm)string out()
Generate the output page content
private boolean pline(string $line)
Process a single line from the input file
line
- the input line to parseboolean process()
Process the input file
void set_basedir(string $type, string $dir)
Override base URLs for archives. With $type='base' set the string to cut of to leave the download URL. Example: Your files are somewhere below /var/www/files/download, and your servers document root is /var/www, so you would specify "/var/www" here. If your files reside outside the servers document root, say below /var/ftp/download, you should create a directory alias called "/ftp/" pointing to /var/ftp, and specify "/var" here.
type
- tar, deb, rpm or basedir
- the directory for this typeboolean set_icon([string $plus], [string $minus], [string $change], [string $bug], [string $tar], [string $deb], [string $rpm])
Override default icon settings icons can either be a character/string or a complete IMG tag
plus
- FeatureAdd Iconminus
- Removed stuff Iconchange
- Changed stuff Iconbug
- BugFix Icontar
- Tarball Icondeb
- Debian Iconrpm
- RPM Iconboolean set_mark([string $plus], [string $minus], [string $change], [string $bug], [string $ver])
Override default identifier mark settings Identifier marks are the characters used to identify the changes, such as a "+" for a new feature or a "!" for a bug
plus
- FeatureAdd markminus
- Removed stuff markchange
- Changed stuff markbug
- BugFix markver
- Version markvoid set_max_relnum(integer $relnum)
Set the maximum release number To take our example from set_basedir again (dummy-0.1.2-johnny3.noarch.rpm), the relnum of that package is "3" (the number immediately following the release extension). To find the latest package, histview would "replace" this part by $i, counting down from max_relnum to 0 until it finds a file.
relnum
- max release number to check forvoid set_relname(string $relname)
Set the release extension for *.deb/*.rpm For the fictive package dummy-0.1.2-johnny3.noarch.rpm this would be "johnny"
relname
- extension to useHistView Api Doc | |
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This document was generated by phpdocgen 0.16.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)