Merge pull request #2819 from Elv13/no_space_in_doc

Change the URL in the doc again to avoid spaces
This commit is contained in:
Emmanuel Lepage Vallée 2019-07-11 19:45:18 -04:00 committed by GitHub
commit 07f2c3270f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 105 additions and 104 deletions

View File

@ -69,19 +69,19 @@ local function path_to_module(path)
end
local modtypes = {
classmod = true,
widgetmod = true,
containermod = true,
layoutmod = true,
coreclassmod = true,
popupmod = true,
classmod = "classes",
widgetmod = "widgets",
containermod = "widget_containers",
layoutmod = "widget_layouts",
coreclassmod = "core_components",
popupmod = "popups_and_bars",
module = "libraries",
submodule = "libraries",
utillib = "utility_libraries",
themelib = "theme_related_libraries",
}
local libtypes = {
module = true,
submodule = true,
utillib = true,
themelib = true,
}
function module.path_to_html(path)
@ -95,12 +95,7 @@ function module.path_to_html(path)
if modtypes[tag] then
f:close()
return "../classes/".. mod ..".html#"
end
if libtypes[tag] then
f:close()
return "../libraries/".. mod ..".html#"
return "../"..modtypes[tag].."/".. mod ..".html#"
end
end
f:close()

View File

@ -9,7 +9,7 @@ local matcher, matcher2 = "(.*)", ".*"
-- merged into one documentation page (aka, awful.client doesn't have content
-- anymore). This override the path so the parser doesn't have to be aware of it
function parser.path_to_html()
return "../classes/client.html#client."
return "../core_components/client.html#"
end
local clientruleproperty = parser.parse_files(files, "clientruleproperty", matcher, matcher2)

View File

@ -3,70 +3,70 @@
-- <th align='center'>Name</th>
-- <th align='center'>Description</th>
-- </tr>
-- <tr><td><a href='../classes/client.html#client.placement'>placement</a></td><td>The client default placement on the screen</td></tr>
-- <tr><td><a href='../classes/client.html#client.honor_padding'>honor\_padding</a></td><td>When applying the placement, honor the screen padding</td></tr>
-- <tr><td><a href='../classes/client.html#client.honor_workarea'>honor\_workarea</a></td><td>When applying the placement, honor the screen work area</td></tr>
-- <tr><td><a href='../classes/client.html#client.tag'>tag</a></td><td>The client default tag</td></tr>
-- <tr><td><a href='../classes/client.html#client.tags'>tags</a></td><td>The client default tags</td></tr>
-- <tr><td><a href='../classes/client.html#client.new_tag'>new\_tag</a></td><td>Create a new tag for this client</td></tr>
-- <tr><td><a href='../classes/client.html#client.switch_to_tags'>switch\_to\_tags</a></td><td>Unselect the current tags and select this client tags</td></tr>
-- <tr><td><a href='../classes/client.html#client.focus'>focus</a></td><td>Define if the client should grab focus by default</td></tr>
-- <tr><td><a href='../classes/client.html#client.titlebars_enabled'>titlebars\_enabled</a></td><td>Should this client have a titlebar by default</td></tr>
-- <tr><td><a href='../classes/client.html#client.callback'>callback</a></td><td>A function to call when this client is ready</td></tr>
-- <tr><td><a href='../classes/client.html#client.marked'>marked</a></td><td>If a client is marked or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.is_fixed'>is\_fixed</a></td><td>Return if a client has a fixed size or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.immobilized_horizontal'>immobilized\_horizontal</a></td><td>Is the client immobilized horizontally?</td></tr>
-- <tr><td><a href='../classes/client.html#client.immobilized_vertical'>immobilized\_vertical</a></td><td>Is the client immobilized vertically?</td></tr>
-- <tr><td><a href='../classes/client.html#client.floating'>floating</a></td><td>The client floating state</td></tr>
-- <tr><td><a href='../classes/client.html#client.x'>x</a></td><td>The x coordinates</td></tr>
-- <tr><td><a href='../classes/client.html#client.y'>y</a></td><td>The y coordinates</td></tr>
-- <tr><td><a href='../classes/client.html#client.width'>width</a></td><td>The width of the client</td></tr>
-- <tr><td><a href='../classes/client.html#client.height'>height</a></td><td>The height of the client</td></tr>
-- <tr><td><a href='../classes/client.html#client.dockable'>dockable</a></td><td>If the client is dockable</td></tr>
-- <tr><td><a href='../classes/client.html#client.requests_no_titlebar'>requests\_no\_titlebar</a></td><td>If the client requests not to be decorated with a titlebar</td></tr>
-- <tr><td><a href='../classes/client.html#client.shape'>shape</a></td><td>Set the client shape</td></tr>
-- <tr><td><a href='../classes/client.html#client.window'>window</a></td><td>The X window id</td></tr>
-- <tr><td><a href='../classes/client.html#client.name'>name</a></td><td>The client title</td></tr>
-- <tr><td><a href='../classes/client.html#client.skip_taskbar'>skip\_taskbar</a></td><td>True if the client does not want to be in taskbar</td></tr>
-- <tr><td><a href='../classes/client.html#client.type'>type</a></td><td>The window type</td></tr>
-- <tr><td><a href='../classes/client.html#client.class'>class</a></td><td>The client class</td></tr>
-- <tr><td><a href='../classes/client.html#client.instance'>instance</a></td><td>The client instance</td></tr>
-- <tr><td><a href='../classes/client.html#client.pid'>pid</a></td><td>The client PID, if available</td></tr>
-- <tr><td><a href='../classes/client.html#client.role'>role</a></td><td>The window role, if available</td></tr>
-- <tr><td><a href='../classes/client.html#client.machine'>machine</a></td><td>The machine client is running on</td></tr>
-- <tr><td><a href='../classes/client.html#client.icon_name'>icon\_name</a></td><td>The client name when iconified</td></tr>
-- <tr><td><a href='../classes/client.html#client.icon'>icon</a></td><td>The client icon as a surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.icon_sizes'>icon\_sizes</a></td><td>The available sizes of client icons</td></tr>
-- <tr><td><a href='../classes/client.html#client.screen'>screen</a></td><td>Client screen</td></tr>
-- <tr><td><a href='../classes/client.html#client.hidden'>hidden</a></td><td>Define if the client must be hidden, i</td></tr>
-- <tr><td><a href='../classes/client.html#client.minimized'>minimized</a></td><td>Define it the client must be iconify, i</td></tr>
-- <tr><td><a href='../classes/client.html#client.size_hints_honor'>size\_hints\_honor</a></td><td>Honor size hints, e</td></tr>
-- <tr><td><a href='../classes/client.html#client.border_width'>border\_width</a></td><td>The client border width</td></tr>
-- <tr><td><a href='../classes/client.html#client.border_color'>border\_color</a></td><td>The client border color</td></tr>
-- <tr><td><a href='../classes/client.html#client.urgent'>urgent</a></td><td>The client urgent state</td></tr>
-- <tr><td><a href='../classes/client.html#client.content'>content</a></td><td>A cairo surface for the client window content</td></tr>
-- <tr><td><a href='../classes/client.html#client.opacity'>opacity</a></td><td>The client opacity</td></tr>
-- <tr><td><a href='../classes/client.html#client.ontop'>ontop</a></td><td>The client is on top of every other windows</td></tr>
-- <tr><td><a href='../classes/client.html#client.above'>above</a></td><td>The client is above normal windows</td></tr>
-- <tr><td><a href='../classes/client.html#client.below'>below</a></td><td>The client is below normal windows</td></tr>
-- <tr><td><a href='../classes/client.html#client.fullscreen'>fullscreen</a></td><td>The client is fullscreen or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.maximized'>maximized</a></td><td>The client is maximized (horizontally and vertically) or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.maximized_horizontal'>maximized\_horizontal</a></td><td>The client is maximized horizontally or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.maximized_vertical'>maximized\_vertical</a></td><td>The client is maximized vertically or not</td></tr>
-- <tr><td><a href='../classes/client.html#client.transient_for'>transient\_for</a></td><td>The client the window is transient for</td></tr>
-- <tr><td><a href='../classes/client.html#client.group_window'>group\_window</a></td><td>Window identification unique to a group of windows</td></tr>
-- <tr><td><a href='../classes/client.html#client.leader_window'>leader\_window</a></td><td>Identification unique to windows spawned by the same command</td></tr>
-- <tr><td><a href='../classes/client.html#client.size_hints'>size\_hints</a></td><td>A table with size hints of the client</td></tr>
-- <tr><td><a href='../classes/client.html#client.motif_wm_hints'>motif\_wm\_hints</a></td><td>The motif WM hints of the client</td></tr>
-- <tr><td><a href='../classes/client.html#client.sticky'>sticky</a></td><td>Set the client sticky, i</td></tr>
-- <tr><td><a href='../classes/client.html#client.modal'>modal</a></td><td>Indicate if the client is modal</td></tr>
-- <tr><td><a href='../classes/client.html#client.focusable'>focusable</a></td><td>True if the client can receive the input focus</td></tr>
-- <tr><td><a href='../classes/client.html#client.shape_bounding'>shape\_bounding</a></td><td>The client's bounding shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.shape_clip'>shape\_clip</a></td><td>The client's clip shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.shape_input'>shape\_input</a></td><td>The client's input shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.client_shape_bounding'>client\_shape\_bounding</a></td><td>The client's bounding shape as set by the program as a (native) cairo surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.client_shape_clip'>client\_shape\_clip</a></td><td>The client's clip shape as set by the program as a (native) cairo surface</td></tr>
-- <tr><td><a href='../classes/client.html#client.startup_id'>startup\_id</a></td><td>The FreeDesktop StartId</td></tr>
-- <tr><td><a href='../classes/client.html#client.valid'>valid</a></td><td>If the client that this object refers to is still managed by awesome</td></tr>
-- <tr><td><a href='../classes/client.html#client.first_tag'>first\_tag</a></td><td>The first tag of the client</td></tr>
-- <tr><td><a href='../core_components/client.html#placement'>placement</a></td><td>The client default placement on the screen</td></tr>
-- <tr><td><a href='../core_components/client.html#honor_padding'>honor\_padding</a></td><td>When applying the placement, honor the screen padding</td></tr>
-- <tr><td><a href='../core_components/client.html#honor_workarea'>honor\_workarea</a></td><td>When applying the placement, honor the screen work area</td></tr>
-- <tr><td><a href='../core_components/client.html#tag'>tag</a></td><td>The client default tag</td></tr>
-- <tr><td><a href='../core_components/client.html#tags'>tags</a></td><td>The client default tags</td></tr>
-- <tr><td><a href='../core_components/client.html#new_tag'>new\_tag</a></td><td>Create a new tag for this client</td></tr>
-- <tr><td><a href='../core_components/client.html#switch_to_tags'>switch\_to\_tags</a></td><td>Unselect the current tags and select this client tags</td></tr>
-- <tr><td><a href='../core_components/client.html#focus'>focus</a></td><td>Define if the client should grab focus by default</td></tr>
-- <tr><td><a href='../core_components/client.html#titlebars_enabled'>titlebars\_enabled</a></td><td>Should this client have a titlebar by default</td></tr>
-- <tr><td><a href='../core_components/client.html#callback'>callback</a></td><td>A function to call when this client is ready</td></tr>
-- <tr><td><a href='../core_components/client.html#marked'>marked</a></td><td>If a client is marked or not</td></tr>
-- <tr><td><a href='../core_components/client.html#is_fixed'>is\_fixed</a></td><td>Return if a client has a fixed size or not</td></tr>
-- <tr><td><a href='../core_components/client.html#immobilized_horizontal'>immobilized\_horizontal</a></td><td>Is the client immobilized horizontally?</td></tr>
-- <tr><td><a href='../core_components/client.html#immobilized_vertical'>immobilized\_vertical</a></td><td>Is the client immobilized vertically?</td></tr>
-- <tr><td><a href='../core_components/client.html#floating'>floating</a></td><td>The client floating state</td></tr>
-- <tr><td><a href='../core_components/client.html#x'>x</a></td><td>The x coordinates</td></tr>
-- <tr><td><a href='../core_components/client.html#y'>y</a></td><td>The y coordinates</td></tr>
-- <tr><td><a href='../core_components/client.html#width'>width</a></td><td>The width of the client</td></tr>
-- <tr><td><a href='../core_components/client.html#height'>height</a></td><td>The height of the client</td></tr>
-- <tr><td><a href='../core_components/client.html#dockable'>dockable</a></td><td>If the client is dockable</td></tr>
-- <tr><td><a href='../core_components/client.html#requests_no_titlebar'>requests\_no\_titlebar</a></td><td>If the client requests not to be decorated with a titlebar</td></tr>
-- <tr><td><a href='../core_components/client.html#shape'>shape</a></td><td>Set the client shape</td></tr>
-- <tr><td><a href='../core_components/client.html#window'>window</a></td><td>The X window id</td></tr>
-- <tr><td><a href='../core_components/client.html#name'>name</a></td><td>The client title</td></tr>
-- <tr><td><a href='../core_components/client.html#skip_taskbar'>skip\_taskbar</a></td><td>True if the client does not want to be in taskbar</td></tr>
-- <tr><td><a href='../core_components/client.html#type'>type</a></td><td>The window type</td></tr>
-- <tr><td><a href='../core_components/client.html#class'>class</a></td><td>The client class</td></tr>
-- <tr><td><a href='../core_components/client.html#instance'>instance</a></td><td>The client instance</td></tr>
-- <tr><td><a href='../core_components/client.html#pid'>pid</a></td><td>The client PID, if available</td></tr>
-- <tr><td><a href='../core_components/client.html#role'>role</a></td><td>The window role, if available</td></tr>
-- <tr><td><a href='../core_components/client.html#machine'>machine</a></td><td>The machine client is running on</td></tr>
-- <tr><td><a href='../core_components/client.html#icon_name'>icon\_name</a></td><td>The client name when iconified</td></tr>
-- <tr><td><a href='../core_components/client.html#icon'>icon</a></td><td>The client icon as a surface</td></tr>
-- <tr><td><a href='../core_components/client.html#icon_sizes'>icon\_sizes</a></td><td>The available sizes of client icons</td></tr>
-- <tr><td><a href='../core_components/client.html#screen'>screen</a></td><td>Client screen</td></tr>
-- <tr><td><a href='../core_components/client.html#hidden'>hidden</a></td><td>Define if the client must be hidden, i</td></tr>
-- <tr><td><a href='../core_components/client.html#minimized'>minimized</a></td><td>Define it the client must be iconify, i</td></tr>
-- <tr><td><a href='../core_components/client.html#size_hints_honor'>size\_hints\_honor</a></td><td>Honor size hints, e</td></tr>
-- <tr><td><a href='../core_components/client.html#border_width'>border\_width</a></td><td>The client border width</td></tr>
-- <tr><td><a href='../core_components/client.html#border_color'>border\_color</a></td><td>The client border color</td></tr>
-- <tr><td><a href='../core_components/client.html#urgent'>urgent</a></td><td>The client urgent state</td></tr>
-- <tr><td><a href='../core_components/client.html#content'>content</a></td><td>A cairo surface for the client window content</td></tr>
-- <tr><td><a href='../core_components/client.html#opacity'>opacity</a></td><td>The client opacity</td></tr>
-- <tr><td><a href='../core_components/client.html#ontop'>ontop</a></td><td>The client is on top of every other windows</td></tr>
-- <tr><td><a href='../core_components/client.html#above'>above</a></td><td>The client is above normal windows</td></tr>
-- <tr><td><a href='../core_components/client.html#below'>below</a></td><td>The client is below normal windows</td></tr>
-- <tr><td><a href='../core_components/client.html#fullscreen'>fullscreen</a></td><td>The client is fullscreen or not</td></tr>
-- <tr><td><a href='../core_components/client.html#maximized'>maximized</a></td><td>The client is maximized (horizontally and vertically) or not</td></tr>
-- <tr><td><a href='../core_components/client.html#maximized_horizontal'>maximized\_horizontal</a></td><td>The client is maximized horizontally or not</td></tr>
-- <tr><td><a href='../core_components/client.html#maximized_vertical'>maximized\_vertical</a></td><td>The client is maximized vertically or not</td></tr>
-- <tr><td><a href='../core_components/client.html#transient_for'>transient\_for</a></td><td>The client the window is transient for</td></tr>
-- <tr><td><a href='../core_components/client.html#group_window'>group\_window</a></td><td>Window identification unique to a group of windows</td></tr>
-- <tr><td><a href='../core_components/client.html#leader_window'>leader\_window</a></td><td>Identification unique to windows spawned by the same command</td></tr>
-- <tr><td><a href='../core_components/client.html#size_hints'>size\_hints</a></td><td>A table with size hints of the client</td></tr>
-- <tr><td><a href='../core_components/client.html#motif_wm_hints'>motif\_wm\_hints</a></td><td>The motif WM hints of the client</td></tr>
-- <tr><td><a href='../core_components/client.html#sticky'>sticky</a></td><td>Set the client sticky, i</td></tr>
-- <tr><td><a href='../core_components/client.html#modal'>modal</a></td><td>Indicate if the client is modal</td></tr>
-- <tr><td><a href='../core_components/client.html#focusable'>focusable</a></td><td>True if the client can receive the input focus</td></tr>
-- <tr><td><a href='../core_components/client.html#shape_bounding'>shape\_bounding</a></td><td>The client's bounding shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../core_components/client.html#shape_clip'>shape\_clip</a></td><td>The client's clip shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../core_components/client.html#shape_input'>shape\_input</a></td><td>The client's input shape as set by awesome as a (native) cairo surface</td></tr>
-- <tr><td><a href='../core_components/client.html#client_shape_bounding'>client\_shape\_bounding</a></td><td>The client's bounding shape as set by the program as a (native) cairo surface</td></tr>
-- <tr><td><a href='../core_components/client.html#client_shape_clip'>client\_shape\_clip</a></td><td>The client's clip shape as set by the program as a (native) cairo surface</td></tr>
-- <tr><td><a href='../core_components/client.html#startup_id'>startup\_id</a></td><td>The FreeDesktop StartId</td></tr>
-- <tr><td><a href='../core_components/client.html#valid'>valid</a></td><td>If the client that this object refers to is still managed by awesome</td></tr>
-- <tr><td><a href='../core_components/client.html#first_tag'>first\_tag</a></td><td>The first tag of the client</td></tr>
-- </table>

View File

@ -100,12 +100,12 @@ sort_modules=true
-- Add more project level (left side index) types.
new_type("widgetmod" , "Widgets" , true)
new_type("containermod", "Widget containers", true)
new_type("layoutmod" , "Widget layouts" , true)
new_type("coreclassmod", "Core components" , true)
new_type("popupmod" , "Popups and bars" , true)
new_type("utillib" , "Utility libraries", true)
new_type("themelib" , "Theme related libraries", true)
new_type("containermod", "Widget_containers", true)
new_type("layoutmod" , "Widget_layouts" , true)
new_type("coreclassmod", "Core_components" , true)
new_type("popupmod" , "Popups_and_bars" , true)
new_type("utillib" , "Utility_libraries", true)
new_type("themelib" , "Theme_related_libraries", true)
file = {
-- C parts of libraries

View File

@ -15,9 +15,9 @@
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
@ -30,6 +30,7 @@
# local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end
# local nowrap = ldoc.wrap and '' or 'nowrap'
# local html_space = function(s) return s:gsub(" ", "%%20") end
# local no_underscores = function(s) return s:gsub("_", " ") end
<!-- Menu -->
@ -68,7 +69,7 @@
# local this_mod = module and module.name
# for kind, mods, type in ldoc.kinds() do
# if ldoc.allowed_in_contents(type,module) then
<h2>$(kind)</h2>
<h2>$(no_underscores(kind))</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap')">
# for mod in mods() do local name = display_name(mod)
# if mod.name == this_mod then
@ -130,15 +131,15 @@
# for item in items() do
# local dn = display_name(item)
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
<tr>
<tr>
# if item.display_type then
<td class="shortname" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
<td class="summarytype" nowrap>$(item.display_type)</td>
<td class="shortname" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
<td class="summarytype" nowrap>$(item.display_type)</td>
# else
<td class="name" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
<td class="name" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
# end
<td class="summary">$(M(item.summary,item))</td>
</tr>
<td class="summary">$(M(item.summary,item))</td>
</tr>
# end -- for items
</table>
#end -- for kinds
@ -305,10 +306,10 @@
# kind = kind:lower()
<table class="module_list">
# for m in mods() do
<tr>
<td class="name" $(nowrap)><a href="$(html_space(kind))/$(m.name).html">$(m.name)</a></td>
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
</tr>
<tr>
<td class="name" $(nowrap)><a href="$(html_space(kind))/$(m.name).html">$(m.name)</a></td>
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
</tr>
# end -- for modules
</table>
# end -- for kinds

View File

@ -4,11 +4,16 @@
# Ldoc wont parse the HTML content and discount tables are disabled, so here is
# some raw HTML
function(add_to_table name namespace group current_table new_table)
set(URI_PATH "${group}")
if(NOT ${URI_PATH} STREQUAL "widget")
set(URI_PATH "widget_${group}")
endif()
set(${new_table} "${current_table}\n\
<tr>\n\
<td>
<a href='../classes/${namespace}${name}.html'>${namespace}${name}</a>
<a href='../${URI_PATH}s/${namespace}${name}.html'>${namespace}${name}</a>
</td>\n\
<td><img src='../images/AUTOGEN_wibox_${group}_defaults_${name}.svg' /></td>\n\
</tr>\n\