q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=800dbda6a670f71ace1f4ebf06d36e895a403ce8

commit 800dbda6a670f71ace1f4ebf06d36e895a403ce8
Author: Daniel Kolesa <[email protected]>
Date:   Wed Aug 31 15:50:31 2016 +0100

    docs: separate auto/user from root namespace
---
 src/scripts/elua/apps/docgen/keyref.lua |  2 +-
 src/scripts/elua/apps/docgen/util.lua   |  6 +++---
 src/scripts/elua/apps/docgen/writer.lua | 12 ++++++++++--
 src/scripts/elua/apps/gendoc.lua        |  2 +-
 4 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/scripts/elua/apps/docgen/keyref.lua 
b/src/scripts/elua/apps/docgen/keyref.lua
index 6a22ed0..832f00a 100644
--- a/src/scripts/elua/apps/docgen/keyref.lua
+++ b/src/scripts/elua/apps/docgen/keyref.lua
@@ -29,7 +29,7 @@ M.build = function()
         f:finish()
         local lf = writer.Writer({ "ref", lang, "keyword-link" })
         lf:write_raw("/", dutil.path_join(
-            dutil.nspace_to_path(dutil.get_root_ns()),
+            dutil.nspace_to_path(dutil.get_root_ns()), "auto",
             "ref", lang, "key", "{FNAME}"
         ))
         lf:write_nl()
diff --git a/src/scripts/elua/apps/docgen/util.lua 
b/src/scripts/elua/apps/docgen/util.lua
index b23afbc..b8a0aa2 100644
--- a/src/scripts/elua/apps/docgen/util.lua
+++ b/src/scripts/elua/apps/docgen/util.lua
@@ -23,7 +23,7 @@ M.nspace_to_path = function(ns)
 end
 
 M.make_page = function(path)
-    return M.path_join(doc_root, path .. ".txt")
+    return M.path_join(doc_root, "auto", path .. ".txt")
 end
 
 M.get_root_ns = function()
@@ -31,7 +31,7 @@ M.get_root_ns = function()
 end
 
 M.mkdir_r = function(dirn)
-    assert(cutil.file_mkpath(dirn and M.path_join(doc_root, dirn) or doc_root))
+    assert(cutil.file_mkpath(M.path_join(doc_root, "auto", dirn)))
 end
 
 M.mkdir_p = function(path)
@@ -39,7 +39,7 @@ M.mkdir_p = function(path)
 end
 
 M.rm_root = function()
-    cutil.file_rmrf(doc_root)
+    cutil.file_rmrf(M.path_join(doc_root, "auto"))
 end
 
 M.str_split = function(str, delim)
diff --git a/src/scripts/elua/apps/docgen/writer.lua 
b/src/scripts/elua/apps/docgen/writer.lua
index 91d683e..10f5d66 100644
--- a/src/scripts/elua/apps/docgen/writer.lua
+++ b/src/scripts/elua/apps/docgen/writer.lua
@@ -96,7 +96,11 @@ M.Writer = util.Object:clone {
         if type(name) == "table" then
             if name[#name] == true then
                 name[#name] = nil
-                name = ":" .. root_nspace .. ":"
+                name = ":" .. root_nspace .. ":auto:"
+                           .. table.concat(name, ":")
+            elseif name[#name] == false then
+                name[#name] = nil
+                name = ":" .. root_nspace .. ":user:"
                            .. table.concat(name, ":")
             else
                 name = table.concat(name, ":")
@@ -222,7 +226,11 @@ M.Writer = util.Object:clone {
         if type(target) == "table" then
             if target[#target] == true then
                 target[#target] = nil
-                target = ":" .. root_nspace .. ":"
+                target = ":" .. root_nspace .. ":auto:"
+                             .. table.concat(target, ":")
+            elseif target[#target] == false then
+                target[#target] = nil
+                target = ":" .. root_nspace .. ":user:"
                              .. table.concat(target, ":")
             else
                 target = table.concat(target, ":")
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 75b6aad..9854c76 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -1076,7 +1076,7 @@ getopt.parse {
             set_theme(opts["graph-theme"])
         end
         local rootns = (not opts["n"] or opts["n"] == "")
-            and "docs:efl:auto" or opts["n"]
+            and "docs:efl" or opts["n"]
         local dr
         if not opts["r"] or opts["r"] == "" then
             dr = "dokuwiki/data/pages"

-- 


Reply via email to