Class: VCLog::CLI::Log
Overview
VCLog provides cross-vcs ChangeLogs. It works by parsing the native changelog a VCS system produces into a common model, which then can be used to produce Changelogs in a variety of formats.
VCLog currently support git, hg and svn, with cvs and darcs in the works.
To produce a GNU-like changelog:
$ vclog
For XML format:
$ vclog -f xml
Or for a micorformat-ish HTML:
$ vclog -f html
To use the library programmatically, please see the API documentation.
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
- #execute ⇒ Object
- 
  
    
      #parser  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Setup options for log command. 
Methods inherited from Abstract
inherited, #initialize, #options, #repo, run, #run, terms
Constructor Details
This class inherits a constructor from VCLog::CLI::Abstract
Instance Method Details
#execute ⇒ Object
| 80 81 82 | # File 'lib/vclog/cli/log.rb', line 80 def execute puts repo.report() end | 
#parser ⇒ Object
Setup options for log command.
Returns a instance of OptionParser.
| 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | # File 'lib/vclog/cli/log.rb', line 32 def parser super do |parser| parser. = 'Usage: vclog [options]' parser.separator(' ') parser.separator('Print a change log or release history.') parser.separator(' ') parser.separator('OPTIONS: (use varies with format)') parser.on('-f', '--format FORMAT', 'output format (ansi,gnu,html,...)') do |format| [:format] = format.to_sym end parser.on('-r', '--release', '--history', 'show release history, instead of changelog') do [:type] = :history end parser.on('-t', '--title TITLE', 'document title') do |string| [:title] = string end parser.on('-v', '--version NUM', 'use as current version number') do |num| [:version] = num end parser.on('-l', '--level NUMBER', 'lowest level of commit to display (default: 0)') do |num| [:level] = num.to_i end parser.on('-p', '--point', 'split commit message into per-point entries') do [:point] = true end parser.separator(' ') parser.separator('XML/HTML OPTIONS: (applies only to xml/html formats)') parser.on('-S', '--style URI', 'provide a stylesheet URI (css or xsl)') do |uri| [:stylesheet] = uri end parser.separator(' ') parser.separator('TEXT OPTIONS: (applies only to text formats)') parser.on('-i', '--id', 'include reference/revision id in output') do [:reference] = true # TODO: change to :id ? end parser.on('-d', '--detail', 'include commit message details (no effect if -p)') do [:detail] = true end parser.on('-s', '--summary', 'exclude commit messages from report') do [:summary] = true end #parser.on('--typed', "catagorize by commit type") do # typed = true #end end end |