Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dan Allen
    @mojavelinux
    I just had my first blended beer from them...their 22 anniversary blend. it was out of this world.
    Schalk W. Cronjé
    @ysb33r

    News on the asciidoctor-gradle 3.x front, I have managed to create an additional plugin that integrates DeckTape to export slides to PDF/JPG/PNG. It can basically convert any HTML slide deck that DeckTape supports and that was created by an Asciidoctor task.

    However, because we already have specific Reveal.js support in the GRadle plugins the integration is even more slick. It will detect the presence of the asciidoctorRevealJs task and allow on-demand creation of asciidoctorRevealJsExport.

    Screenshot_20190513_161350.png
    It can be as slick as the above
    Given that we also now have asciidoctor.js (html & docbook at least) integration into the plugin suite, I think we are near enough to release a 3.0.0-alpha.1 future in the next couple of weeks so that people can have a play.
    Schalk W. Cronjé
    @ysb33r

    I'm really confused about some error that popped up today.

    Running AsciidoctorJ instance with classpath [
      $ROOT/asciidoctor-gradle-jvm/build/libs/asciidoctor-gradle-jvm-3.0.0-alpha.1.jar, 
      $GRADLEHOME/wrapper/dists/gradle-4.4.1-bin/46gopw3g8i1v3zqqx4q949t2x/gradle-4.4.1/lib/groovy-all-2.4.12.jar,
      $ROOT/testfixtures/offline-repo/build/repo/org.asciidoctor/asciidoctorj/2.0.0/asciidoctorj-2.0.0.jar, 
      $ROOT/testfixtures/offline-repo/build/repo/org.jruby/jruby-complete/9.2.7.0/jruby-complete-9.2.7.0.jar, 
      $ROOT/testfixtures/offline-repo/build/repo/org.asciidoctor/asciidoctorj-api/2.0.0/asciidoctorj-api-2.0.0.jar, 
      $ROOT/testfixtures/offline-repo/build/repo/com.beust/jcommander/1.35/jcommander-1.35.jar] 
    
    Starting process 'command '/usr/lib/jvm/java-8-oracle/bin/java''. 
    
    Working directory: $ROOT/asciidoctor-gradle-jvm-gems/build/gradleTest/external-gems/4.4.1 
    
    Command: /usr/lib/jvm/java-8-oracle/bin/java \
      -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant \
      \
      -cp $ROOT/asciidoctor-gradle-jvm/build/libs/asciidoctor-gradle-jvm-3.0.0-alpha.1.jar:\
      $GRADLEHOME/wrapper/dists/gradle-4.4.1-bin/46gopw3g8i1v3zqqx4q949t2x/gradle-4.4.1/lib/groovy-all-2.4.12.jar:\
      $ROOT/testfixtures/offline-repo/build/repo/org.asciidoctor/asciidoctorj/2.0.0/asciidoctorj-2.0.0.jar:\
      $ROOT/testfixtures/offline-repo/build/repo/org.jruby/jruby-complete/9.2.7.0/jruby-complete-9.2.7.0.jar:\
      $ROOT/testfixtures/offline-repo/build/repo/org.asciidoctor/asciidoctorj-api/2.0.0/asciidoctorj-api-2.0.0.jar:\
      $ROOT/testfixtures/offline-repo/build/repo/com.beust/jcommander/1.35/jcommander-1.35.jar \
      org.asciidoctor.gradle.remote.AsciidoctorJavaExec \
      \
      $ROOT/asciidoctor-gradle-jvm-gems/build/gradleTest/external-gems/4.4.1/build/tmp/asciidoctor.javaexec-data
    
      Successfully started process 'command '/usr/lib/jvm/java-8-oracle/bin/java''
    
      Exception in thread "main" org.jruby.exceptions.LoadError: (MissingSpecVersionError) Gem::MissingSpecVersionError
      at RUBY.to_specs(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/dependency.rb:313)
      at RUBY.activate_dependencies(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:1472)
      at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1792)
      at RUBY.activate_dependencies(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:1461)
      at RUBY.activate(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/specification.rb:1443)
      at RUBY.try_activate(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems.rb:224)
      at RUBY.require(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:123)
      at RUBY.<main>(<script>:1)

    This happens in a test were the asciidoctor-bibtex GEM has been added. Apparantly the issue is due to a GEM on the filesystem not being the one required, but I have no idea how to figure that out.

    Dan Allen
    @mojavelinux
    hmmm
    Schalk W. Cronjé
    @ysb33r
    I have discovered something... I reran a job on CI which was successful previously and now it has failed with the same issue as well. I suspect this is down to Rubygem dependencies having changed.
    And the same test now fails on master as well.
    Dan Allen
    @mojavelinux
    do you think it's a dependency on rubygems itself, or a gem specifically?
    Schalk W. Cronjé
    @ysb33r
    A GEM has changed I think
    Dan Allen
    @mojavelinux
    I wouldn't be surprised. note that rouge was recently released. not sure if that could be it, but I do know it happened last night
    Schalk W. Cronjé
    @ysb33r
    No, that should not affect this as this is asciidoctorj 2.0, should it should have rouge bundled at a set version.
    Stupid ruby question: If a dependency is set at ~> 4, should it resolve anything 4.x, but not 5?
    because ~>2.2 is '>= 2.2.0', '< 3.0'
    Dan Allen
    @mojavelinux
    to lock to 4, you would need ~> 4.0
    Schalk W. Cronjé
    @ysb33r
    Got it! bibtex-ruby was released today. If I force the version back to 4.4.7 it solves the problem.
    Dan Allen
    @mojavelinux
    in essence, ~> 4 is no range at all
    Schalk W. Cronjé
    @ysb33r
    So it is as good as >=4 or >=0 ?
    Dan Allen
    @mojavelinux
    actually, yes, it's >= 4 I believe
    funny how some of the patterns aren't actually different
    Schalk W. Cronjé
    @ysb33r
    So when I do this in Gradle
    dependencies {
        asciidoctorGems 'rubygems:asciidoctor-bibtex:0.3.1'
        asciidoctorGems 'rubygems:bibtex-ruby:4.4.7', {
            force = true
        }
    }
    it works
    Dan Allen
    @mojavelinux
    :+1:
    Schalk W. Cronjé
    @ysb33r
    Thanks for lending an ear.
    Dan Allen
    @mojavelinux
    :+1:
    Giovanni Lovato
    @heruan
    Hello! Is it possibile to convert from HTML to Asciidoc with AsciidoctorJ?
    Dan Allen
    @mojavelinux
    not currently. I have been working on a prototype of such a converter. There's also a rudimentary converter in AsciidocFx
    once I have a moment to breathe, I'm going to put a project together that does this conversion, or at least gets it started
    at first I thought it was going to be really hard, but it turns out to be a lot easier than I expected
    Giovanni Lovato
    @heruan
    Thank you Dan for the feedback! That would be great, I’m really looking forward to it.
    Schalk W. Cronjé
    @ysb33r
    @heruan If you have to the conversion only a couple of times and you need to do it urgently you can try to use pandoc and then do some cleanup afterwards.
    Giovanni Lovato
    @heruan
    @ysb33r That’s what I’m trying to do right now, i.e. running Pandoc as a shell command from Java; not simple nor efficient. I’m now required to create service requests from received mail messages, so the parsing would be quite frequent.
    Dan Allen
    @mojavelinux
    I can explain what I did. I used an HTML parser to create a DOM, then walked the tree recursively and built the AsciiDoc using an AsciiDoc writer helper class
    it's really not hard to do the basics...like headings and paragraphs
    it gets tricky when you need to do complex inline formatting
    which is where I spent most of my time
    Schalk W. Cronjé
    @ysb33r
    @heruan then pandoc will not scale
    Groovy's xmlslurper wouls be
    Groovy's Xmlslurper would be ideal for this
    But as Dan says it depends on how much complex process you have to do.
    Dan Allen
    @mojavelinux
    @ysb33r good luck with hack.commit.push! Say hi to everyone for me!
    Schalk W. Cronjé
    @ysb33r
    spring-restdocs has finally bit the bullet and made some updates so that it can be compatible with AsciidoctorJ 1.6 & 2.0. It will be in 2.0.4-SNAPSHOT for now (https://github.com/spring-projects/spring-restdocs/issues/581#issuecomment-503068051)
    Dan Allen
    @mojavelinux
    excellent!!!
    given that they are meeting us half way on this, we should return the favor by staying as true to semver as possible
    BenDenger
    @BenDenger

    hey guys, how can i reference code snippets, located in different files?
    in my .adoc file i have:

    [source,kotlin]
    ----
    include::../test.kt[lines=3..5]
    ----

    expecting to have printed out the code in there, but all i get is link:../test.kt[]
    i am doing that with the code

    val options = OptionsBuilder.options()
                        .safe(SafeMode.UNSAFE)
                        .baseDir(unzippedRoot)
                        .docType("article")
                Asciidoctor.Factory.create().load(excerpt, options.asMap())

    am i doing something wrong?

    BenDenger
    @BenDenger
    just figured out that my baseDir was wrong ;D
    Ashok Koyi
    @thekalinga

    Hi,

    I am trying to use include snippets from external files. These files are relative to .adoc file. When I build the html file, the build succeeds. But when I try to use pdf generation, the files are resolved relative to root directory.

    Any idea why this is the case?

    You can find the sample project here

    https://github.com/thekalinga/asciidoctor-2-test

    Html file generation is fine, but not pdf generation*
    Jorge Aguilera
    @jorge.aguilera_gitlab