Location: PHPKode > projects > Libretto: Web download manager > libretto/content/help.php
<?
/*
 * Libretto - Web download manager.
 * Copyright (C) 2007 Jordi Pujol (jordi_pujolATtelefonicaDOTnet).
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 * Place, Suite 330, Boston, MA 02111-1307 USA
 */

?>

<H1><?echo t('help'); ?></H1>
<H2>Download Status</H2>
<P>Shows a list of download jobs for the active user.<br>
	We watch the disk space usage grafically, with a progress bar for the download directory
	and another progress bar for the temporary directory.<br>
	<b>Download Status</b> lists the jobs status, started, in process, the progress percentage,
	if successfully finished, speed of download and upload, number of bytes downloaded and uploaded, seeds, ...<br>
	The user manages the jobs with buttons representing graphically the actions to do
	with icons. We can stop, resume or cancel a download job.<br>
	Description of that buttons is following:<br>
	<ul>
	<li>Information.
	<li>Open.
		<ul>
		<li>Get to Local.
		<li>Delete files.
		</ul>
	<li>Stop/Resume.
	<li>Cancel job.
	<li>View Log.
	</ul>
</P>
<H2>Add a download job</H2>
<P>
	<CODE>Libretto</CODE> can do different download types; listed following:
	<OL>
	<LI><P><B>Only one <CODE>file</CODE>.</B><br/>
		We'll download the file with one of the next protocols:
		<CODE>HTTP, HTTPS, FTP</CODE>.<br>
		We should write the <CODE>URL</CODE> that points to the file.
	</P>
	<LI><P><B>All the files in one <CODE>directory</CODE>.</B><br/>
		<CODE>Libretto</CODE> will download all the files of the
		directory especified in the <CODE>URL</CODE> field; in that case we can select
		the extension of the files to download.<br/>
		Works with the following protocols:
		<CODE>HTTP, HTTPS, FTP</CODE>.
	</P>
	<LI><P><B>Create a <CODE>mirror</CODE> of an Internet place.</B><br/>
		<CODE>Libretto</CODE> will download all the files of the
		location specified in the <CODE>URL</CODE> field, and creates a mirror image.<br>
		Supports the following protocols: <CODE>HTTP, HTTPS, FTP</CODE>.
	</P>
	<LI><P><B><CODE>BitTorrent</CODE> Protocol.</B><br/>
		<CODE>Libretto</CODE> needs the <CODE>.torrent</CODE> file
		that contains information about the download; we can write
		the <CODE>URL</CODE> pointing to the file, or upload that file from the client computer
		with the input <CODE>Local file</CODE>.
	</P>
	<LI><P><B><CODE>MetaLink</CODE> Protocol.</B><br>
		<CODE>Libretto</CODE> needs the <CODE>.metalink</CODE> file
		that contains information about the download; we can write
		the <CODE>URL</CODE> pointing to the file, or upload that file from the client computer
		with the input <CODE>Local file</CODE>.
	</P>
	<LI><P><B><CODE>Jigsaw Download</CODE> Protocol.</B><br>
		<CODE>Libretto</CODE> needs two files, one of type <CODE>.jigdo</CODE> and
		another of type <CODE>.template</CODE>; we can write
		the <CODE>URL</CODE> pointing to the <CODE>.jigdo</CODE> file, or upload that file from the client computer
		with the input <CODE>Local file</CODE>. We can upload the <CODE>.template</CODE>
		file with the input <CODE>Auxiliary file</CODE>, but normally it is not necessary.
		A Jigsaw Download could start successfully with only the <CODE>.jigdo</CODE> file;
		we can write the <CODE>URL</CODE> pointing to the file.
	</P>
	</OL>
</P>
<H2>Installation</H2>
<P>How to quickly install <CODE>Libretto</CODE>
	on any computer with <CODE>GNU/Linux</CODE>, <CODE>MS Windows</CODE>, or any
	Web Server with <CODE>PHP</CODE>, an user's authorization system,
	and the utilities <CODE>Wget</CODE>, <CODE>Aria2</CODE>,
	<CODE>Enhanced Ctorrent</CODE> and/or  <CODE>Jigsaw Download</CODE>..
</P>
<OL>
	<LI><P><CODE>Libretto</CODE> will run on any Web server equipped with a <CODE>PHP</CODE>
	code processor. The system should provide disk space to save the downloads.<br>
	The client is a Web Browser with graphical interface.
	</P>
	<LI><P>The Web server manages the security at user's level. <CODE>Libretto</CODE>
	will work with <CODE>HTTP</CODE> servers compatibles with <CODE>PHP</CODE> authentication
	like <CODE>Apache</CODE> or <CODE>IIS</CODE>.<br>
	The configuration file is <CODE>includes/settings.php</CODE>.<br>
	We should specify for every user, the system user's name, full name and
	also the download's destination directory; for that directory
	<CODE>Apache</CODE> (<CODE>www-data</CODE>) should have <CODE>read/write</CODE> permissions.<br>
	Define an <CODE>Administrador</CODE> user to manage all the user's jobs
	with <CODE>Libretto</CODE>'s graphical interface.<br>
	Nevertheless, <CODE>Libretto</CODE> could start without configuring the security
	neither defining users; <CODE>Libretto</CODE> will use the same download directory for everyone.</P>
	</P>
</OL>
<P>We'll supose a system <CODE>Debian GNU/Linux</CODE>
</P>
<P>Unpack <CODE>Libretto</CODE> in a directory, by example <CODE>/home/www/libretto</CODE>
</P>
<P>Create a link to that directory</P>
<PRE>ln -s /home/www/libretto /var/www/libretto</PRE>
<P>In the file <CODE>includes/settings.php</CODE> we'll write the location
	of the temporary and download directories;<br/>
	if we want security we'll create a user's list,<br/>
	and only if that can not be found in the system <CODE>PATH</CODE>, the location of the utilities
	<CODE>Wget</CODE>, <CODE>Aria2</CODE>,
	<CODE>Enhanced Ctorrent</CODE> or <CODE>Jigsaw Download</CODE>.<br>
<P>Now we can test if that works. With authorization disabled,</P>
<PRE>$authrequire = <B>false</B>;</PRE>
<P>Point the Web Browser to:</P>
<PRE>http://localhost/libretto</PRE>
<H2>Web Server</H2>
<P><CODE>Libretto</CODE> is compatible with any kind of authorization available in the Web Server.
</P>
<P>In example, on a system <CODE>Debian GNU/Linux</CODE> and the Web server
	<CODE>Apache v2</CODE> we can make every user of the system
	<CODE>Debian GNU/Linux</CODE>
	be a <CODE>Libretto</CODE>'s user, and identify himself with his own user's name and password.</P>
<P>Apache v2 web server is installed, and the modules php4 (or php5) and auth-pam</P>
<P>Also, we supose the system <CODE>Debian GNU/Linux</CODE> is configured with <CODE>shadow passwords</CODE></P>
<P>Edit the file <CODE>/etc/apache2/httpd.conf</CODE></P>
<PRE>&lt;Directory &quot;/var/www/libretto/&quot;&gt;
AllowOverride AuthConfig
AuthBasicProvider file
AuthUserFile /etc/shadow
AuthPAM_Enabled on
AuthName &quot;Libretto Web Download Manager&quot;
AuthType Basic
require valid-user
&lt;/Directory&gt;</PRE>
<H2>Automatic Download Jobs</H2>
<P>A Batch process can add download jobs to <CODE>Libretto</CODE> following next instructions.<br>
	By example, to start downloading the file of type <CODE>Jigsaw Download</CODE>
	found in <CODE>http://inter.net/file.jigdo</CODE><br>
	Sopose our Web Server protected with user and password <CODE>myuser:mypass</CODE>;
	we send to our Web Server that <CODE>URL</CODE> with the following code:
</P>
<PRE>http://myuser:hide@address.com/libretto/index.php?batch=true&amp;url=http://inter.net/file.jigdo
</PRE>
<P>Available parameters are:
</P>
<P>
<UL>
	<LI><B>url</B> an <CODE>URL</CODE> for one Internet file or the <CODE>absolute address</CODE>
	of a disk file in our Web Server. Is the only required parameter, the others are optional.
	<LI><B>downloadtype</B> Is the download file type.<br>
	If the value is <CODE>auto</CODE> or not specified, <CODE>Libretto</CODE> will compute his value;
	set of values following:
	<UL>
	<LI><b>auto</b> (default)
	<LI><b>file</b>
	<LI><b>directory</b>
	<LI><b>mirror</b>
	<LI><b>torrent</b>
	<LI><b>metalink</b>
	<LI><b>jigdo</b>
	</UL>
	<LI><B>mask</B> When <CODE>Libretto</CODE> downloads all the files in a directori we can choose
	the extension to download. Ex: <CODE>.jpg</CODE><br>
	See <CODE>man wget</CODE> for more info.
	<LI><B>httpuser</B> The user's name to access a file in a protected URL.
	<LI><B>httppasswd</B> The user's password to access a file in a protected URL.
	<LI><B>urltype</B> Type of the location where the file is.<br>
	If <CODE>auto</CODE> or not specified, <CODE>Libretto</CODE> will compute his value;
	set of values following:
	<UL>
	<LI><b>auto</b> (default)
	<LI><b>url</b>
	<LI><b>fileserver</b>
	<LI><b>filelocal</b> (can be used only in Interactive mode)
	</UL>
	<LI><B>subdircheck</B> indicates if <CODE>Libretto</CODE> should generate a name
	for the download subdirectory.
	<UL>
	<LI><b>true</b> (default)
	<LI><b>false</b>
	</UL>
	<LI><B>subdirname</B> name of the download subdirectory.
</UL>
</P>
<P>By example, start next download with the protocol <CODE>Bittorrent</CODE>, and a
descripction file
found in the Internet <CODE>URL</CODE> named <CODE>http://inter.net/path/file.torrent</CODE>;
and save the files in the subdirectory <CODE>mytorrents</CODE>
</P>
<PRE>http://myuser:hide@address.com/libretto/index.php?batch=true&amp;url=http://inter.net/path/file.torrent&amp;subdirname=mytorrents
</PRE>
Return current item: Libretto: Web download manager