updated the regex

Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/commit/3fe908aa
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/tree/3fe908aa
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/diff/3fe908aa

Branch: refs/heads/asf-site
Commit: 3fe908aaf53cd5513d7450e7267ed9b31836d82b
Parents: 87b20f3
Author: PallaviSingh1992 <pallavisingh_1...@yahoo.co.in>
Authored: Mon Apr 10 14:36:10 2017 +0530
Committer: PallaviSingh1992 <pallavisingh_1...@yahoo.co.in>
Committed: Mon Apr 10 14:36:10 2017 +0530

----------------------------------------------------------------------
 src/main/resources/application.conf             |  3 +++
 src/main/scala/MdFilehandler.scala              | 21 +++++++++++++-------
 .../webapp/ddl-operation-on-carbondata.html     |  4 ++--
 src/main/webapp/quick-start-guide.html          |  4 ++++
 4 files changed, 23 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/3fe908aa/src/main/resources/application.conf
----------------------------------------------------------------------
diff --git a/src/main/resources/application.conf 
b/src/main/resources/application.conf
index fe8f999..b321170 100644
--- a/src/main/resources/application.conf
+++ b/src/main/resources/application.conf
@@ -9,6 +9,9 @@ fileList=["configuration-parameters",
   "troubleshooting",
   "useful-tips-on-carbondata"
   ]
+fileListToRetain=["quick-start-guide",
+  "installation-guide"
+]
 headerPath="src/main/scala/html/header.html"
 footerPath="src/main/scala/html/footer.html"
 outputFileLocation="src/main/webapp/"

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/3fe908aa/src/main/scala/MdFilehandler.scala
----------------------------------------------------------------------
diff --git a/src/main/scala/MdFilehandler.scala 
b/src/main/scala/MdFilehandler.scala
index d7cb193..2d065f9 100644
--- a/src/main/scala/MdFilehandler.scala
+++ b/src/main/scala/MdFilehandler.scala
@@ -8,6 +8,7 @@ import org.apache.http.util.EntityUtils
 import org.slf4j.LoggerFactory
 
 import scala.util.matching.Regex
+import scala.collection.JavaConverters._
 
 /**
   * Created by pallavi on 4/4/17.
@@ -37,16 +38,22 @@ class MdFilehandler {
     contentAfterReplacingFileLink
   }
 
-  def ConvertReadMeExtension(): String = {
+  def ConvertReadMeExtension(): List[String] = {
+    val listOfFiles = 
ConfigFactory.load().getStringList("fileListToRetain").asScala.toList
+    logger.info(s"List of files to retain .md extensions : $listOfFiles")
     val location = ConfigFactory.load().getString("outputFileLocation")
     val outputFileExtension = ".html"
     val modifyMdPattern = new Regex("(README)(.html)")
-    val fileURLContent = 
scala.io.Source.fromFile("src/main/webapp/installation-guide.html").mkString
-    val writer = new PrintWriter(new File(location + "installation-guide" + 
outputFileExtension))
-    val fileContent = modifyMdPattern replaceAllIn(fileURLContent, "$1.md")
-    writer.write(fileContent)
-    writer.close()
-    fileContent
+
+    listOfFiles.map { file =>
+      val fileURLContent = scala.io.Source.fromFile("src/main/webapp/" + file 
+ outputFileExtension).mkString
+      val writer = new PrintWriter(new File(location + file + 
outputFileExtension))
+      val fileContent = modifyMdPattern replaceAllIn(fileURLContent, "$1.md")
+      writer.write(fileContent)
+      writer.close()
+      fileContent
+    }
+
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/3fe908aa/src/main/webapp/ddl-operation-on-carbondata.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/ddl-operation-on-carbondata.html 
b/src/main/webapp/ddl-operation-on-carbondata.html
index 4de5a4a..24346a0 100644
--- a/src/main/webapp/ddl-operation-on-carbondata.html
+++ b/src/main/webapp/ddl-operation-on-carbondata.html
@@ -449,8 +449,8 @@ of columns is used.</p>
 <pre><code>   CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
                     [(col_name data_type, ...)]
    STORED BY 'carbondata'
-   TBLPROPERTIES(?BUCKETNUMBER?=?noOfBuckets?,
-   ?BUCKETCOLUMNS?=??columnname?)
+   TBLPROPERTIES('BUCKETNUMBER'='noOfBuckets',
+   'BUCKETCOLUMNS'='columnname')
 </code></pre>
 
 <h2>

http://git-wip-us.apache.org/repos/asf/incubator-carbondata-site/blob/3fe908aa/src/main/webapp/quick-start-guide.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/quick-start-guide.html 
b/src/main/webapp/quick-start-guide.html
index 08b896b..0c58684 100644
--- a/src/main/webapp/quick-start-guide.html
+++ b/src/main/webapp/quick-start-guide.html
@@ -195,6 +195,8 @@ EOF
 <pre><code>./bin/spark-shell --jars &lt;carbondata assembly jar path&gt;
 </code></pre>
 
+<p><strong>NOTE</strong>: Assembly jar will be available after <a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.md";
 target=_blank>building CarbonData</a> and can be copied from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code></p>
+
 <p>In this shell, SparkSession is readily available as <code>spark</code> and 
Spark context is readily available as <code>sc</code>.</p>
 
 <p>In order to create a CarbonSession we will have to configure it explicitly 
in the following manner :</p>
@@ -252,6 +254,8 @@ scala&gt;carbon.sql("SELECT city, avg(age), sum(age) FROM 
test_table GROUP BY ci
 <pre><code>./bin/spark-shell --jars &lt;carbondata assembly jar path&gt;
 </code></pre>
 
+<p><strong>NOTE</strong>: Assembly jar will be available after <a 
href="https://github.com/apache/incubator-carbondata/blob/master/build/README.md";
 target=_blank>building CarbonData</a> and can be copied from 
<code>./assembly/target/scala-2.1x/carbondata_xxx.jar</code></p>
+
 <p><strong>NOTE</strong>: In this shell, SparkContext is readily available as 
<code>sc</code>.</p>
 
 <ul>

Reply via email to