A lab for testing and demonstrating Asciidoctor extensions. Please do not use this code in production. If you want to use one of these extensions in your application, create a new project, import the code, and distribute it as a RubyGem. You can then request to make it a top-level project under the Asciidoctor organization.
Other
105
stars
101
forks
source link
Create extension or add-on script that extracts revision history from git history #13
Create either an extension or an add-on script that extracts the revision history from the git history.
The idea is to only store the latest revision number and corresponding remark in the document itself. Whenever the revision number is changed, you commit the change. Then, you can get a full history of revision numbers and corresponding remarks by walking the git history and looking for when then revision number changes. Create a catalog, then output it to a temporary docinfo file. Finally, convert as normal with the docinfo enabled.
Create either an extension or an add-on script that extracts the revision history from the git history.
The idea is to only store the latest revision number and corresponding remark in the document itself. Whenever the revision number is changed, you commit the change. Then, you can get a full history of revision numbers and corresponding remarks by walking the git history and looking for when then revision number changes. Create a catalog, then output it to a temporary docinfo file. Finally, convert as normal with the docinfo enabled.