<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
img {
max-width: 100%;
height: auto;
}
p.details {
font-style:italic;
color:#777
}
.footer p {
font-size:small;
color:#777
}
pre.commit-message {
white-space: pre-wrap;
}
.file-stats a {
text-decoration: none;
}
.file-stats .new-file {
color: #090;
}
.file-stats .deleted-file {
color: #B00;
}
</style>
<body>
<div class='content'>
<h3>Amar Takhar pushed to branch master at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/d9ef3dece3d7b2a0f87ee67828ef150c5b98b391">d9ef3dec</a></strong>
<div>
<span>by Amar Takhar</span>
<i>at 2015-11-20T12:25:21Z</i>
</div>
<pre class='commit-message'>Add a scanner for building the manpages.
* This allows for rebuilding of manpages when the includes are edited.</pre>
</li>
</ul>
<h4>2 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
pylib/asciidoc.py
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
pylib/util.py
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d9ef3dece3d7b2a0f87ee67828ef150c5b98b391#diff-0'>
<strong>
pylib/asciidoc.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/pylib/asciidoc.py
</span><span style="color: #000000;background-color: #ddffdd">+++ b/pylib/asciidoc.py
</span><span style="color: #aaaaaa">@@ -1,8 +1,10 @@
</span><span style="color: #000000;background-color: #ffdddd">-# asciidoc -b html5 -a linkcss -a stylesdir=/mnt/devel/ntp/commit/docs -o asd driver32.txt
-
</span><span style="color: #000000;background-color: #ddffdd">+from util import ascii_doc_scan
</span> from waflib import Task
from waflib.TaskGen import extension
<span style="color: #000000;background-color: #ddffdd">+# asciidoc -b html5 -a linkcss -a stylesdir=/mnt/devel/ntp/commit/docs -o asd driver32.txt
+
+
</span> # ASCIIDOC_FLAGS are almost always needed and need to be set by the user.
class asciidoc(Task.Task):
color = "BLUE"
<span style="color: #aaaaaa">@@ -21,7 +23,7 @@ class a2x(Task.Task):
</span> color = "YELLOW"
shell = True
run_str = '${BIN_A2X} ${A2X_FLAGS} ${SRC[0].abspath()}'
<span style="color: #000000;background-color: #ffdddd">-
</span><span style="color: #000000;background-color: #ddffdd">+ scan = ascii_doc_scan
</span>
@extension('.man-tmp')
def run_a2x(self, node):
</code></pre>
<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/d9ef3dece3d7b2a0f87ee67828ef150c5b98b391#diff-1'>
<strong>
pylib/util.py
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/pylib/util.py
</span><span style="color: #000000;background-color: #ddffdd">+++ b/pylib/util.py
</span><span style="color: #aaaaaa">@@ -1,4 +1,5 @@
</span> from waflib.Logs import pprint
<span style="color: #000000;background-color: #ddffdd">+import re
</span>
def msg(str):
pprint("YELLOW", str)
<span style="color: #aaaaaa">@@ -7,3 +8,35 @@ def msg_setting(name, val):
</span> pprint("NORMAL", " %-30s: " % name, sep="")
pprint("YELLOW", val)
<span style="color: #000000;background-color: #ddffdd">+# Borrowed from waf/docs/book/wscript in the Waf Project.
+re_xi = re.compile('''^(include|image)::(.*?.(txt|\\{PIC\\}))\[''', re.M)
+def ascii_doc_scan(self):
+ p = self.inputs[0].parent
+ node_lst = [self.inputs[0]]
+ seen = []
+ depnodes = []
+
+ while node_lst:
+ nd = node_lst.pop(0)
+ if nd in seen: continue
+ seen.append(nd)
+
+ code = nd.read()
+ for m in re_xi.finditer(code):
+ name = m.group(2)
+ if m.group(3) == '{PIC}':
+
+ ext = '.eps'
+ if self.generator.rule.rfind('A2X') > 0:
+ ext = '.png'
+
+ k = p.find_resource(name.replace('{PIC}', ext))
+ if k:
+ depnodes.append(k)
+ else:
+ k = self.inputs[0].find_resource(name)
+ if k:
+ depnodes.append(k)
+ node_lst.append(k)
+ return [depnodes, ()]
+
</span></code></pre>
<br>
</li>
</div>
<div class='footer' style='margin-top: 10px;'>
<p>
—
<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/d9ef3dece3d7b2a0f87ee67828ef150c5b98b391">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/d9ef3dece3d7b2a0f87ee67828ef150c5b98b391"}}</script>
</p>
</div>
</body>
</html>