Trouble creating epub3 output

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble creating epub3 output

wimdeblauwe
I have a gradle build that outputs HTML and PDF from my asciidoc document. I am now trying to add epub3 output, but it fails with:

[source]
----
(NoMethodError) undefined method `to_sym' for nil:NilClass
Did you mean?  to_s
----

This is my build.gradle:

[source]
----
buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.7'
        classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
        classpath 'org.asciidoctor:asciidoctorj-epub3:1.5.0-alpha.8.1'
    }
}

plugins {
    id 'org.asciidoctor.convert' version '1.5.7'
}

version = '0.0.1-SNAPSHOT'

apply plugin: 'java'
apply plugin: 'org.asciidoctor.convert'

asciidoctorj {
    version = '1.5.6'
}

asciidoctor {
    backends 'html5', 'pdf', 'epub3'
    options doctype: 'book'
    attributes 'build-gradle': file('build.gradle'),
            'sourcedir': project.sourceSets.main.java.srcDirs[0],
            'imagesdir': './images',
            'icons': 'font'
}

defaultTasks 'asciidoctor'
----

I also get lots of warnings that "tag 'foo' not found in include file: /Users/wdb/Projects/....."

I am running on Java 8, on Mac OS X.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble creating epub3 output

wimdeblauwe
Is there a version of the epub3 plugin that works with the 1.5.7 gradle plugin?

I see that https://github.com/mraible/infoq-mini-book uses the 1.5.3 of `asciidoctor-gradle-plugin` with 1.5.0-alpha.7 of the `asciidoctorj-epub3` plugin and that works.

But when I try to use 1.5.7 with 1.5.0-alpha.8.1, things are not working anymore. I get:

> Task :mobi
asciidoctor: ERROR: chapters/preface.adoc: line 1: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 40: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 42: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 44: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: chapters/action.adoc: line 2: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 54: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
(NoMethodError) undefined method `gsub' for #<Asciidoctor::Epub3::Packager:0x60de53ee>

regards,

Wim
Reply | Threaded
Open this post in threaded view
|

Re: Trouble creating epub3 output

mojavelinux
Administrator
Creating an EPUB has very specific structural requirements. Have you followed all the steps outlined in this section?

-Dan

On Wed, Apr 4, 2018 at 2:54 PM, wimdeblauwe [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Is there a version of the epub3 plugin that works with the 1.5.7 gradle plugin?

I see that https://github.com/mraible/infoq-mini-book uses the 1.5.3 of `asciidoctor-gradle-plugin` with 1.5.0-alpha.7 of the `asciidoctorj-epub3` plugin and that works.

But when I try to use 1.5.7 with 1.5.0-alpha.8.1, things are not working anymore. I get:

> Task :mobi
asciidoctor: ERROR: chapters/preface.adoc: line 1: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 40: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 42: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 44: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: chapters/action.adoc: line 2: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
asciidoctor: ERROR: index.adoc: line 54: invalid part, must have at least one section (e.g., chapter, appendix, etc.)
(NoMethodError) undefined method `gsub' for #<Asciidoctor::Epub3::Packager:0x60de53ee>

regards,

Wim



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Trouble-creating-epub3-output-tp6209p6234.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Trouble creating epub3 output

wimdeblauwe
Yes, the epub file gets created with the "old" versions. Only when I try to upgrade to the newer versions things break down.