Skip to content

lhm/changelog_parser

Repository files navigation

changelog_parser

ChangelogParser splits a changelog into its seperate entries and tries to detect the corresponding version number and release date. It currently defaults to parsing the common ‘wikisyntax’ style, but differing formats can easily be added.

Installation

gem install jeweler
rake build
gem install pkg/changelog_parser-0.0.x.gem

Usage

From ruby:

require 'changelog_parser'
changelog = ChangelogParser::Reader.read "/path/to/CHANGELOG"
changelog.entries.size              # => 3

entry = changelog.entries.first
entry.version                       # => #<Gem::Version "1.2.3">
entry.date                          # => #<Date: 2005-04-06 (4906933/2,0,2299161)>
entry.text                          # => "== 1.2.3 / 2005-04-06\n\n  * some new feature added"

From the commandline:

$ changelog_parser CHANGELOG        # displays most recent entry
$ changelog_parser CHANGELOG -n3    # displays three entries
$ cat CHANGELOG | changlog_parser   # also reads from STDIN

$ changlog_parser -h
options:

    -n, --number      number of entries to print
    -h, --help        Print this help message

Contributing to changelog_parser

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it

  • Fork the project

  • Start a feature/bugfix branch

  • Commit and push until you are happy with your contribution

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2011 Lars Henrik Mai. See LICENSE.txt for further details.

About

read changelog files and split them into seperate entries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages