knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmin...@apache.org
Subject svn commit: r1710635 [11/11] - in /knox: site/ site/books/knox-0-3-0/ site/books/knox-0-4-0/ site/books/knox-0-5-0/ site/books/knox-0-6-0/ site/books/knox-0-7-0/ site/images/ trunk/markbook/src/main/java/org/apache/hadoop/gateway/markbook/ trunk/markbo...
Date Mon, 26 Oct 2015 15:54:15 GMT
Modified: knox/site/index.html
URL: http://svn.apache.org/viewvc/knox/site/index.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/index.html (original)
+++ knox/site/index.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; REST API Gateway for the Hadoop Ecosystem</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -381,7 +381,7 @@ limitations under the License. --><div c
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/site/issue-tracking.html
URL: http://svn.apache.org/viewvc/knox/site/issue-tracking.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/issue-tracking.html (original)
+++ knox/site/issue-tracking.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; Issue Tracking</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -322,7 +322,7 @@
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/site/license.html
URL: http://svn.apache.org/viewvc/knox/site/license.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/license.html (original)
+++ knox/site/license.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; Project License</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -524,7 +524,7 @@
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/site/mail-lists.html
URL: http://svn.apache.org/viewvc/knox/site/mail-lists.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/mail-lists.html (original)
+++ knox/site/mail-lists.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; Project Mailing Lists</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -342,7 +342,7 @@
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/site/project-info.html
URL: http://svn.apache.org/viewvc/knox/site/project-info.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/project-info.html (original)
+++ knox/site/project-info.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; Project Information</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -340,7 +340,7 @@
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/site/team-list.html
URL: http://svn.apache.org/viewvc/knox/site/team-list.html?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/site/team-list.html (original)
+++ knox/site/team-list.html Mon Oct 26 15:54:14 2015
@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <!--
- | Generated by Apache Maven Doxia at 2015-10-14
+ | Generated by Apache Maven Doxia at 2015-10-26
  | Rendered using Apache Maven Fluido Skin 1.3.0
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta name="Date-Revision-yyyymmdd" content="20151014" />
+    <meta name="Date-Revision-yyyymmdd" content="20151026" />
     <meta http-equiv="Content-Language" content="en" />
     <title>Knox Gateway &#x2013; Team list</title>
     <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.0.min.css" />
@@ -58,7 +58,7 @@
               
                 
                     
-                  <li id="publishDate" class="pull-right">Last Published: 2015-10-14</li>

+                  <li id="publishDate" class="pull-right">Last Published: 2015-10-26</li>

             
                             </ul>
       </div>
@@ -491,7 +491,7 @@ window.onLoad = init();
 </div>
                                                           <?xml version="1.0" encoding="UTF-8"?>
 <div align="right" class="row span12">
-  <img src="images/apache-logo.gif" vertical-align="middle" alt="Generic placeholder image"/>
+  <img vertical-align="middle" alt="Generic placeholder image" src="images/apache-logo.gif"/>
 </div>
                   
         

Modified: knox/trunk/markbook/src/main/java/org/apache/hadoop/gateway/markbook/MarkBook.java
URL: http://svn.apache.org/viewvc/knox/trunk/markbook/src/main/java/org/apache/hadoop/gateway/markbook/MarkBook.java?rev=1710635&r1=1710634&r2=1710635&view=diff
==============================================================================
--- knox/trunk/markbook/src/main/java/org/apache/hadoop/gateway/markbook/MarkBook.java (original)
+++ knox/trunk/markbook/src/main/java/org/apache/hadoop/gateway/markbook/MarkBook.java Mon
Oct 26 15:54:14 2015
@@ -28,12 +28,14 @@ import org.apache.commons.cli.OptionBuil
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.ParseException;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.SystemUtils;
 import org.pegdown.Extensions;
 import org.pegdown.PegDownProcessor;
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.List;
 import java.util.regex.Matcher;
@@ -99,7 +101,7 @@ public class MarkBook {
   private static String loadMarkdown( CommandLine command, File inputFile, File outputFile
) throws IOException {
     String text = FileUtils.readFileToString( inputFile );
     text = removeComments( text );
-    text = replaceHeadings( text );
+    text = replaceHeadings( text, outputFile );
     text = replaceReferences( text );
     text = replaceIncludes( command, inputFile, outputFile, text );
     return text;
@@ -140,7 +142,8 @@ public class MarkBook {
     return text;
   }
 
-  private static String replaceHeadings( String text ) throws IOException {
+  private static String replaceHeadings( String text, File outputFile ) throws IOException
{
+    extractClassPathResourceToFile( "markbook-section-link.png", new File( outputFile.getParentFile(),
"markbook-section-link.png" ) );
     Pattern pattern = Pattern.compile( "^(#+)(.+?)#*$", Pattern.MULTILINE );
     Matcher matcher = pattern.matcher( text );
     while( matcher.find() ) {
@@ -148,7 +151,7 @@ public class MarkBook {
       String name = matcher.group( 2 ).trim();
       String id = id( name );
       if( !name.startsWith( "<a id=" ) ) {
-        text = replace( matcher, text, String.format( "%s <a id=\"%s\"></a>%s
%s", tag, id, name, tag ) );
+        text = replace( matcher, text, String.format( "%s <a id=\"%s\">%s</a>
<a href=\"#%s\"><img src=\"markbook-section-link.png\"/></a> %s", tag, id,
name, id, tag ) );
         matcher = pattern.matcher( text );
       }
     }
@@ -244,4 +247,10 @@ public class MarkBook {
     System.out.println( message );
   }
 
+  private static void extractClassPathResourceToFile( String resource, File file ) throws
IOException {
+    FileOutputStream output = new FileOutputStream( file );
+    IOUtils.copy( ClassLoader.getSystemResourceAsStream( resource ), output );
+    output.close();
+  }
+
 }

Added: knox/trunk/markbook/src/main/resources/markbook-section-link.png
URL: http://svn.apache.org/viewvc/knox/trunk/markbook/src/main/resources/markbook-section-link.png?rev=1710635&view=auto
==============================================================================
Binary file - no diff available.

Propchange: knox/trunk/markbook/src/main/resources/markbook-section-link.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message