lost track of my changes, enjoy this useless comment
git-svn-id: http://yolanda.mister-muffin.de/svn@229 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
5b68ed57c5
commit
bbb7ed61a7
13 changed files with 186 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
||||||
Yolanda - http://mister-muffin.de/proj
|
Yolanda - http://yolanda.mister-muffin.de/trac
|
||||||
=======================================================
|
=======================================================
|
||||||
|
|
||||||
A video content management using Perl for the backend and XML and XSLT for the frontend. Video playback is provided by Fluendo's Cortado applet.
|
A video content management system using Perl for the backend and XML and XSLT for the frontend. Video playback is provided by Fluendo's Cortado Java applet.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
|
BIN
trunk/images/cc/cc-unknown.png
Normal file
BIN
trunk/images/cc/cc-unknown.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
BIN
trunk/images/cc/cc-unknown.xcf
Normal file
BIN
trunk/images/cc/cc-unknown.xcf
Normal file
Binary file not shown.
BIN
trunk/images/cc/no-endorse.png
Normal file
BIN
trunk/images/cc/no-endorse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.5 KiB |
|
@ -19,10 +19,16 @@
|
||||||
<string id="logout">logout</string>
|
<string id="logout">logout</string>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
<string id="authors">© 2007 Yolanda team</string>
|
<string id="footer_copyright">© 2007 - 2008 Yolanda Team</string>
|
||||||
<string id="license">license</string>
|
<string id="footer_warranty">
|
||||||
<string id="source_code">download source code</string>
|
This software comes WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
<string id="report_bug">report bug</string>
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for details.
|
||||||
|
</string>
|
||||||
|
<string id="footer_license">view license</string>
|
||||||
|
<string id="footer_source_code">get source code</string>
|
||||||
|
<string id="footer_report_bug">report bug</string>
|
||||||
|
<string id="footer_view_xml">view this page as xml</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- front page -->
|
<!-- front page -->
|
||||||
<string id="button_find">Find</string>
|
<string id="button_find">Find</string>
|
||||||
|
|
47
trunk/man/yolanda
Normal file
47
trunk/man/yolanda
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
.TH YOLANDA 7 2008-01-02 "" "Yolanda Video CMS Manual"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
Yolanda Video CMS
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B daemon.pl
|
||||||
|
|
||||||
|
.B tagcloud.pl
|
||||||
|
|
||||||
|
.B yolanda-upload.pl
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
Yolanda is a WWW video content management system using a Perl backend and XML frontend. Video playback in Browser is provided by Fluendo's Cortado Java applet or media player plugins like those of
|
||||||
|
.B vlc(1)
|
||||||
|
or
|
||||||
|
.B mplayer(1).
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
MOAR CONTENT.
|
||||||
|
.B CONTRIBUTE !
|
||||||
|
|
||||||
|
.SH FILES
|
||||||
|
AS I SAID:
|
||||||
|
.B CONTRIBUTE !
|
||||||
|
|
||||||
|
.SH CONFORMING TO
|
||||||
|
XHTML 1.0 Strict <-- we hope so
|
||||||
|
[[insert
|
||||||
|
.IB MOAR
|
||||||
|
standards here]]
|
||||||
|
|
||||||
|
.SH NOTES
|
||||||
|
this man page is useless, as it was thrown together just to see if it would be easy to make a man page without
|
||||||
|
.B prior knowledge \*(Tm
|
||||||
|
.
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
many. see http://yolanda.mister-muffin.de/trac
|
||||||
|
|
||||||
|
Yolanda is full of bad programming, severely unsafe and not fit for general use. Use on hacker conferences like the Chaos Communication Congress is encouraged - but please, for the love of the invisible pink unicorn, submit tickets in our bug tracking system afterwards.
|
||||||
|
|
||||||
|
.SH EXAMPLE
|
||||||
|
this will change often ( so i will just omit it )
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
.B yolanda-upload (1)
|
79
trunk/man/yolanda-upload
Normal file
79
trunk/man/yolanda-upload
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
.TH YOLANDA-UPLOAD 1 2008-01-03 "" "Yolanda Video CMS Manual"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
Yolanda Uploader \- command-line tool to upload videos to WWW sites running Yolanda Video CMS.
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B yolanda-upload.pl
|
||||||
|
.RI [ options ]
|
||||||
|
|
||||||
|
.SH DESRIPTION
|
||||||
|
This manual page documents briefly the \fByolanda-upload\fP command.
|
||||||
|
.PP
|
||||||
|
\fByolanda-upload\fP is a program that uploads a video file to a WWW site running Yolanda Video CMS.
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
This program follows the usual GNU command line synthax, with long options starting with two dashes (`-'). A summary of options is included below.
|
||||||
|
|
||||||
|
As of now, all options are mandatory.
|
||||||
|
|
||||||
|
.SS General options:
|
||||||
|
.TP
|
||||||
|
.B \-u, \-\-username
|
||||||
|
Specify the username. This value will also be used for the publisher.
|
||||||
|
.TP
|
||||||
|
.B \-p, \-\-password
|
||||||
|
Specify the password. Lol insecure !!1
|
||||||
|
.TP
|
||||||
|
.B \-f, \-\-file
|
||||||
|
Upload given video file.
|
||||||
|
|
||||||
|
.SS Metadata options:
|
||||||
|
.B \-t, \-\-title
|
||||||
|
State the title of the video.
|
||||||
|
.TP
|
||||||
|
.B \-d, \-\-description
|
||||||
|
State a description of the video in natural language.
|
||||||
|
.TP
|
||||||
|
.B \-x, \-\-tags
|
||||||
|
Specify multiple tags, separated by spaces.
|
||||||
|
.TP
|
||||||
|
.B \-c, \-\-creator
|
||||||
|
Specify the creator of the video.
|
||||||
|
.TP
|
||||||
|
.B \-s, \-\-source
|
||||||
|
Specify the source of the video, preferably by URL.
|
||||||
|
.TP
|
||||||
|
.B \-l, \-\-language
|
||||||
|
Specify the language of the video, preferably conforming to ISO ???.
|
||||||
|
.TP
|
||||||
|
.B -\v, \-\-coverage
|
||||||
|
Specify the coverage of the video, e.g. "Berlin, December 2007"
|
||||||
|
.PP
|
||||||
|
( coverage should be -o, because -v usually is used for "verbose". )
|
||||||
|
|
||||||
|
.SH CONFORMING TO
|
||||||
|
[[insert
|
||||||
|
.IB MOAR
|
||||||
|
standards here]]
|
||||||
|
|
||||||
|
.SH NOTES
|
||||||
|
this man page is useless, as it was thrown together just to see if it would be easy to make a man page without
|
||||||
|
.B prior knowledge \*(Tm
|
||||||
|
.
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
many. see http://yolanda.mister-muffin.de/trac
|
||||||
|
|
||||||
|
Yolanda-upload is full of bad programming, severely unsafe and not fit for general use. Use on hacker conferences like the Chaos Communication Congress is encouraged - but please, for the love of the invisible pink unicorn, submit tickets in our bug tracking system afterwards.
|
||||||
|
|
||||||
|
.SH EXAMPLE
|
||||||
|
this will change often ( so i will just omit it )
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
\fByolanda\fP(7)
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
yolanda-upload was written by Johannes Schauer.
|
||||||
|
.PP
|
||||||
|
This manual page was written by Nils Moskopp for his own amusement (but may be used by others).
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="utf-16"?>
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
|
||||||
<strings>
|
<strings>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<string id="page_login-openid">/login.pl?action=openid</string>
|
<string id="page_login-openid">/login.pl?action=openid</string>
|
||||||
<string id="page_logout">/login.pl?action=logout</string>
|
<string id="page_logout">/login.pl?action=logout</string>
|
||||||
<string id="page_authors">http://yolanda.mister-muffin.de/trac</string>
|
<string id="page_authors">http://yolanda.mister-muffin.de/trac</string>
|
||||||
<string id="page_license">http://www.fsf.org/licensing/licenses/agpl-3.0.html</string>
|
<string id="page_license">/LICENSE</string>
|
||||||
<string id="page_source-code">http://yolanda.mister-muffin.de/trac/browser/trunk</string>
|
<string id="page_source-code">http://yolanda.mister-muffin.de/trac/browser/trunk</string>
|
||||||
<string id="page_register">/register.pl</string>
|
<string id="page_register">/register.pl</string>
|
||||||
<string id="page_report_bug">http://yolanda.mister-muffin.de/trac/newticket</string>
|
<string id="page_report_bug">http://yolanda.mister-muffin.de/trac/newticket</string>
|
||||||
|
|
|
@ -67,12 +67,23 @@ div
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.commentform,
|
||||||
|
div.loginform,
|
||||||
|
div.registerform,
|
||||||
|
div.settingsform,
|
||||||
|
div.uploadform
|
||||||
|
{
|
||||||
|
line-height: 2.5em;
|
||||||
|
margin: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
div.comments
|
div.comments
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
div.footer
|
div.footer
|
||||||
{
|
{
|
||||||
|
line-height: 2.5em;
|
||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,16 +105,6 @@ div
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.loginform,
|
|
||||||
div.registerform,
|
|
||||||
div.settingsform,
|
|
||||||
div.uploadform,
|
|
||||||
div.commentform
|
|
||||||
{
|
|
||||||
line-height: 2.5em;
|
|
||||||
margin: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.messagebox
|
div.messagebox
|
||||||
{
|
{
|
||||||
border-color: #606060;
|
border-color: #606060;
|
||||||
|
|
|
@ -5,6 +5,7 @@ use DBI;
|
||||||
use Digest::SHA;
|
use Digest::SHA;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
|
||||||
|
#TODO: put this into central configuration file
|
||||||
$database = 'yolanda';
|
$database = 'yolanda';
|
||||||
$dbhost = 'localhost';
|
$dbhost = 'localhost';
|
||||||
$dbuser = 'root';
|
$dbuser = 'root';
|
||||||
|
@ -17,6 +18,7 @@ $root = '/var/www/yolanda';
|
||||||
$LOG = "$root/daemon.log";
|
$LOG = "$root/daemon.log";
|
||||||
|
|
||||||
|
|
||||||
|
#TODO: maybe keep file open the whole time ?
|
||||||
sub appendlog
|
sub appendlog
|
||||||
{
|
{
|
||||||
if (open(FILE, ">>$LOG"))
|
if (open(FILE, ">>$LOG"))
|
||||||
|
@ -100,7 +102,7 @@ while(1)
|
||||||
my ($resultid) = $sth->fetchrow_array();
|
my ($resultid) = $sth->fetchrow_array();
|
||||||
$sth->finish() or interrupt $dbh->errstr;
|
$sth->finish() or interrupt $dbh->errstr;
|
||||||
|
|
||||||
#if so, then video is a duplicate
|
#if so, then video is a duplicate (alternatively ALL HAIL QUANTUM COMPUTING)
|
||||||
if($resultid)
|
if($resultid)
|
||||||
{
|
{
|
||||||
appendlog "id: $id",
|
appendlog "id: $id",
|
||||||
|
@ -151,7 +153,7 @@ while(1)
|
||||||
|
|
||||||
system "ffmpeg -i $root/tmp/$id -vcodec mjpeg -vframes 1 -an -f rawvideo -ss $thumbnailsec -s ".$tnwidth."x$tnheight $root/video-stills/$id";
|
system "ffmpeg -i $root/tmp/$id -vcodec mjpeg -vframes 1 -an -f rawvideo -ss $thumbnailsec -s ".$tnwidth."x$tnheight $root/video-stills/$id";
|
||||||
|
|
||||||
$vmaxheight = 240;
|
$vmaxheight = 640;
|
||||||
|
|
||||||
#check if the upload already is in the right format and smaller/equal max-width/height
|
#check if the upload already is in the right format and smaller/equal max-width/height
|
||||||
if ($container eq 'ogg' and $video eq 'theora' and $audio eq 'vorbis' and $height <= $vmaxheight)
|
if ($container eq 'ogg' and $video eq 'theora' and $audio eq 'vorbis' and $height <= $vmaxheight)
|
||||||
|
@ -170,13 +172,14 @@ while(1)
|
||||||
else #encode video
|
else #encode video
|
||||||
{
|
{
|
||||||
#calculate video width
|
#calculate video width
|
||||||
|
#TODO: ffmpeg only accepts values dividable by 8 !!! ( check that )
|
||||||
$vheight = $vmaxheight <= $height ? $vmaxheight : $height;
|
$vheight = $vmaxheight <= $height ? $vmaxheight : $height;
|
||||||
$vwidth = int($vheight*($width/$height)/2 + .5)*2;
|
$vwidth = int($vheight*($width/$height)/2 + .5)*2;
|
||||||
|
|
||||||
$abitrate = 64;
|
$abitrate = 64;
|
||||||
$vbitrate = int($filesize*8) / $duration + .5) - $abitrate;
|
$vbitrate = int($filesize*8) / $duration + .5) - $abitrate;
|
||||||
|
|
||||||
#TODO: addmetadata information
|
#TODO: add metadata information
|
||||||
system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id $root/tmp/$id";
|
system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id $root/tmp/$id";
|
||||||
|
|
||||||
appendlog $id, $audio, $video, $vwidth, $vheight, $fps, $duration, $sha;
|
appendlog $id, $audio, $video, $vwidth, $vheight, $fps, $duration, $sha;
|
||||||
|
@ -190,6 +193,7 @@ while(1)
|
||||||
$vheight, $fps, $sha, $id) or interrupt $dbh->errstr;
|
$vheight, $fps, $sha, $id) or interrupt $dbh->errstr;
|
||||||
|
|
||||||
#delete temp file
|
#delete temp file
|
||||||
|
#TODO: use /tmp you insensitive clod !
|
||||||
unlink "$root/tmp/$id";
|
unlink "$root/tmp/$id";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +205,7 @@ while(1)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
TODO: maybe make this event-driven by using the kernels has-this-file-changed-interface ?
|
||||||
sleep 10;
|
sleep 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ sub preamble {
|
||||||
}
|
}
|
||||||
|
|
||||||
# set these values for default -l (login) and -p (pass) values
|
# set these values for default -l (login) and -p (pass) values
|
||||||
#
|
# TODO: lol configfile !!!
|
||||||
use constant USER => "";
|
use constant USER => "";
|
||||||
use constant PASS => "";
|
use constant PASS => "";
|
||||||
|
|
||||||
|
@ -93,6 +93,7 @@ $ua = LWP::UserAgent->new(cookie_jar => {});
|
||||||
push @{$ua->requests_redirectable}, 'POST';
|
push @{$ua->requests_redirectable}, 'POST';
|
||||||
|
|
||||||
print "Getting sid cookie...\n";
|
print "Getting sid cookie...\n";
|
||||||
|
# DONT PRINT THIS - UNIX PHILOSPHY IS: IF IT WORKS DONT DISPLAY SHIT ! ( maybe add a -v switch )
|
||||||
$response = $ua->request(GET $url);
|
$response = $ua->request(GET $url);
|
||||||
unless($response->is_success)
|
unless($response->is_success)
|
||||||
{
|
{
|
||||||
|
@ -101,6 +102,7 @@ unless($response->is_success)
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Logging in to $url/login.pl...\n";
|
print "Logging in to $url/login.pl...\n";
|
||||||
|
# DONT PRINT THIS - UNIX PHILOSPHY IS: IF IT WORKS DONT DISPLAY SHIT ! ( maybe add a -v switch )
|
||||||
$response = $ua->request(POST "$url/login.pl", "Content_Type" => "form-data", "Content" => [action => login, user => test, pass => test]);
|
$response = $ua->request(POST "$url/login.pl", "Content_Type" => "form-data", "Content" => [action => login, user => test, pass => test]);
|
||||||
unless($response->is_success)
|
unless($response->is_success)
|
||||||
{
|
{
|
||||||
|
@ -113,6 +115,7 @@ unless($response->content =~ /action=logout/)
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Uploading $opts{f} to $url/uploader.pl...\n";
|
print "Uploading $opts{f} to $url/uploader.pl...\n";
|
||||||
|
# DONT PRINT THIS - UNIX PHILOSPHY IS: IF IT WORKS DONT DISPLAY SHIT ! ( maybe add a -v switch )
|
||||||
$response = $ua->request(POST "$url/uploader.pl",
|
$response = $ua->request(POST "$url/uploader.pl",
|
||||||
"Content_Type" => "multipart/form-data",
|
"Content_Type" => "multipart/form-data",
|
||||||
"Content" => [
|
"Content" => [
|
||||||
|
@ -132,3 +135,4 @@ unless($response->is_success)
|
||||||
$response->status_line;
|
$response->status_line;
|
||||||
}
|
}
|
||||||
print "Done!\n";
|
print "Done!\n";
|
||||||
|
# DONT PRINT THIS - UNIX PHILOSPHY IS: IF IT WORKS DONT DISPLAY SHIT ! ( maybe add a -v switch )
|
||||||
|
|
|
@ -251,33 +251,45 @@
|
||||||
|
|
||||||
<xsl:if test="not(//@embed='true')">
|
<xsl:if test="not(//@embed='true')">
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a>
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="$site_strings[@id='page_authors']" />
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$locale_strings[@id='authors']" />
|
|
||||||
</a>
|
|
||||||
<xsl:value-of select="$locale_strings[@id='separator']" />
|
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$site_strings[@id='page_license']" />
|
<xsl:value-of select="$site_strings[@id='page_license']" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="$locale_strings[@id='license']" />
|
<xsl:value-of select="$locale_strings[@id='footer_license']" />
|
||||||
</a>
|
</a>
|
||||||
<xsl:value-of select="$locale_strings[@id='separator']" />
|
<xsl:value-of select="$locale_strings[@id='separator']" />
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$site_strings[@id='page_source-code']" />
|
<xsl:value-of select="$site_strings[@id='page_source-code']" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="$locale_strings[@id='source_code']" />
|
<xsl:value-of select="$locale_strings[@id='footer_source_code']" />
|
||||||
</a>
|
</a>
|
||||||
<xsl:value-of select="$locale_strings[@id='separator']" />
|
<xsl:value-of select="$locale_strings[@id='separator']" />
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$site_strings[@id='page_report_bug']" />
|
<xsl:value-of select="$site_strings[@id='page_report_bug']" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:value-of select="$locale_strings[@id='report_bug']" />
|
<xsl:value-of select="$locale_strings[@id='footer_report_bug']" />
|
||||||
</a>
|
</a>
|
||||||
|
<xsl:value-of select="$locale_strings[@id='separator']" />
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<!--
|
||||||
|
caveat: this currently does not work on root level
|
||||||
|
apache magic wanted
|
||||||
|
-->
|
||||||
|
?xslt=null
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$locale_strings[@id='footer_view_xml']" />
|
||||||
|
</a>
|
||||||
|
<br />
|
||||||
|
<xsl:value-of select="$locale_strings[@id='footer_copyright']" />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<span class="protip">
|
||||||
|
<xsl:value-of select="$locale_strings[@id='footer_warranty']" />
|
||||||
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue