Skip to content

Commit

Permalink
Fixup external Xr links for system calls
Browse files Browse the repository at this point in the history
Embrace sed, there really isn't a much better solution, and this is a small
problem. Prompted by Nick.
  • Loading branch information
haesbaert committed Sep 19, 2024
1 parent 3280e60 commit 3e25b72
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 24 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ docs/%.html: %
$(Q)mandoc -Tlint $< || exit 1
$(Q)mandoc -Thtml -I os=$(shell uname -s) \
-Otoc,style=mandoc.css,man=%N.%S.html $< > $@
$(Q)sed -i 's/fork\.2\.html/https:\/\/linux.die.net\/man\/2\/fork/g' $@
$(Q)sed -i 's/exec\.3\.html/https:\/\/linux.die.net\/man\/3\/exec/g' $@
$(Q)sed -i 's/exit\.3\.html/https:\/\/linux.die.net\/man\/3\/exit/g' $@

docs: $(DOCS_HTML) README.md docs/index.html

Expand Down
20 changes: 10 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIP
<p class="Pp"><code class="Nm">quark</code> is a library that provides a way to
retrieve and listen to process events in linux systems. Its main purpose is
to abstract different backends and to provide a common API for listening to
system-wide events like <a class="Xr" href="fork.2.html">fork(2)</a>,
<a class="Xr" href="exec.3.html">exec(3)</a>,
<a class="Xr" href="exit.3.html">exit(3)</a> and others.</p>
system-wide events like <a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a> and others.</p>
<p class="Pp"><code class="Nm">quark</code> not only provides an API for
listening to events, but also handles ordering, buffering and aggregation of
said events. In its most basic form, a short lived process consisting of
<a class="Xr" href="fork.2.html">fork(2)</a> +
<a class="Xr" href="exec.3.html">exec(3)</a> +
<a class="Xr" href="exit.3.html">exit(3)</a> will be aggregated into one
<a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a> +
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a> +
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a> will be aggregated into one
<var class="Vt">quark_event</var>. An internal process cache is also kept
that can be looked up via
<a class="Xr" href="quark_process_lookup.3.html">quark_process_lookup(3)</a>.</p>
Expand All @@ -69,12 +69,12 @@ <h1 class="Sh" id="FEATURES"><a class="permalink" href="#FEATURES">FEATURES</a><
<dt id="AGGREGATION"><a class="permalink" href="#AGGREGATION"><i class="Em">AGGREGATION</i></a></dt>
<dd><code class="Nm">quark</code> buffers and aggregates related events that
happened close enough. The common case is generating a single event for
the triple: <a class="Xr" href="fork.2.html">fork(2)</a>,
<a class="Xr" href="exec.3.html">exec(3)</a>,
<a class="Xr" href="exit.3.html">exit(3)</a>. There are rules on what can
the triple: <a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a>. There are rules on what can
be aggregated, and only events of the same pid are aggregated. For
example: <code class="Nm">quark</code> won't aggregate two
<a class="Xr" href="exec.3.html">exec(3)</a> events, otherwise we would
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a> events, otherwise we would
lose the effects of the first one. These rules will be exposed and
configurable in the future.</dd>
<dt id="BUFFERING"><a class="permalink" href="#BUFFERING"><i class="Em">BUFFERING</i></a></dt>
Expand Down
9 changes: 5 additions & 4 deletions docs/mandoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ h2.Sh, h3.Ss { margin-left: 0em; }
text-indent: -2em; }
}

html {
:link { color: #24bbb1; }
:visited { color: #24bbb1; }
}

/* Overrides for a dark color scheme for accessibility. */
/*
@media (prefers-color-scheme: dark) {
Expand All @@ -368,7 +373,3 @@ html { --bg: #1E1F21;
}
*/

html {
:link { color: #24bbb1; }
:visited { color: #e55098; }
}
20 changes: 10 additions & 10 deletions docs/quark.7.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ <h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIP
<p class="Pp"><code class="Nm">quark</code> is a library that provides a way to
retrieve and listen to process events in linux systems. Its main purpose is
to abstract different backends and to provide a common API for listening to
system-wide events like <a class="Xr" href="fork.2.html">fork(2)</a>,
<a class="Xr" href="exec.3.html">exec(3)</a>,
<a class="Xr" href="exit.3.html">exit(3)</a> and others.</p>
system-wide events like <a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a> and others.</p>
<p class="Pp"><code class="Nm">quark</code> not only provides an API for
listening to events, but also handles ordering, buffering and aggregation of
said events. In its most basic form, a short lived process consisting of
<a class="Xr" href="fork.2.html">fork(2)</a> +
<a class="Xr" href="exec.3.html">exec(3)</a> +
<a class="Xr" href="exit.3.html">exit(3)</a> will be aggregated into one
<a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a> +
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a> +
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a> will be aggregated into one
<var class="Vt">quark_event</var>. An internal process cache is also kept
that can be looked up via
<a class="Xr" href="quark_process_lookup.3.html">quark_process_lookup(3)</a>.</p>
Expand All @@ -69,12 +69,12 @@ <h1 class="Sh" id="FEATURES"><a class="permalink" href="#FEATURES">FEATURES</a><
<dt id="AGGREGATION"><a class="permalink" href="#AGGREGATION"><i class="Em">AGGREGATION</i></a></dt>
<dd><code class="Nm">quark</code> buffers and aggregates related events that
happened close enough. The common case is generating a single event for
the triple: <a class="Xr" href="fork.2.html">fork(2)</a>,
<a class="Xr" href="exec.3.html">exec(3)</a>,
<a class="Xr" href="exit.3.html">exit(3)</a>. There are rules on what can
the triple: <a class="Xr" href="https://linux.die.net/man/2/fork">fork(2)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a>,
<a class="Xr" href="https://linux.die.net/man/3/exit">exit(3)</a>. There are rules on what can
be aggregated, and only events of the same pid are aggregated. For
example: <code class="Nm">quark</code> won't aggregate two
<a class="Xr" href="exec.3.html">exec(3)</a> events, otherwise we would
<a class="Xr" href="https://linux.die.net/man/3/exec">exec(3)</a> events, otherwise we would
lose the effects of the first one. These rules will be exposed and
configurable in the future.</dd>
<dt id="BUFFERING"><a class="permalink" href="#BUFFERING"><i class="Em">BUFFERING</i></a></dt>
Expand Down

0 comments on commit 3e25b72

Please sign in to comment.