Upgraded to latest svjatoslav-commons.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Thu, 17 Jul 2014 20:27:15 +0000 (23:27 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Thu, 17 Jul 2014 20:27:15 +0000 (23:27 +0300)
Removed java applet fallback mode for OGV videos, we assume sane browser from now on.

pom.xml
src/main/java/eu/svjatoslav/meviz/bomremove/Main.java
src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java
src/main/java/eu/svjatoslav/meviz/textsplitter/Main.java
src/main/java/eu/svjatoslav/meviz/texttruncate/Main.java

diff --git a/pom.xml b/pom.xml
index 3e78e15..69c73bb 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,7 @@
                <dependency>
                        <groupId>eu.svjatoslav</groupId>
                        <artifactId>svjatoslavcommons</artifactId>
-                       <version>1.2-SNAPSHOT</version>
+                       <version>1.3</version>
                </dependency>
 
                <dependency>
index 05251ee..9eed788 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
  * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
  * as published by the Free Software Foundation.
index 29e5b00..9585215 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
  * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
  * as published by the Free Software Foundation.
@@ -118,7 +118,7 @@ public class MixedLayout implements Layout {
                                        + "\"/></a>\n");
                        filesHtml.append("<br/><b>"
                                        + FilePathParser
-                                                       .getFileNameWithoutExtension(picture.fileName)
+                                       .getFileNameWithoutExtension(picture.fileName)
                                        + "</b><br/>(");
 
                        int count = 0;
@@ -142,7 +142,7 @@ public class MixedLayout implements Layout {
                                        "Error generating thumbnails for image file: "
                                                        + e.toString()
                                                        + ", thumbnail generation skipped, enlisting as ordinary file instead.",
-                                       e);
+                                                       e);
                        enlistFile(abstractFile);
                }
        }
@@ -157,38 +157,27 @@ public class MixedLayout implements Layout {
                finishRow();
 
                filesHtml
-                               .append("<TR style=\"background-color: #404040; text-align: center\">\n");
+               .append("<TR style=\"background-color: #404040; text-align: center\">\n");
                filesHtml.append("<TD style=\"text-align: center\" colspan=\""
                                + String.valueOf(horizontalColumnsLimit) + "\">\n");
 
                filesHtml.append("<video controls=\"controls\" tabindex=\"0\">\n");
                filesHtml
-                               .append("<source type=\"video/ogg\" codecs=\"theora, vorbis\" src=\""
-                                               + indexingContext.getGlobalUrl()
-                                               + UrlParamEncoder.encode(indexingContext.getLocalUrl()
-                                                               + "/" + file.fileName) + "\">\n");
-               filesHtml.append("</source>\n");
-
-               // if browser cannot play video directry, fall back to java Applet
-               filesHtml
-                               .append("<applet code=\"com.fluendo.player.Cortado.class\" archive=\"http://theora.org/cortado.jar\" width=\"800\" height=\"600\">\n");
-               filesHtml.append("    <param name=\"url\" value=\""
+               .append("<source type=\"video/ogg\" codecs=\"theora, vorbis\" src=\""
                                + indexingContext.getGlobalUrl()
-                               + UrlParamEncoder.encode(indexingContext.getLocalUrl() + "/"
-                                               + file.fileName) + "\"/>\n");
-               filesHtml.append("    <param name=\"keepAspect\" value=\"true\"/>\n");
-               filesHtml.append("    <param name=\"autoPlay\" value=\"false\"/>\n");
-               filesHtml.append("</applet>\n");
+                               + UrlParamEncoder.encode(indexingContext.getLocalUrl()
+                                               + "/" + file.fileName) + "\">\n");
+               filesHtml.append("</source>\n");
 
                filesHtml.append("</video>\n");
 
                filesHtml.append("<br/>\n");
 
                filesHtml
-                               .append("Video: <b>"
-                                               + FilePathParser
-                                                               .getFileNameWithoutExtension(file.fileName)
-                                               + "<b/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
+               .append("Video: <b>"
+                               + FilePathParser
+                               .getFileNameWithoutExtension(file.fileName)
+                               + "<b/>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
                filesHtml.append("<a href=\""
                                + indexingContext.getGlobalUrl()
                                + UrlParamEncoder.encode(indexingContext.getLocalUrl() + "/"
@@ -230,10 +219,10 @@ public class MixedLayout implements Layout {
                        finalHtml.append("<HTML>\n");
                        finalHtml.append("<HEAD>\n");
                        finalHtml
-                                       .append("    <meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\"/>\n");
+                       .append("    <meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\"/>\n");
                        finalHtml.append("</HEAD>\n");
                        finalHtml
-                                       .append("<BODY bgcolor=\"#000000\" alink=\"#50ffff\" link=\"#50ffff\" vlink=\"#ff50ff\" text=\"#ffffff\">\n");
+                       .append("<BODY bgcolor=\"#000000\" alink=\"#50ffff\" link=\"#50ffff\" vlink=\"#ff50ff\" text=\"#ffffff\">\n");
                        finalHtml.append("<!-- " + Constants.HTML_MAGIC_STRING + " -->\n");
                        finalHtml.append("<!-- " + Constants.HTML_MEMO + " -->\n");
                        finalHtml.append("<font color=\"#ffffff\">\n");
@@ -241,7 +230,7 @@ public class MixedLayout implements Layout {
 
                if (showTitle)
                        finalHtml
-                                       .append("<CENTER><H1>" + galleryTitle + "</H1></CENTER>\n");
+                       .append("<CENTER><H1>" + galleryTitle + "</H1></CENTER>\n");
 
                finalHtml.append("<CENTER><H2>");
                for (final String p : path)
index e2b85cb..5d8082e 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
  * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
  * as published by the Free Software Foundation.
@@ -17,7 +17,7 @@ import java.io.FileWriter;
 import java.io.IOException;
 
 import eu.svjatoslav.commons.file.FilePathParser;
-import eu.svjatoslav.commons.string.CuttableString;
+import eu.svjatoslav.commons.string.String2;
 import eu.svjatoslav.commons.string.WildCardMatcher;
 import eu.svjatoslav.meviz.Module;
 
@@ -99,11 +99,11 @@ public class Main implements Module {
                        if (readLine == null)
                                break;
 
-                       final CuttableString cuttableString = new CuttableString(readLine);
+                       final String2 cuttableString = new String2(readLine);
 
                        while (!cuttableString.isEmpty()) {
                                for (final String pattern : options.textSplitPatterns)
-                                       if (WildCardMatcher.match(cuttableString.getValue(),
+                                       if (WildCardMatcher.match(cuttableString.toString(),
                                                        pattern))
                                                bufferedWriter.write("\n");
 
index 31f7671..a578234 100755 (executable)
@@ -1,7 +1,7 @@
 /*
  * Meviz - Various tools collection to work with multimedia.
  * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2 of the GNU General Public License
  * as published by the Free Software Foundation.
@@ -17,7 +17,7 @@ import java.io.FileWriter;
 import java.io.IOException;
 
 import eu.svjatoslav.commons.file.FilePathParser;
-import eu.svjatoslav.commons.string.CuttableString;
+import eu.svjatoslav.commons.string.String2;
 import eu.svjatoslav.commons.string.WildCardMatcher;
 import eu.svjatoslav.meviz.Module;
 
@@ -109,8 +109,7 @@ public class Main implements Module {
                                bufferedWriter.write(readLine + "\n");
                        else {
 
-                               final CuttableString cuttableString = new CuttableString(
-                                               readLine);
+                               final String2 cuttableString = new String2(readLine);
 
                                bufferedWriter.write(cuttableString.cutLeft(targetLineLength)
                                                + "\n");