AudioCD web-interface for burning audio cd's easily
Copyright (C) 2000 Henry Palonen
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
WHAT
----
It simply writes audio cd's from bunch of wav files and optionaly prints an
label for that cd.
HOW
---
Simple instuctions:
Just look through *.cgi files for variables and do
your modifications. Then copy *.shtml to your html-directory and *.cgi to
cgi-bin. Then just put some wav-files to defined directory (in example it's
/varmistus/cdr/musa) and point your browser to
http://yourservername/audiocden.shtml. (Notice that server must support
"INCLUDES" directive.)
Longer instructions:
Just untar (tar xzvf audiocd.tar.gz) files and do following configurations.
1. HTTP-server
--------------
If you want that cd-recorder is only accessible from your local LAN, you can
make own directory for burner files. My directories:
oma-cgi:
-rwxr-xr-x 1 henkka henkka 2135 Nov 3 15:22 burn.cgi
-rwxrwxr-x 1 henkka henkka 1230 Oct 15 21:31 cdr.cgi
-rwxr-xr-x 1 henkka henkka 1093 Oct 15 21:52 createlabel.cgi
-rwxrwxr-x 1 henkka henkka 907 Sep 8 00:06 tailcdlog.cgi
-rwxrwxr-x 1 henkka henkka 355 Oct 15 10:51 tailhttperrlog.cgi
-rwxr-xr-x 1 henkka henkka 1118 Sep 7 23:18 writecd.cgi
oma-html:
-rw-r--r-- 1 henkka henkka 1013 Oct 15 21:35 audiocd.shtml
-rw-r--r-- 1 henkka henkka 1025 Nov 3 15:19 audiocden.shtml
-rw-rw-r-- 1 henkka henkka 54 Sep 7 22:49 index.html
These are configured in Apache that only couple LAN adresses can get to them.
(file /etc/httpd/conf/access.conf)
------------------------------------------------------
order deny,allow
allow from kotkapoika.koti naksu.koti
deny from all
ErrorDocument 403 "Only from local LAN"
order deny,allow
allow from kotkapoika.koti naksu.koti
deny from all
ErrorDocument 403 "Only from local LAN"
Options +Includes
------------------------------------------------------
And there is also an virtual-host definition for this setup. This server serves
only for LAN, and in port 9090 (eg. http://servername:9090)
(file /etc/httpd/conf/httpd.conf):
------------------------------------------------------
Port 9090
DocumentRoot /home/httpd/oma-html
ServerName kilpikonna
ErrorLog logs/omakilpikonna-error_log
CustomLog logs/omakilpikonna-access_log common
ScriptAlias /cgi-bin/ "/home/httpd/oma-cgi/"
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
------------------------------------------------------
2. SAMBA-SERVER
---------------
Our server is accessible also for Windows-clients with Samba. Samba
configuration for sharing files is following:
(file /etc/samba/smb.conf):
------------------------------------------------------
[cdlle]
comment = For audiocd
path = /varmistus/cdr/musa
read only = No
guest ok = Yes
hosts allow = 192.168.168.1 192.168.168.10 192.168.168.20 127.0.0.1
guest ok = Yes
------------------------------------------------------
3. SCRIPTS
----------
burn.cgi:
my $cdrdevice ="1,0,0";
my $speed = "4";
my $cmdline = "$dummy $eject -v speed=$speed dev=$cdrdevice -audio -pad $order \$1 > /tmp/cdr.normal.txt \$2 > /tmp/cdr.error.txt &";
First is cdrecord-device (cdrecord -scanbus).
Second is speed that should be used for burn.
Third is commandline. Notice the error-log paths and change them if necessary.
cdr.cgi:
my $mdir="/varmistus/cdr/musa";
Music directory. That's where all the wav-files reside.
tailcdlog.cgi:
my $logfile = "/tmp/cdr.error.txt";
This points to log-file (also in burn.cgi) which should be watched for errors etc.
writecd.cgi:
system("/usr/local/bin/cdrecord $FORM{\"cdr\"}");
This is path to your cdrecord.
4. FINALLY
----------
Just copy *.cgi to your cgi-bin (in example that was /home/httpd/oma-cgi/). Copy *.shtml to your html dir (/home/httpd/oma-html). Restart httpd and samba. Give proper permissions to cd-recorder device for user that is running web-server.
Point your browser to
http://yourservername:9090/audiocden.shtml
and enjoy ;-)
5. SUPPORT
----------
If you find this software useful, please listen my wife's songs at
http://www.mp3.com/jaana ... That way we can maybe someday afford
an true Genelec audio monitors. ;-)
5. QUESTIONS AND BUGS
---------------------
There will be always bugs. Birds need them.
Questions should mailed to Henry "Henkka" Palonen, either
h yty dot net
or
Henry Palonen
Aapelinraitti 7 A 20
33270 TAMPERE
FINLAND