If it is of use to anyone, here is my gradle build file for the documentation I create.
https://gist.github.com/ari/4156d967d54289f4abf6This supports:
* custom css/js folders
* multiple projects within this top level gradle project (each create separate docs)
* tokens in the docbook to insert project name, version, published date and year
* a location for stylesheet overrides
If I get some time, I'll try and tidy it up to be more generic and perhaps a plugin. But hopefully it helps someone.
Ari
On 7/12/2015 9:40pm, Lars Vogel wrote:
> Hi Norman,
>
> Nice to see a Gradle toolchain for creating DocBook output. Thanks for that.
>
> May I ask where does the code for the 'org.docbook.task' Gradle plug-in lives?
>
> Best regards, Lars
>
> 2015-09-15 16:05 GMT+02:00 Norman Walsh <
ndw@nwalsh.com <mailto:
ndw@nwalsh.com>>:
>
> Warren Block <
wblock@wonkity.com <mailto:
wblock@wonkity.com>> writes:
> > What tools are there to make working with DocBook easier?
>
> I'm just in the process of finishing up a first release of a tool
> to make DocBook publishing easier with gradle. Given doc.xml, written
> in DocBook, this build.gradle file will download all of the necessary
> dependencies and run the transformations.
>
> buildscript {
> repositories {
> mavenCentral()
> maven { url "http://maven.restlet.org" }
> }
>
> dependencies {
> classpath group: 'org.docbook', name: 'docbook-xslt2', version: '2.0.14'
> classpath group: 'com.xmlcalabash', name: 'xmlcalabash1-print', version: '1.1.4'
> }
> }
>
> repositories {
> mavenLocal()
> mavenCentral()
> }
>
> apply plugin: 'org.docbook.task'
>
> import org.docbook.DocBookTask
>
> task publishhtml5(type: DocBookTask) {
> format "html"
> input "doc.xml"
> output "index.html"
> }
>
> task publishxhtml(type: DocBookTask) {
> format "xhtml"
> input "doc.xml"
> output "index.html"
> }
>
> task publishpdf(type: DocBookTask) {
> format "foprint"
> input "doc.xml"
> pdf "doc.pdf"
> }
>
> Needs documentation and such, but it does at least run now. :-)
>
> Be seeing you,
> norm
>
> --
> Norman Walsh <
ndw@nwalsh.com <mailto:
ndw@nwalsh.com>> | There might very well be nothing;
>
http://www.oasis-open.org/docbook/ | nor anyone. No one to notice that
> Chair, DocBook Technical Committee | there is nothing, and to consider
> | that natural. But that there is
> | something, and, whatever it may
> | be, the strange thing! I shall
> | never cease being amazed at
> | this.--André Gide
>
>
--
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.auLevel 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001 fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A