Browse Source

Add documentation for postprocess-single

Martijn Braam 3 years ago
parent
commit
c9a7d24b1d
3 changed files with 60 additions and 1 deletions
  1. 31 0
      doc/postprocess-single.1.scd
  2. 28 1
      meson.build
  3. 1 0
      meson_options.txt

+ 31 - 0
doc/postprocess-single.1.scd

@@ -0,0 +1,31 @@
+postprocess-single(1) "Megapixels postprocessing backend"
+
+# NAME
+
+postprocess-single - Single image postprocesser utility
+
+# SYNOPSIS
+
+rkdeveloptool [-v] [-q quality] INPUT OUTPUT
+
+# DESCRIPTION
+
+Reads a .dng file produced by Megapixels or any other photography software outputting a standard bayer data openDNG.
+The image data is processed, sharpened, color-corrected and output as a jpeg file.
+
+# OPTIONS
+
+*INPUT*
+	Path to the .dng file to read
+
+*OUTPUT*
+	Output filename for the generated jpeg
+
+*-h*
+	Show the help message and quit
+
+*-v*
+	Show verbose debugging and timing information
+
+*-q QUALITY*
+	Set the jpeg quality for the output, defaults to 90. The valid range is 0-100

+ 28 - 1
meson.build

@@ -16,4 +16,31 @@ executable('postprocessd', 'main.c','postprocess.c', 'stacker.cpp', 'stackercpp.
 
 executable('postprocess-single', 'single.c','postprocess.c', 'stacker.cpp', 'stackercpp.cpp', 'util.c',
     dependencies: [raw, tiff, jpeg, exif, cv],
-    install: true)
+    install: true)
+
+# Build and install the man pages
+scdoc = dependency('scdoc', native: true, required: get_option('man-pages'))
+if scdoc.found()
+  scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true)
+  sh = find_program('sh', native: true)
+  mandir = get_option('mandir')
+  man_files = [
+            'doc/postprocess-single.1.scd',
+  ]
+  foreach filename : man_files
+    topic = filename.split('.')[-3].split('/')[-1]
+    section = filename.split('.')[-2]
+    output = '@0@.@1@'.format(topic, section)
+
+    custom_target(
+      output,
+      input: filename,
+      output: output,
+      command: [
+        sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output)
+      ],
+      install: true,
+      install_dir: '@0@/man@1@'.format(mandir, section)
+    )
+  endforeach
+endif

+ 1 - 0
meson_options.txt

@@ -0,0 +1 @@
+option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')