[Pkg-puppet-devel] [facter] 284/352: (FACT-272) Format facter --help to work with ronn

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 518c2f1e990bd720a779e210e1768432ba18ca7f
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Mon Feb 24 14:04:09 2014 -0800

    (FACT-272) Format facter --help to work with ronn
    
    This commit updates the output of facter --help to create markdown that
    can be converted to a man page via ronn.
---
 lib/facter/application.rb | 56 +++++++++++++++++++++++++++++++++++------------
 1 file changed, 42 insertions(+), 14 deletions(-)

diff --git a/lib/facter/application.rb b/lib/facter/application.rb
index 4300ac5..9d51237 100644
--- a/lib/facter/application.rb
+++ b/lib/facter/application.rb
@@ -80,18 +80,23 @@ module Facter
       options = {}
       parser = OptionParser.new do |opts|
         opts.banner = <<-BANNER
-Synopsis
-========
+facter(8) -- Gather system information
+======
+
+SYNOPSIS
+--------
 
 Collect and display facts about the system.
 
-Usage
-=====
+USAGE
+-----
 
-  facter [-d|--debug] [-h|--help] [-p|--puppet] [-v|--version] [-y|--yaml] [-j|--json] [--external-dir DIR] [--no-external-dir] [fact] [fact] [...]
+    facter [-h|--help] [-t|--timing] [-d|--debug] [-p|--puppet] [-v|--version]
+      [-y|--yaml] [-j|--json] [--plaintext] [--external-dir DIR] [--no-external-dir]
+      [fact] [fact] [...]
 
-Description
-===========
+DESCRIPTION
+-----------
 
 Collect and display facts about the current system.  The library behind
 Facter is easy to expand, making Facter an easy way to collect information
@@ -100,19 +105,42 @@ about a system from within the shell or within Ruby.
 If no facts are specifically asked for, then all facts will be returned.
 
 EXAMPLE
-=======
-  facter kernel
+-------
+
+Display all facts:
+
+    $ facter
+    architecture => amd64
+    blockdevices => sda,sr0
+    domain => example.com
+    fqdn => puppet.example.com
+    hardwaremodel => x86_64
+    [...]
+
+Display a single fact:
+
+    $ facter kernel
+    Linux
+
+Format facts as JSON:
+
+    $ facter --json architecture kernel hardwaremodel
+    {
+      "architecture": "amd64",
+      "kernel": "Linux",
+      "hardwaremodel": "x86_64"
+    }
 
 AUTHOR
-======
+------
   Luke Kanies
 
 COPYRIGHT
-=========
-  Copyright (c) 2011-2012 Puppet Labs, Inc Licensed under the Apache 2.0 license
+---------
+  Copyright (c) 2011-2014 Puppet Labs, Inc Licensed under the Apache 2.0 license
 
-USAGE
-=====
+OPTIONS
+-------
         BANNER
         opts.on("-y",
                 "--yaml",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list