changelog-cli icon indicating copy to clipboard operation
changelog-cli copied to clipboard

Export changelog to json

Open strowk opened this issue 5 years ago • 3 comments

Sometimes we might need to process changelog into another format. For example I might want to get existing changelog file and transform it to debian changelog ( https://manpages.debian.org/jessie/devscripts/dch.1.en.html ).

To do that it would be convenient to have intermediate machine readable format, like for example JSON, to which current text in changelog could be processed to and which could be used then by custom script or template engine to produce a different format of changelog. For example command might look like this changelog export --format json

strowk avatar Sep 05 '20 21:09 strowk

Started down this work. This is taking a little longer that originally anticipated because Im writing a fully fledged keepachangelog parser to pull this in as a data structure that can just be dumped to whatever format needed. This will also allow for a lot tighter operations on the internal tools instead of just doing string parsing everywhere.

That being said, this is one of my first times doing a full on parser in python and some of the structures from the parsers I have written in haskell dont quote copy over cleanly.

mc706 avatar Jan 30 '21 16:01 mc706

The changelog is basically a markdown, so maybe use some markdown parser library and then just work on top of it?

strowk avatar Jan 30 '21 18:01 strowk