[source,shell]
----
-edit file1 file 2 file3
+edit file1 file2 file3
----
== System Overview
|===
| *Executable* | *Description*
-| link:src/edit.html[edit]
+| link:src/edit.1.html[edit]
| Main executable used to open files for editing
-| link:src/fetch.html[fetch]
+| link:src/fetch.1.html[fetch]
| Executes pattern matching rules on input text
-| link:src/fetch.html[fetchsel]
+| link:src/fetchsel.1.html[fetchsel]
| Executes pattern matching rules on selected text
-| link:src/pick.html[pick]
+| link:src/pick.1.html[pick]
| Performs fuzzy search on a set of strings
-| link:src/registrar.html[registrar]
+| link:src/registrar.1.html[registrar]
| Tracks open windows and the files they contain
-| link:src/tide.html[tide]
+| link:src/tide.1.html[tide]
| The main tide editor executable
|===
--- /dev/null
+= edit(1)
+:doctype: manpage
+
+== NAME
+
+registrar - registry service for tracking open tide(1) windows
+
+== SYNOPSIS
+
+*registrar*
+
+== DESCRIPTION
+
+
+== OPTIONS
+
+
+== ENVIRONMENT
+
+
+== SEE ALSO
+
+registrar(1), tide(1), pick(1), fetch(1), fetchsel(1)
+++ /dev/null
-@defgroup edit
--- /dev/null
+= fetch(1)
+:doctype: manpage
+
+== NAME
+
+registrar - registry service for tracking open tide(1) windows
+
+== SYNOPSIS
+
+*registrar*
+
+== DESCRIPTION
+
+
+== OPTIONS
+
+
+== ENVIRONMENT
+
+
+== SEE ALSO
+
+registrar(1), tide(1), edit(1), pick(1), fetchsel(1)
\ No newline at end of file
+++ /dev/null
-@defgroup fetch
--- /dev/null
+= fetchsel(1)
+:doctype: manpage
+
+== NAME
+
+registrar - registry service for tracking open tide(1) windows
+
+== SYNOPSIS
+
+*registrar*
+
+== DESCRIPTION
+
+
+== OPTIONS
+
+
+== ENVIRONMENT
+
+
+== SEE ALSO
+
+registrar(1), tide(1), edit(1), pick(1), fetch(1)
\ No newline at end of file
+++ /dev/null
-@addtogroup fetch
--- /dev/null
+= pick(1)
+:doctype: manpage
+
+== NAME
+
+registrar - registry service for tracking open tide(1) windows
+
+== SYNOPSIS
+
+*registrar*
+
+== DESCRIPTION
+
+
+== OPTIONS
+
+
+== ENVIRONMENT
+
+
+== SEE ALSO
+
+registrar(1), tide(1), edit(1), fetch(1), fetchsel(1)
\ No newline at end of file
+++ /dev/null
-= PICK COMMAND
\ No newline at end of file
--- /dev/null
+= registrar(1)
+:doctype: manpage
+
+== NAME
+
+registrar - registry service for tracking open tide(1) windows
+
+== SYNOPSIS
+
+*registrar*
+
+== DESCRIPTION
+
+
+== SEE ALSO
+
+tide(1), edit(1), pick(1), fetch(1), fetchsel(1)
\ No newline at end of file
+++ /dev/null
-@defgroup registrar
== SEE ALSO
-acme(1), tide(1), pick(1), pickfile(1), picktag(1)
+acme(1), edit(1), pick(1), pickfile(1), picktag(1)
+++ /dev/null
-@defgroup tide
-HI2!
require "asciidoctor"
require "asciidoctor-diagram"
+Attrs = {
+ "linkcss" => false,
+# "imagesoutdir" => outdir,
+ "icons" => "font",
+ "stylesheet" => "docs/style.css",
+# "toc" => "left",
+# "toclevels" => 3,
+ "source-highlighter" => "rouge",
+ "rouge-style" => "thankful_eyes",
+}
+
+def render_string(contents, outfile)
+ puts outfile
+ FileUtils.mkdir_p(File.dirname(outfile))
+ Asciidoctor.convert(
+ contents,
+ attributes: Attrs.merge({"imagesoutdir" => File.dirname(outfile)}),
+ to_file: outfile,
+ safe: 0)
+end
+
def render_file(infile, outfile)
return if FileUtils.uptodate?(outfile, [infile])
- puts "#{infile} -> #{outfile}"
- outdir = File.dirname(outfile)
basename = File.basename(infile).sub(%r{(?:\.design)?\.adoc$}, "")
image_index = 0
contents = File.read(infile).each_line.map do |line|
line
end
end
- attributes = {
- "linkcss" => false,
- "imagesoutdir" => outdir,
- "icons" => "font",
- "stylesheet" => "docs/style.css",
-# "toc" => "left",
-# "toclevels" => 3,
- "source-highlighter" => "rouge",
- "rouge-style" => "thankful_eyes",
- }
- FileUtils.mkdir_p(outdir)
- Asciidoctor.convert(contents.join,
- attributes: attributes,
- to_file: outfile,
- safe: 0)
+ render_string(contents.join, outfile)
+end
+
+def render_source(infile, outfile)
+ return if FileUtils.uptodate?(outfile, [infile])
+ data = "= #{File.basename(infile)}\n\n[source,c,linenums]\n----\n" + File.read(infile) + "\n----\n"
+ render_string(data, outfile)
end
Dir.glob("**/*.adoc").each do |f|
render_file(f, "build/html/#{f.sub(/\.[^.]*$/,'.html')}")
end
+
+Dir.glob("{src,inc}/**/*.{c,h}").each do |f|
+ render_source(f, "build/html/#{f}.html")
+end