bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

Multiple Changelog files? #59

Closed MinchinWeb closed 6 years ago

MinchinWeb commented 8 years ago

I have enjoyed using releases on several projects and am looking to use it on several more.

I am wondering if it is possible to process multiple "changelog" files?

The particular situation I have is that I have several small projects around a common theme. I would like to maintain a changelog per project, but would like to maintain only one documentation site for the lot of them. Suggestions on how to do this?

bitprophet commented 8 years ago

Great question! Hasn't come up before. Quick glance implies it should be pretty trivial; altering the conf.py config vector of releases_document_name to accept a list instead of a single string, then a similar change to releases.__init__.generate_changelog should mean it processes (alters in-place) >1 file instead of just 1 file.

In fact...I wonder, if you happened to have multiple files named changelog.rst in various subdirectories, it might already "work". Depends on exactly what data ends up in app.env.docname in the function I mentioned above (i.e. is it always the basename or always the full path?). Something worth trying for sure.

MinchinWeb commented 8 years ago

I tried running it with multiple changelogs in different directories as is, and it breaks. Sphinx puts out the error:

Exception occurred:
  File "c:\program files\python 3.5\lib\site-packages\sphinx\writers\html.py", line 722, in unknown_visit
    raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
NotImplementedError: Unknown node: Release
The full traceback has been saved in [...]

So it's appears not to have the additional ReST directives that releases defines on "extra" changelog files.

MinchinWeb commented 8 years ago

@bitprophet : I used the approach you suggested and it seems to have worked (see #61 for code). Documentation updates included.

bitprophet commented 6 years ago

YEARS LATER...I need this myself! so gonna take another gander at #61 and hopefully merge/release it. Stay tuned.

bitprophet commented 6 years ago

Updated and merged!

MinchinWeb commented 6 years ago

Party indeed!!

bitprophet commented 6 years ago

1.5.0 going up on PyPI now.