[jenkinscat-docs] master: Support for normal book processing. (3b16a0d)

immanetize at fedoraproject.org immanetize at fedoraproject.org
Fri Feb 6 07:41:07 UTC 2015


Repository : http://git.fedorahosted.org/cgit/jenkinscat-docs.git

On branch  : master

>---------------------------------------------------------------

commit 3b16a0d058b0da158949e3920ac5a8d1fb22821b
Author: Pavel Tisnovsky <ptisnovs at redhat.com>
Date:   Wed Jan 21 11:49:55 2015 +0100

    Support for normal book processing.


>---------------------------------------------------------------

 ChangeLog                       |    5 +++
 tools/create_books_clj_file.lua |   60 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 42135b0..6a4cb4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-21  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* tools/create_books_clj_file.lua:
+	Support for normal book processing.
+
 2015-01-20  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* tools/create_books_clj_file.lua:
diff --git a/tools/create_books_clj_file.lua b/tools/create_books_clj_file.lua
index 54abbaa..bc7e979 100644
--- a/tools/create_books_clj_file.lua
+++ b/tools/create_books_clj_file.lua
@@ -206,6 +206,11 @@ function readValueFromPublicanCfg(line, name)
     return line:sub(name:len()):trim():gsub("\"", ""):gsub("_", " ")
 end
 
+
+
+--
+--
+--
 function readDocumentInfoFromPublicanCfg(jobDirectory)
     local publicanCfgFile = jobDirectory .. "/workspace/publican.cfg"
 
@@ -598,6 +603,61 @@ end
 --
 --
 --
+function printJobs(jobType, allJobs)
+    print("List of " .. jobType .. " jobs:")
+    for i,job in ipairs(allJobs) do
+        --if job.bugzillaProductName and job.bugzillaProductName ~= "" then
+        print(i, job.name, job.documentTitle, job.documentType, job.productName, job.productVersion, job.git_repo, job.bugzillaProductName, job.bugzillaComponentName)
+        --end
+    end
+end
+
+
+
+--
+--
+--
+function selectNormalJobs(allJobs)
+    local normalJobs = {}
+    for i,job in ipairs(allJobs) do
+        local jobName = job.name
+        if job.name ~= "doc-FuseSource-ActiveMQDocs" and
+           not string.endsWith(job.name, "(test)") and
+           not (string.startsWith(job.name, "doc-") and string.endsWith(job.name, "(html)")) then
+            table.insert(normalJobs, job)
+        end
+    end
+    return normalJobs
+end
+
+
+
+--
+--
+--
+function fileExists(filename)
+    local file = io.open(filename, "r")
+    if file ~= nil then
+        io.close(file)
+        return true
+    else
+        return false
+    end
+end
+
+
+
+--
+-- Format input HTML file by using xmllint tool.
+-- We need to set the variable XMLLINT_INDENT to empty string because Jive/Mojo
+-- does not like indented HTML (it inserts empty <p>...</p> as a replacement for spaces)
+--
+function formatHTML(originalFileName, formattedFileName)
+    os.execute("export XMLLINT_INDENT='';xmllint --format " .. originalFileName .. " > " .. formattedFileName)
+end
+
+
+
 --
 --
 --



More information about the docs-commits mailing list