Application examples ~~~~~~~~~~~~~~~~~~~~ These applications will be made to showcase the functionality in the components. They are not meant to be feature rich but rather show how to quickly setup working applications using only the components and builtin PHP functionality. ------------ Archiver ======== This application is capable of creating / listing / extracting differnet archive formats. SYNOPSIS -------- Synopsis: :: archiver [-h] [-l] [-e] [-c] [-d ] [-i ] [-a] [[--] ] Options ------- ============== ====================================================== -h/--help Get help information. -l/--list List contents of an archive. -e/--extract Extract all files from an archive. -c/--create Create a new archive from a directory. -d/--directory Directory to perform option on (default is <./>). -i/--ignore Ignore paths matching a PCRE from any action (multiple possible). -a/--all-info No help available. ============== ====================================================== Components ---------- 1. ConsoleTools::ezcConsoleInput for managing options and arguments. 2. ConsoleTools::ezcConsoleTable for generating tables. 3. ConsoleTools::ezcConsoleOutput for printing colors. 4. ConsoleArchive::* for accessing the archives. Status ------ - First version implementd (TS). ------------ Lister ====== This application lists directories in similar fashion to the 'ls' program. SYNOPSIS -------- :: list [OPTION]... [FILE]... List information about the FILEs (the current directory by default). Options ------- =============== ====================================================== -a, --all Do not hide entries starting with . --color=WHEN Control whether color is used to distinguish file types. WHEN may be never, always, or auto -d, --directory List directory entries instead of contents, and do not dereference symbolic links -l Use a long listing format =============== ====================================================== Components ---------- 1. ConsoleTools::ezcConsoleParameter is used to read in parameters. 2. ConsoleTools::ezcConsoleOutut is used to output the directory formats using color highlighting for files and dirs. ------------ Web downloader ============== This application downloads HTML pages and binary files from Web pages using HTTP. SYNOPSIS -------- :: webget [OPTION]... [URL]... Downloads all HTML or binary file specified by URLs to the local filesystem. Options ------- =================== ====================================================== --http-user=USER connect to server with user USER --http-password=PWD connect to server with password PWD =================== ====================================================== Components ---------- 1. ConsoleTools::ezcConsoleParameter is used to read in parameters. 2. ConsoleTools::ezcConsoleProgressBar is used to output the current download progress. ------------ SQL frontend ============ This application executes SQL queries to the connected database. It is interactive and reads each query from the input line. It supports any database type that the DB backend supports however the entered SQLs are passed directly to the database server. SYNOPSIS -------- :: sqlf [OPTION]... [DSN | DATABASE] Connects to the given database using a DSN or multiple OPTIONs and the DATABASE. Options ------- ======================== ====================================================== -u USER, --user=USER Connect to database with user USER -p PWD, --password=PWD Connect to database with password PWD -h HOST, --host=HOST Connect to database on server HOST, default is localhost. -S SOCK, --socket=SOCKET Connect to database using socket SOCK, this only works for some database servers. Socket connection is the default for some database when HOST is localhost. -P PORT, --port=PORT Connect to database port PORT, if this is used any SOCK values will be ignored ======================== ====================================================== Note: This application will require readline support in PHP. Components ---------- 1. ConsoleTools::ezcConsoleParameter is used to read in parameters. 2. ConsoleTools::ezcConsoleTable is used to format the result of the executed SQLs. 3. Database::ezcDatabase is used to connect to the given database and execute the SQLs. .. Local Variables: mode: rst fill-column: 79 End: vim: et syn=rst tw=79