converted tabs to spaces in all xml and css files and all perl tools

git-svn-id: http://yolanda.mister-muffin.de/svn@241 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
josch 2008-02-14 22:35:25 +00:00
parent e59c37e102
commit 46e7fc71b3
7 changed files with 685 additions and 686 deletions

View file

@ -3,202 +3,202 @@
<strings> <strings>
<string id="separator">&#160;|&#160;</string> <string id="separator">&#160;|&#160;</string>
<!-- header --> <!-- header -->
<string id="header_login-to-upload">to upload videos, log in first.</string> <string id="header_login-to-upload">to upload videos, log in first.</string>
<string id="register">register</string> <string id="register">register</string>
<string id="login">login</string> <string id="login">login</string>
<string id="login_openid">login with OpenID</string> <string id="login_openid">login with OpenID</string>
<string id="header_upload-video">upload video</string> <string id="header_upload-video">upload video</string>
<string id="settings_details">settings details</string> <string id="settings_details">settings details</string>
<string id="logged_in_as">logged in as&#160;</string> <string id="logged_in_as">logged in as&#160;</string>
<string id="logout">logout</string> <string id="logout">logout</string>
<!-- footer --> <!-- footer -->
<string id="footer_copyright">&#169; 2007 - 2008 Yolanda Team</string> <string id="footer_copyright">&#169; 2007 - 2008 Yolanda Team</string>
<string id="footer_warranty"> <string id="footer_warranty">
This software comes WITHOUT ANY WARRANTY; without even the implied warranty of This software comes WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for details. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for details.
</string> </string>
<string id="footer_license">view license</string> <string id="footer_license">view license</string>
<string id="footer_source_code">get source code</string> <string id="footer_source_code">get source code</string>
<string id="footer_report_bug">report bug</string> <string id="footer_report_bug">report bug</string>
<string id="footer_view_xml">view this page as xml</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>
<string id="button_lucky">Instant Access</string> <string id="button_lucky">Instant Access</string>
<string id="button_advanced">Advanced Search</string> <string id="button_advanced">Advanced Search</string>
<string id="query_latestadditions">latest additions</string> <string id="query_latestadditions">latest additions</string>
<string id="query_mostdownloads">most downloaded</string> <string id="query_mostdownloads">most downloaded</string>
<string id="query_mostviews">most viewed</string> <string id="query_mostviews">most viewed</string>
<!-- errors --> <!-- errors -->
<string id="error_202c">Error 202c - Access forbidden by government.</string> <string id="error_202c">Error 202c - Access forbidden by government.</string>
<string id="error_missing_file">You did not supply a file.</string> <string id="error_missing_file">You did not supply a file.</string>
<string id="error_missing_DC.Title">You did not supply a title.</string> <string id="error_missing_DC.Title">You did not supply a title.</string>
<string id="error_missing_DC.Creator">You did not supply a creator.</string> <string id="error_missing_DC.Creator">You did not supply a creator.</string>
<string id="error_missing_DC.Subject">You did not supply any keywords.</string> <string id="error_missing_DC.Subject">You did not supply any keywords.</string>
<string id="error_missing_DC.Description">You did not supply a description.</string> <string id="error_missing_DC.Description">You did not supply a description.</string>
<string id="error_missing_DC.Publisher">You did not supply a publisher.</string> <string id="error_missing_DC.Publisher">You did not supply a publisher.</string>
<string id="error_missing_DC.Title">You did not supply a title.</string> <string id="error_missing_DC.Title">You did not supply a title.</string>
<string id="error_missing_DC.Source">You did not supply a source.</string> <string id="error_missing_DC.Source">You did not supply a source.</string>
<string id="error_missing_DC.Language">You did not supply a language.</string> <string id="error_missing_DC.Language">You did not supply a language.</string>
<string id="error_missing_DC.Coverage">You did not supply a coverage.</string> <string id="error_missing_DC.Coverage">You did not supply a coverage.</string>
<string id="error_missing_DC.Rights">You did not supply a rights holder.</string> <string id="error_missing_DC.Rights">You did not supply a rights holder.</string>
<string id="error_already_registered">You seem to be already registered. Please log out to create a new account.</string> <string id="error_already_registered">You seem to be already registered. Please log out to create a new account.</string>
<string id="error_already_logged_in">You seem to be already logged in. Please log out to log in again.</string> <string id="error_already_logged_in">You seem to be already logged in. Please log out to log in again.</string>
<string id="error_username_password_do_not_match">Username and password do not match.</string> <string id="error_username_password_do_not_match">Username and password do not match.</string>
<string id="error_passwords_do_not_match">Passwords do not match.</string> <string id="error_passwords_do_not_match">Passwords do not match.</string>
<string id="error_username_already_registered">Your desired Username was already registered</string> <string id="error_username_already_registered">Your desired Username was already registered</string>
<string id="error_insert_username">Please insert a username.</string> <string id="error_insert_username">Please insert a username.</string>
<string id="error_insert_password">Please insert a password.</string> <string id="error_insert_password">Please insert a password.</string>
<string id="error_repeat_password">Please repeat your password.</string> <string id="error_repeat_password">Please repeat your password.</string>
<string id="error_no_query">You passed no query string.</string> <string id="error_no_query">You passed no query string.</string>
<string id=""></string> <string id=""></string>
<!-- information --> <!-- information -->
<string id="information_logged_in">You are now logged in.</string> <string id="information_logged_in">You are now logged in.</string>
<string id="information_logged_out">You are now logged out.</string> <string id="information_logged_out">You are now logged out.</string>
<string id="information_metainformation_needed">To put the video into context, additional metainformation is needed.</string> <string id="information_metainformation_needed">To put the video into context, additional metainformation is needed.</string>
<string id="information_metainformation_rights"></string> <string id="information_metainformation_rights"></string>
<string id="information_comment_created">Your comment has been submitted.</string> <string id="information_comment_created">Your comment has been submitted.</string>
<string id="information_registered">Your account has been created.</string> <string id="information_registered">Your account has been created.</string>
<string id="information_uploaded">Your file has been uploaded.</string> <string id="information_uploaded">Your file has been uploaded.</string>
<string id="information_settings_changed">Your successfully changed your settings.</string> <string id="information_settings_changed">Your successfully changed your settings.</string>
<!-- warnings --> <!-- warnings -->
<string id="warning_no_results">There are no results satisfying your query.</string> <string id="warning_no_results">There are no results satisfying your query.</string>
<!-- results page--> <!-- results page-->
<string id="results_heading_1">results</string> <string id="results_heading_1">results</string>
<string id="results_heading_2">to</string> <string id="results_heading_2">to</string>
<string id="results_heading_3">out of</string> <string id="results_heading_3">out of</string>
<string id="results_heading_4"></string> <!-- this may be needed for other languages --> <string id="results_heading_4"></string> <!-- this may be needed for other languages -->
<string id="ordered_by">ordered by</string> <string id="ordered_by">ordered by</string>
<string id="ascending">ascending</string> <string id="ascending">ascending</string>
<string id="descending">descending</string> <string id="descending">descending</string>
<string id="videos_oldest">oldest first</string> <string id="videos_oldest">oldest first</string>
<string id="videos_newest">most recent first</string> <string id="videos_newest">most recent first</string>
<string id="videos_downloaded_least">least downloaded first</string> <string id="videos_downloaded_least">least downloaded first</string>
<string id="videos_downloaded_most">most downloaded first</string> <string id="videos_downloaded_most">most downloaded first</string>
<string id="videos_viewed_least">least viewed first</string> <string id="videos_viewed_least">least viewed first</string>
<string id="videos_viewed_most">most viewed first</string> <string id="videos_viewed_most">most viewed first</string>
<string id="videos_shortest">shortest first</string> <string id="videos_shortest">shortest first</string>
<string id="videos_lengthest">lenghtest first</string> <string id="videos_lengthest">lenghtest first</string>
<string id="videos_smallest">smallest first</string> <string id="videos_smallest">smallest first</string>
<string id="videos_biggest">biggest first</string> <string id="videos_biggest">biggest first</string>
<string id="results_on">results on</string> <string id="results_on">results on</string>
<string id="pages">pages</string> <string id="pages">pages</string>
<string id="relevance">relevance</string> <string id="relevance">relevance</string>
<string id="duration">duration</string> <string id="duration">duration</string>
<string id="filesize">filesize</string> <string id="filesize">filesize</string>
<string id="viewcount">views</string> <string id="viewcount">views</string>
<string id="downloadcount">downloads</string> <string id="downloadcount">downloads</string>
<string id="timestamp">timestamp</string> <string id="timestamp">timestamp</string>
<!-- search bar--> <!-- search bar-->
<string id="search">search</string> <string id="search">search</string>
<!-- login / register page --> <!-- login / register page -->
<string id="username">username</string> <string id="username">username</string>
<string id="password">password</string> <string id="password">password</string>
<string id="password_repeat">repeat password</string> <string id="password_repeat">repeat password</string>
<string id="button_register">register</string> <string id="button_register">register</string>
<string id="button_login">login</string> <string id="button_login">login</string>
<!-- upload page --> <!-- upload page -->
<string id="file">file</string> <string id="file">file</string>
<string id="button_next_page">continue</string> <string id="button_next_page">continue</string>
<string id="button_upload">upload</string> <string id="button_upload">upload</string>
<string id="title_page_1">Basic Information</string> <string id="title_page_1">Basic Information</string>
<string id="title_page_2">Similar Videos</string> <string id="title_page_2">Similar Videos</string>
<string id="title_page_3">Additional Metainformation</string> <string id="title_page_3">Additional Metainformation</string>
<string id="title_page_4">Licensing</string> <string id="title_page_4">Licensing</string>
<string id="title_page_5">Summary / Upload</string> <string id="title_page_5">Summary / Upload</string>
<string id="instruction_page_1">Describe the video you want to upload.</string> <string id="instruction_page_1">Describe the video you want to upload.</string>
<string id="instruction_page_2">Similar videos have already been uploaded. If none of these videos matches yours, continue.</string> <string id="instruction_page_2">Similar videos have already been uploaded. If none of these videos matches yours, continue.</string>
<string id="instruction_page_3">Providing these infos helps us to put the video into context.</string> <string id="instruction_page_3">Providing these infos helps us to put the video into context.</string>
<string id="instruction_page_4">Describe the video's license.</string> <string id="instruction_page_4">Describe the video's license.</string>
<string id="instruction_page_5">Double-check the data and correct mistakes, if necessary.</string> <string id="instruction_page_5">Double-check the data and correct mistakes, if necessary.</string>
<string id="instruction_file">Specify the file you want to upload.</string> <string id="instruction_file">Specify the file you want to upload.</string>
<string id="instruction_title">State the title of the video.</string> <string id="instruction_title">State the title of the video.</string>
<string id="instruction_creator">Specify the creator of the video.</string> <string id="instruction_creator">Specify the creator of the video.</string>
<string id="instruction_subject">State some keywords, separated by spaces.</string> <string id="instruction_subject">State some keywords, separated by spaces.</string>
<string id="instruction_description">Describe the video in natural language.</string> <string id="instruction_description">Describe the video in natural language.</string>
<string id="instruction_source">Specify the source, preferably by URL.</string> <string id="instruction_source">Specify the source, preferably by URL.</string>
<string id="instruction_language">State the language of the video.</string> <string id="instruction_language">State the language of the video.</string>
<string id="instruction_coverage">Specify the time and location covered.</string> <string id="instruction_coverage">Specify the time and location covered.</string>
<string id="instruction_rights">Specify the copyright owner of the video.</string> <string id="instruction_rights">Specify the copyright owner of the video.</string>
<string id="instruction_license">Specify the license, preferably by URL.</string> <string id="instruction_license">Specify the license, preferably by URL.</string>
<string id="instruction_license_cc">Optionally, choose Creative Commons licensing.</string> <string id="instruction_license_cc">Optionally, choose Creative Commons licensing.</string>
<string id="instruction_license_cc_remix">Permit modification.</string> <string id="instruction_license_cc_remix">Permit modification.</string>
<string id="instruction_license_cc_sharealike">Permit modification, derivatives must use the same license.</string> <string id="instruction_license_cc_sharealike">Permit modification, derivatives must use the same license.</string>
<string id="instruction_license_cc_noderivatives">Prohibit modification.</string> <string id="instruction_license_cc_noderivatives">Prohibit modification.</string>
<string id="instruction_license_cc_noncommercial">Prohibit commercial use.</string> <string id="instruction_license_cc_noncommercial">Prohibit commercial use.</string>
<string id="this_is_page_1">This is page 1 of 5.</string> <string id="this_is_page_1">This is page 1 of 5.</string>
<string id="this_is_page_2">This is page 2 of 5.</string> <string id="this_is_page_2">This is page 2 of 5.</string>
<string id="this_is_page_3">This is page 3 of 5.</string> <string id="this_is_page_3">This is page 3 of 5.</string>
<string id="this_is_page_4">This is page 4 of 5.</string> <string id="this_is_page_4">This is page 4 of 5.</string>
<string id="this_is_page_5">This is page 5 of 5.</string> <string id="this_is_page_5">This is page 5 of 5.</string>
<string id="button_page_1">back to page 1</string> <string id="button_page_1">back to page 1</string>
<string id="button_page_3">back to page 3</string> <string id="button_page_3">back to page 3</string>
<string id="button_page_4">back to page 4</string> <string id="button_page_4">back to page 4</string>
<!-- languages --> <!-- languages -->
<string id="language_en-us">English</string> <string id="language_en-us">English</string>
<string id="language_de-de">German</string> <string id="language_de-de">German</string>
<!-- video page --> <!-- video page -->
<string id="download_video">download</string> <string id="download_video">download</string>
<string id="junk_video">mark as junk</string> <string id="junk_video">mark as junk</string>
<string id="edit_video">edit</string> <string id="edit_video">edit</string>
<string id="megabytes">MB</string> <string id="megabytes">MB</string>
<string id="watch_browserplugin">use browser plugin</string> <string id="watch_browserplugin">use browser plugin</string>
<string id="watch_cortadoapplet">use java applet</string> <string id="watch_cortadoapplet">use java applet</string>
<string id="license_conditions">license conditions</string> <string id="license_conditions">license conditions</string>
<string id="protip_embed">To embed the video on another web page, use the following HTML code:</string> <string id="protip_embed">To embed the video on another web page, use the following HTML code:</string>
<string id="login_to_comment">login to comment</string> <string id="login_to_comment">login to comment</string>
<string id="comment_post">post</string> <string id="comment_post">post</string>
<!-- embedded video page--> <!-- embedded video page-->
<string id="backlink">backlink</string> <string id="backlink">backlink</string>
<!-- dublin core entities --> <!-- dublin core entities -->
<string id="DC.Title">title</string> <string id="DC.Title">title</string>
<string id="DC.Creator">author</string> <string id="DC.Creator">author</string>
<string id="DC.Subject">keywords</string> <string id="DC.Subject">keywords</string>
<string id="DC.Description">description</string> <string id="DC.Description">description</string>
<string id="DC.Publisher">uploader</string> <string id="DC.Publisher">uploader</string>
<string id="DC.Contributor">contributor</string> <string id="DC.Contributor">contributor</string>
<string id="DC.Date">upload date</string> <string id="DC.Date">upload date</string>
<string id="DC.Source">source</string> <string id="DC.Source">source</string>
<string id="DC.Language">language</string> <string id="DC.Language">language</string>
<string id="DC.Coverage">coverage</string> <string id="DC.Coverage">coverage</string>
<string id="DC.Rights">rights holder</string> <string id="DC.Rights">rights holder</string>
<string id="DC.License">license</string> <string id="DC.License">license</string>
<string id="duration">duration</string> <string id="duration">duration</string>
<string id="viewcount">viewcount</string> <string id="viewcount">viewcount</string>
<!-- settings page --> <!-- settings page -->
<string id="settings_heading">account settings</string> <string id="settings_heading">account settings</string>
<string id="settings_instruction_locale">locale</string> <string id="settings_instruction_locale">locale</string>
<string id="settings_instruction_pagesize">choose pagesize</string> <string id="settings_instruction_pagesize">choose pagesize</string>
<string id="settings_instruction_method">choose your preferred method of video playback.</string> <string id="settings_instruction_method">choose your preferred method of video playback.</string>
<!-- rss feed --> <!-- rss feed -->
<string id="rss_separator">&#160;-&#160;</string> <string id="rss_separator">&#160;-&#160;</string>
<string id="rss_title_results_this_page">this page</string> <string id="rss_title_results_this_page">this page</string>
<string id="rss_title_results_all_pages">all results</string> <string id="rss_title_results_all_pages">all results</string>
<string id="rss_description_1">This is an RSS Feed for the query "</string> <string id="rss_description_1">This is an RSS Feed for the query "</string>
<string id="rss_description_2">".</string> <string id="rss_description_2">".</string>
</strings> </strings>

View file

@ -3,27 +3,27 @@
<strings> <strings>
<!-- visible --> <!-- visible -->
<string id="site_name">Yolanda</string> <string id="site_name">Yolanda</string>
<string id="site_motto">WebTV free as in Speech</string> <string id="site_motto">WebTV free as in Speech</string>
<!-- invisible --> <!-- invisible -->
<string id="path_settings">/settings.pl</string> <string id="path_settings">/settings.pl</string>
<string id="path_login">/login.pl</string> <string id="path_login">/login.pl</string>
<string id="path_login-openid">/login.pl?action=openid</string> <string id="path_login-openid">/login.pl?action=openid</string>
<string id="path_logout">/login.pl?action=logout</string> <string id="path_logout">/login.pl?action=logout</string>
<string id="path_authors">http://yolanda.mister-muffin.de/trac</string> <string id="path_authors">http://yolanda.mister-muffin.de/trac</string>
<string id="path_license">/LICENSE</string> <string id="path_license">/LICENSE</string>
<string id="path_source-code">http://yolanda.mister-muffin.de/trac/browser/trunk</string> <string id="path_source-code">http://yolanda.mister-muffin.de/trac/browser/trunk</string>
<string id="path_register">/register.pl</string> <string id="path_register">/register.pl</string>
<string id="path_report_bug">http://yolanda.mister-muffin.de/trac/newticket</string> <string id="path_report_bug">http://yolanda.mister-muffin.de/trac/newticket</string>
<string id="path_results">/search.pl?query=</string> <string id="path_results">/search.pl?query=</string>
<string id="path_root">http://localhost/</string> <string id="path_root">http://localhost/</string>
<string id="path_upload">/upload.pl</string> <string id="path_upload">/upload.pl</string>
<string id="path_uploader">/uploader.pl</string> <string id="path_uploader">/uploader.pl</string>
<string id="path_query_latestadditions">/search.pl?query=orderby:timestamp%20sort:descending</string> <string id="path_query_latestadditions">/search.pl?query=orderby:timestamp%20sort:descending</string>
<string id="path_query_mostdownloads">/search.pl?query=orderby:downloadcount%20sort:descending</string> <string id="path_query_mostdownloads">/search.pl?query=orderby:downloadcount%20sort:descending</string>
<string id="path_query_mostviews">/search.pl?query=orderby:viewcount%20sort:descending</string> <string id="path_query_mostviews">/search.pl?query=orderby:viewcount%20sort:descending</string>
</strings> </strings>

View file

@ -7,383 +7,382 @@ Yolanda default stylesheet
* *
{ {
clear: both; clear: both;
} }
body body
{ {
font-family: sans-serif; font-family: sans-serif;
font-size: 8pt; font-size: 8pt;
font-weight: bold; font-weight: bold;
margin: 1.5em; margin: 1.5em;
min-height: 100%; min-height: 100%;
text-align: center; text-align: center;
} }
div div
{ {
border-width: 0px; border-width: 0px;
} }
input input
{ {
text-align: left; text-align: left;
} }
img img
{ {
border-width: 0; border-width: 0;
} }
/* links */ /* links */
a a
{ {
color: #3f3fff; color: #3f3fff;
text-decoration: none; text-decoration: none;
} }
a:focus a:focus
{ {
font-style: italic; font-style: italic;
} }
a:hover a:hover
{ {
text-decoration: underline; text-decoration: underline;
} }
a.tag a.tag
{ {
display: inline-block; display: inline-block;
margin-left: 0.25em; margin-left: 0.25em;
margin-right: 0.25em; margin-right: 0.25em;
} }
/* header, footer */ /* header, footer */
a.footer, a.footer,
a.header, a.header,
div.footer, div.footer,
div.header div.header
{ {
background-color: #f0f0f0; background-color: #f0f0f0;
border-color: #f0f0f0; border-color: #f0f0f0;
border-style: solid; border-style: solid;
clear: none; clear: none;
font-size: 1em; font-size: 1em;
line-height: 3em; line-height: 3em;
height: 3em; height: 3em;
} }
a.footer, a.footer,
a.header a.header
{ {
border-bottom-width: 0px; border-bottom-width: 0px;
border-top-width: 0px; border-top-width: 0px;
border-left-width: 1px; border-left-width: 1px;
border-right-width: 1px; border-right-width: 1px;
display: block; display: block;
padding-left: 1em; padding-left: 1em;
padding-right: 1em; padding-right: 1em;
} }
a.footer:hover, a.footer:hover,
a.header:hover a.header:hover
{ {
background-color: #ffffff; background-color: #ffffff;
border-color: #c0c0c0; border-color: #c0c0c0;
} }
a.latest-additions, a.latest-additions,
a.view-license a.view-license
{ {
border-left-width: 0px; border-left-width: 0px;
} }
a.register, a.register,
a.upload-video, a.upload-video,
a.view-xml a.view-xml
{ {
border-right-width: 0px; border-right-width: 0px;
} }
a.latest-additions, a.latest-additions,
a.most-downloads, a.most-downloads,
a.most-views, a.most-views,
a.report-bug, a.report-bug,
a.view-license, a.view-license,
a.view-source-code a.view-source-code
{ {
float: left; float: left;
} }
a.login, a.login,
a.login-openid, a.login-openid,
a.logout, a.logout,
a.preferences, a.preferences,
a.register, a.register,
a.upload-video, a.upload-video,
a.view-xml a.view-xml
{ {
float: right; float: right;
} }
div.footer, div.footer,
div.header div.header
{ {
border-color: #c0c0c0; border-color: #c0c0c0;
border-width: 1px; border-width: 1px;
} }
div.footer div.footer
{ {
position: absolute; position: absolute;
bottom: 1.5em; bottom: 1.5em;
margin-right: 1.5em; margin-right: 1.5em;
} }
img.logo-header
img.logo-header {
{ display: none;
display: none; border: 1px black solid;
border: 1px black solid; clear: none;
clear: none; float: left;
float: left; margin-left: 1.5em;
margin-left: 1.5em; margin-right: 0.5em;
margin-right: 0.5em; }
}
/* content */ /* content */
div.button-download, div.button-download,
div.button-edit, div.button-edit,
div.button-junk div.button-junk
{ {
display: inline-block; display: inline-block;
margin: 0.5em; margin: 0.5em;
vertical-align: top; vertical-align: top;
} }
div.button-download img, div.button-download img,
div.button-edit img, div.button-edit img,
div.button-junk img div.button-junk img
{ {
margin: 0.5em; margin: 0.5em;
} }
div.cc-license-chooser div.cc-license-chooser
{ {
} }
div.cc-license-chooser img div.cc-license-chooser img
{ {
margin: 0.25em; margin: 0.25em;
vertical-align: middle; vertical-align: middle;
} }
div.commentform, div.commentform,
div.loginform, div.loginform,
div.registerform, div.registerform,
div.settingsform, div.settingsform,
div.uploadform div.uploadform
{ {
line-height: 2.5em; line-height: 2.5em;
margin: 1.5em; margin: 1.5em;
} }
div.comments div.comments
{ {
} }
div.messagebox div.messagebox
{ {
border-color: #606060; border-color: #606060;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
margin: 1.5em; margin: 1.5em;
} }
div.messagebox#error, div.messagebox#error,
div.messagebox#warning div.messagebox#warning
{ {
background-color: #f09090; background-color: #f09090;
} }
div.messagebox#information div.messagebox#information
{ {
background-color: #90f090; background-color: #90f090;
} }
div.messagebox img div.messagebox img
{ {
margin: 0.75em; margin: 0.75em;
overflow: visible; overflow: visible;
vertical-align: middle; vertical-align: middle;
} }
div.page-number div.page-number
{ {
color: #606060; color: #606060;
display: inline-block; display: inline-block;
font-size: 40px; font-size: 40px;
height: 32px; height: 32px;
width: 32px; width: 32px;
overflow: visible; overflow: visible;
} }
div.result div.result
{ {
display: inline-block; display: inline-block;
margin: 0.75em; margin: 0.75em;
overflow: visible; overflow: visible;
vertical-align: top; vertical-align: top;
} }
div.result img div.result img
{ {
border-color: black; border-color: black;
border-width: 1px; border-width: 1px;
} }
div.search div.search
{ {
padding: 0.75em; padding: 0.75em;
} }
div.search-small div.search-small
{ {
clear: both; clear: both;
float: right; float: right;
height: 0em; height: 0em;
overflow: visible; overflow: visible;
text-align: right; text-align: right;
} }
div.toplists div.toplists
{ {
padding: 0.75em; padding: 0.75em;
} }
div.tagcloud div.tagcloud
{ {
background-color: #f0f0f0; background-color: #f0f0f0;
border-color: #c0c0c0; border-color: #c0c0c0;
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;
margin: 0.75em; margin: 0.75em;
margin-left: 20%; margin-left: 20%;
margin-right: 20%; margin-right: 20%;
padding: 0.75em; padding: 0.75em;
} }
div.video div.video
{ {
display: inline-block; display: inline-block;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
div.videoccdata div.videoccdata
{ {
margin: 0.75em; margin: 0.75em;
} }
div.videoccdata img div.videoccdata img
{ {
border-width: 0px; border-width: 0px;
margin-left: 0.5em; margin-left: 0.5em;
margin-right: 0.5em; margin-right: 0.5em;
margin-top: 0.5em; margin-top: 0.5em;
} }
div.video-metadata div.video-metadata
{ {
display: inline-block; display: inline-block;
line-height: 1.5em; line-height: 1.5em;
margin-left: 1.5em; margin-left: 1.5em;
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
width: 256px; width: 256px;
} }
div.videotitle div.videotitle
{ {
font-size: 1.5em; font-size: 1.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
fieldset fieldset
{ {
border-width: 0px; border-width: 0px;
} }
img.logo-big img.logo-big
{ {
padding-bottom: 0.5em; padding-bottom: 0.5em;
} }
img.openid-icon img.openid-icon
{ {
padding-left: 0.2em; padding-left: 0.2em;
vertical-align: text-top; vertical-align: text-top;
} }
span.code span.code
{ {
font-family: monospace; font-family: monospace;
font-weight: normal; font-weight: normal;
} }
span.heading span.heading
{ {
font-size: 1.5em; font-size: 1.5em;
} }
span.instruction, span.instruction,
span.protip span.protip
{ {
color: #606060; color: #606060;
} }
span.protip:after span.protip:after
{ {
content: " )"; content: " )";
} }
span.protip:before span.protip:before
{ {
content: "( "; content: "( ";
} }
table.metadata, table.metadata,
table.metadata-upload table.metadata-upload
{ {
border-width: 0px; border-width: 0px;
border-collapse: collapse; border-collapse: collapse;
width: 100%; width: 100%;
} }
table.metadata td.metadata-content, table.metadata td.metadata-content,
table.metadata td.metadata-title, table.metadata td.metadata-title,
table.metadata-upload td.metadata-content table.metadata-upload td.metadata-content
{ {
text-align: left; text-align: left;
width: 50%; width: 50%;
} }
table.metadata td.metadata-title table.metadata td.metadata-title
{ {
width: 40%; width: 40%;
} }
table.metadata-upload td.metadata-title table.metadata-upload td.metadata-title
{ {
text-align: right; text-align: right;
width: 50%; width: 50%;
} }
td.metadata-title td.metadata-title
{ {
color: #606060; color: #606060;
} }

View file

@ -1,21 +1,21 @@
body body
{ {
font-family: sans-serif; font-family: sans-serif;
font-size: 8pt; font-size: 8pt;
font-weight: bold; font-weight: bold;
overflow: visible; overflow: visible;
} }
div.watch-browserplugin, div.watch-cortadoapplet div.watch-browserplugin, div.watch-cortadoapplet
{ {
float: left; float: left;
text-align: left; text-align: left;
width: 50%; width: 50%;
} }
div.embedded-backlink div.embedded-backlink
{ {
float: right; float: right;
text-align: right; text-align: right;
width: 50%; width: 50%;
} }

View file

@ -21,20 +21,20 @@ $LOG = "$root/daemon.log";
#TODO: maybe keep file open the whole time ? #TODO: maybe keep file open the whole time ?
sub appendlog sub appendlog
{ {
if (open(FILE, ">>$LOG")) if (open(FILE, ">>$LOG"))
{ {
print FILE scalar(localtime)." ".$$."\n"; print FILE scalar(localtime)." ".$$."\n";
print "------------------------------------\n"; print "------------------------------------\n";
print join("\n",@_)."\n"; print join("\n",@_)."\n";
print "------------------------------------\n\n"; print "------------------------------------\n\n";
close FILE; close FILE;
} }
} }
sub interrupt sub interrupt
{ {
appendlog(@_); appendlog(@_);
die; die;
} }
$dbh = DBI->connect("DBI:mysql:$database:$dbhost", $dbuser, $dbpass) or interrupt "could not connect to db"; $dbh = DBI->connect("DBI:mysql:$database:$dbhost", $dbuser, $dbpass) or interrupt "could not connect to db";
@ -49,166 +49,166 @@ $dbh = DBI->connect("DBI:mysql:$database:$dbhost", $dbuser, $dbpass) or interrup
while(1) while(1)
{ {
#get fresh video id from db #get fresh video id from db
my $sth = $dbh->prepare(qq{select id from uploaded where status = 0 limit 1}) or interrupt $dbh->errstr; my $sth = $dbh->prepare(qq{select id from uploaded where status = 0 limit 1}) or interrupt $dbh->errstr;
$sth->execute() or interrupt $dbh->errstr; $sth->execute() or interrupt $dbh->errstr;
my ($id) = $sth->fetchrow_array(); my ($id) = $sth->fetchrow_array();
$sth->finish() or interrupt $dbh->errstr; $sth->finish() or interrupt $dbh->errstr;
if($id) if($id)
{ {
$info = `export SDL_VIDEODRIVER="dummy"; ffplay -stats -an -vn -nodisp /tmp/$id 2>&1`; $info = `export SDL_VIDEODRIVER="dummy"; ffplay -stats -an -vn -nodisp /tmp/$id 2>&1`;
if($info =~ /ignoring/) if($info =~ /ignoring/)
{ {
appendlog "id: $id", appendlog "id: $id",
"error: invalid stream", "error: invalid stream",
"ffplay msg: $info"; "ffplay msg: $info";
#write status 2 to uploaded table #write status 2 to uploaded table
$dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 2, $id) or interrupt $dbh->errstr; $dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 2, $id) or interrupt $dbh->errstr;
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
elsif ($info =~ /I\/O error occured/) elsif ($info =~ /I\/O error occured/)
{ {
appendlog "id: $id", appendlog "id: $id",
"error: file not found", "error: file not found",
"ffplay msg: $info"; "ffplay msg: $info";
#write status 3 to uploaded table #write status 3 to uploaded table
$dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 3, $id) or interrupt $dbh->errstr; $dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 3, $id) or interrupt $dbh->errstr;
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
elsif ($info =~ /Unknown format/ or $info =~ /could not find codec parameters/) elsif ($info =~ /Unknown format/ or $info =~ /could not find codec parameters/)
{ {
appendlog "id: $id", appendlog "id: $id",
"error: file is of unknown format", "error: file is of unknown format",
"ffplay msg: $info"; "ffplay msg: $info";
#write status 4 to uploaded table #write status 4 to uploaded table
$dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 4, $id) or interrupt $dbh->errstr; $dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 4, $id) or interrupt $dbh->errstr;
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
else else
{ {
$sha = new Digest::SHA(256); $sha = new Digest::SHA(256);
$sha->addfile("/tmp/$id"); $sha->addfile("/tmp/$id");
$sha = $sha->hexdigest; $sha = $sha->hexdigest;
#check if this hash is already in database #check if this hash is already in database
my $sth = $dbh->prepare(qq{select id from videos where hash = ? limit 1}) or interrupt $dbh->errstr; my $sth = $dbh->prepare(qq{select id from videos where hash = ? limit 1}) or interrupt $dbh->errstr;
$sth->execute($sha) or interrupt $dbh->errstr; $sth->execute($sha) or interrupt $dbh->errstr;
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 (alternatively ALL HAIL QUANTUM COMPUTING) #if so, then video is a duplicate (alternatively ALL HAIL QUANTUM COMPUTING)
if($resultid) if($resultid)
{ {
appendlog "id: $id", appendlog "id: $id",
"error: video already uploaded: $resultid"; "error: video already uploaded: $resultid";
#write status 5 to uploaded table #write status 5 to uploaded table
$dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 5, $id) or interrupt $dbh->errstr; $dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 5, $id) or interrupt $dbh->errstr;
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
else else
{ {
($container, $duration) = $info =~ /Input \#0, (\w+),.+?\n.+?Duration: (\d{2}:\d{2}:\d{2}\.\d)/; ($container, $duration) = $info =~ /Input \#0, (\w+),.+?\n.+?Duration: (\d{2}:\d{2}:\d{2}\.\d)/;
#these two regexes have to be applied seperately because nobody knows which stream (audio or video) comes first #these two regexes have to be applied seperately because nobody knows which stream (audio or video) comes first
($audio) = $info =~ /Audio: (\w+)/; ($audio) = $info =~ /Audio: (\w+)/;
($video, $width, $height, $fps) = $info =~ /Video: ([\w\d]+),.+?(\d+)x(\d+),.+?(\d+\.\d+) fps/; ($video, $width, $height, $fps) = $info =~ /Video: ([\w\d]+),.+?(\d+)x(\d+),.+?(\d+\.\d+) fps/;
if(!$audio or !$video or !$duration) if(!$audio or !$video or !$duration)
{ {
appendlog "id: $id", appendlog "id: $id",
"error: error: stream is missing or video is corrupt", "error: error: stream is missing or video is corrupt",
"audio: $audio", "audio: $audio",
"video: $video", "video: $video",
"duration: $duration", "duration: $duration",
"ffplay msg: $info"; "ffplay msg: $info";
#write status 2 to uploaded table #write status 2 to uploaded table
$dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 2, $id) or interrupt $dbh->errstr; $dbh->do(qq{update uploaded set status = ? where id = ?}, undef, 2, $id) or interrupt $dbh->errstr;
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
else else
{ {
$filesize = -s "/tmp/$id"; $filesize = -s "/tmp/$id";
#convert hh:mm:ss.s duration to full seconds - thanks perl for making this so damn easy! #convert hh:mm:ss.s duration to full seconds - thanks perl for making this so damn easy!
#don't want to know how this would look in python or php... hell I don't even have to create extra variables! #don't want to know how this would look in python or php... hell I don't even have to create extra variables!
$duration =~ /^(\d{2}):(\d{2}):(\d{2})\.(\d)$/; $duration =~ /^(\d{2}):(\d{2}):(\d{2})\.(\d)$/;
$duration = int($1*3600 + $2*60 + $3 + $4/10 + .5); $duration = int($1*3600 + $2*60 + $3 + $4/10 + .5);
#create thumbnail #create thumbnail
$thumbnailsec = int($duration/3 + .5); $thumbnailsec = int($duration/3 + .5);
#the width/height calculation could of course be much shorter but less readable then #the width/height calculation could of course be much shorter but less readable then
#all thumbs have equal height #all thumbs have equal height
$tnmaxheight = 120; $tnmaxheight = 120;
$tnheight = $tnmaxheight; $tnheight = $tnmaxheight;
$tnwidth = int($tnheight*($width/$height)/2 + .5)*2; $tnwidth = int($tnheight*($width/$height)/2 + .5)*2;
system "ffmpeg -i /tmp/$id -vcodec mjpeg -vframes 1 -an -f rawvideo -ss $thumbnailsec -s ".$tnwidth."x$tnheight $root/video-stills/$id"; system "ffmpeg -i /tmp/$id -vcodec mjpeg -vframes 1 -an -f rawvideo -ss $thumbnailsec -s ".$tnwidth."x$tnheight $root/video-stills/$id";
$vmaxheight = 640; $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)
{ {
appendlog $id, "file already is ogg-theora/vorbis"; appendlog $id, "file already is ogg-theora/vorbis";
#add video to videos table #add video to videos table
$dbh->do(qq{insert into videos select id, title, description, userid, timestamp, creator, $dbh->do(qq{insert into videos select id, title, description, userid, timestamp, creator,
subject, source, language, coverage, rights, license, ?, ?, ?, ?, ?, ?, 0, 0 subject, source, language, coverage, rights, license, ?, ?, ?, ?, ?, ?, 0, 0
from uploaded where id = ?}, undef, $filesize, $duration, $width, from uploaded where id = ?}, undef, $filesize, $duration, $width,
$height, $fps, $sha, $id) or interrupt $dbh->errstr; $height, $fps, $sha, $id) or interrupt $dbh->errstr;
#move video #move video
move "/tmp/$id", "$root/videos/$id"; move "/tmp/$id", "$root/videos/$id";
} }
else #encode video else #encode video
{ {
#video height is either ther maximum video height #video height is either ther maximum video height
#or when the original is smaller than that the original height #or when the original is smaller than that the original height
#check for multiple by 8 #check for multiple by 8
$vheight = $vmaxheight <= $height ? $vmaxheight : int($height/8 + .5)*8; $vheight = $vmaxheight <= $height ? $vmaxheight : int($height/8 + .5)*8;
$vwidth = int($vheight*($width/$height)/8 + .5)*8; $vwidth = int($vheight*($width/$height)/8 + .5)*8;
$abitrate = 64; $abitrate = 64;
$vbitrate = int($filesize*8) / $duration + .5) - $abitrate; $vbitrate = int($filesize*8) / $duration + .5) - $abitrate;
#TODO: add metadata information #TODO: add metadata information
system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id /tmp/$id"; system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id /tmp/$id";
appendlog $id, $audio, $video, $vwidth, $vheight, $fps, $duration, $sha; appendlog $id, $audio, $video, $vwidth, $vheight, $fps, $duration, $sha;
$filesize = -s "$root/videos/$id"; $filesize = -s "$root/videos/$id";
#add video to videos table #add video to videos table
$dbh->do(qq{insert into videos select id, title, description, userid, timestamp, creator, $dbh->do(qq{insert into videos select id, title, description, userid, timestamp, creator,
subject, source, language, coverage, rights, license, ?, ?, ?, ?, ?, ?, 0, 0 subject, source, language, coverage, rights, license, ?, ?, ?, ?, ?, ?, 0, 0
from uploaded where id = ?}, undef, $filesize, $duration, $vwidth, from uploaded where id = ?}, undef, $filesize, $duration, $vwidth,
$vheight, $fps, $sha, $id) or interrupt $dbh->errstr; $vheight, $fps, $sha, $id) or interrupt $dbh->errstr;
#delete temp file #delete temp file
unlink "/tmp/$id"; unlink "/tmp/$id";
} }
#create torrent file #create torrent file
#delete from uploaded table #delete from uploaded table
$dbh->do(qq{delete from uploaded where id = ?}, undef, $id) or interrupt $dbh->errstr; $dbh->do(qq{delete from uploaded where id = ?}, undef, $id) or interrupt $dbh->errstr;
} }
} }
} }
} }
else else
{ {
TODO: maybe make this event-driven by using the kernels has-this-file-changed-interface ? TODO: maybe make this event-driven by using the kernels has-this-file-changed-interface ?
sleep 10; sleep 10;
} }
} }

View file

@ -13,15 +13,15 @@ $sth = $dbh->prepare("select subject from videos");
$sth->execute(); $sth->execute();
while(($subject) = $sth->fetchrow_array()) while(($subject) = $sth->fetchrow_array())
{ {
@subject = split(' ', $subject); @subject = split(' ', $subject);
foreach my $val (@subject) foreach my $val (@subject)
{ {
$val =~ s/^\s*(.*?)\s*$/$1/; $val =~ s/^\s*(.*?)\s*$/$1/;
if(length($val) >= 4) if(length($val) >= 4)
{ {
%hash->{$val}++; %hash->{$val}++;
} }
} }
} }
$sth->finish(); $sth->finish();
@ -31,5 +31,5 @@ $dbh->do("delete from tagcloud");
$sth = $dbh->prepare("insert into tagcloud (text, count) values (?, ?)"); $sth = $dbh->prepare("insert into tagcloud (text, count) values (?, ?)");
for($i=0;$i<20 and $i<=$#sorted;$i++) for($i=0;$i<20 and $i<=$#sorted;$i++)
{ {
$sth->execute( $sorted[$i], %hash->{$sorted[$i]} ); $sth->execute( $sorted[$i], %hash->{$sorted[$i]} );
} }

View file

@ -40,7 +40,7 @@ getopts('u:p:f:t:d:x:c:s:l:v:', \%opts);
unless (defined $opts{u}) { unless (defined $opts{u}) {
unless (length USER) { unless (length USER) {
preamble(); preamble();
print "Username was neither defined nor passed as an argument\n"; print "Username was neither defined nor passed as an argument\n";
print "Use -u switch to specify the username\n"; print "Use -u switch to specify the username\n";
print "Example: -u joe_random\n"; print "Example: -u joe_random\n";
exit 1; exit 1;
@ -97,8 +97,8 @@ print "Getting sid cookie...\n";
$response = $ua->request(GET $url); $response = $ua->request(GET $url);
unless($response->is_success) unless($response->is_success)
{ {
die "Failed opening $url: ", die "Failed opening $url: ",
$response->status_line; $response->status_line;
} }
print "Logging in to $url/login.pl...\n"; print "Logging in to $url/login.pl...\n";
@ -106,33 +106,33 @@ print "Logging in to $url/login.pl...\n";
$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)
{ {
die "Failed logging in: ", die "Failed logging in: ",
$response->status_line; $response->status_line;
} }
unless($response->content =~ /action=logout/) unless($response->content =~ /action=logout/)
{ {
die "Failed logging in: username/password do not match"; die "Failed logging in: username/password do not match";
} }
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 ) # 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" => [
file => [$opts{f}], file => [$opts{f}],
"DC.Title" => $opts{t}, "DC.Title" => $opts{t},
"DC.Description" => $opts{d}, "DC.Description" => $opts{d},
"DC.Subject" => $opts{x}, "DC.Subject" => $opts{x},
"DC.Creator" => $opts{c} ? $opts{c} : "", "DC.Creator" => $opts{c} ? $opts{c} : "",
"DC.Source" => $opts{s} ? $opts{s} : "", "DC.Source" => $opts{s} ? $opts{s} : "",
"DC.Language" => $opts{l} ? $opts{l} : "", "DC.Language" => $opts{l} ? $opts{l} : "",
"DC.Coverage" => $opts{v} ? $opts{v} : "", "DC.Coverage" => $opts{v} ? $opts{v} : "",
] ]
); );
unless($response->is_success) unless($response->is_success)
{ {
die "Failed uploading: ", die "Failed uploading: ",
$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 ) # DONT PRINT THIS - UNIX PHILOSPHY IS: IF IT WORKS DONT DISPLAY SHIT ! ( maybe add a -v switch )