|
0 |
From: Enrico Tassi <gareuselesinge@debian.org>
|
|
1 |
Date: Tue, 18 Aug 2015 11:18:01 +0200
|
|
2 |
Subject: make system date override-able via --date
|
|
3 |
|
|
4 |
---
|
|
5 |
ldoc.lua | 5 +++++
|
|
6 |
1 file changed, 5 insertions(+)
|
|
7 |
|
|
8 |
diff --git a/ldoc.lua b/ldoc.lua
|
|
9 |
index 3454bcf..3af3b2b 100644
|
|
10 |
--- a/ldoc.lua
|
|
11 |
+++ b/ldoc.lua
|
|
12 |
@@ -61,6 +61,7 @@ ldoc, a documentation generator for Lua, vs 1.4.3
|
|
13 |
-M,--merge allow module merging
|
|
14 |
-S,--simple no return or params, no summary
|
|
15 |
-O,--one one-column output layout
|
|
16 |
+ --date (default system) use this date in generated doc
|
|
17 |
--dump debug output dump
|
|
18 |
--filter (default none) filter output as Lua data (e.g pl.pretty.dump)
|
|
19 |
--tags (default none) show all references to given tags, comma-separated
|
|
20 |
@@ -781,7 +782,11 @@ ldoc.modules = module_list
|
|
21 |
ldoc.title = ldoc.title or args.title
|
|
22 |
ldoc.project = ldoc.project or args.project
|
|
23 |
ldoc.package = args.package:match '%a+' and args.package or nil
|
|
24 |
+if args.date == 'system' then
|
|
25 |
ldoc.updatetime = os.date("%Y-%m-%d %H:%M:%S")
|
|
26 |
+else
|
|
27 |
+ldoc.updatetime = args.date
|
|
28 |
+end
|
|
29 |
|
|
30 |
local html = require 'ldoc.html'
|
|
31 |
|