module VCLog require 'vclog/vcs' require 'optparse' # = vclog Command # # == SYNOPSIS # # 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 SVN and Git. CVS, Darcs and # Mercurial/Hg are in the works. # # == EXAMPLES # # To produce a GNU-like changelog: # # $ vclog # # For XML format: # # $ vclog --xml # # Or for a micorformat-ish HTML: # # $ vclog --html # # To use the library programmatically, please see the API documentation. def self.run begin vclog rescue => err if $DEBUG raise err else puts err.message exit -1 end end end # def self.vclog type = :log format = :gnu vers = nil style = nil output = nil title = nil version = nil extra = false rev = false typed = false optparse = OptionParser.new do |opt| opt.banner = "Usage: vclog [TYPE] [FORMAT] [OPTIONS] [DIR]" opt.separator(" ") opt.separator("OUTPUT TYPE (choose one):") opt.on('--log', '--changelog', '-l', "changelog (default)") do type = :log end opt.on('--rel', '--history', '-r', "release history") do type = :rel end opt.on('--bump', '-b', "display a bumped version number") do doctype = :bump end opt.on('--current', '-c', "display current version number") do doctype = :curr end opt.separator(" ") opt.separator("FORMAT (choose one):") opt.on('--gnu', "GNU standard format (default)") do format = :gnu end opt.on('--xml', "XML format") do format = :xml end opt.on('--yaml', "YAML format") do format = :yaml end opt.on('--json', "JSON format") do format = :json end opt.on('--html', "HTML micro-like format") do format = :html end opt.on('--rdoc', "RDoc format") do format = :rdoc end opt.on('--markdown', '-m', "Markdown format") do format = :markdown end opt.separator(" ") opt.separator("OTHER OPTIONS:") #opt.on('--typed', "catagorize by commit type") do # typed = true #end opt.on('--title