Bug 1100468 - Asciidoc import needs to be able to include external files
Summary: Asciidoc import needs to be able to include external files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: ImportTool
Version: 1.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.7
Assignee: Matthew Casperson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-22 21:22 UTC by Matthew Casperson
Modified: 2014-08-04 22:28 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-22 21:32:43 UTC
Embargoed:


Attachments (Terms of Use)
Asciidoc include test (773 bytes, application/zip)
2014-06-09 23:15 UTC, Matthew Casperson
no flags Details
Asciidoc include test (109.36 KB, application/zip)
2014-06-10 00:19 UTC, Matthew Casperson
no flags Details
Asciidoc include test (147.27 KB, application/zip)
2014-06-10 22:23 UTC, Matthew Casperson
no flags Details

Description Matthew Casperson 2014-05-22 21:22:38 UTC
Asciidoc has the ability to include other files: http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files. The import tool needs to be updated to resolve these external references.

Comment 1 mmurray 2014-05-22 23:51:17 UTC
+1

The JBDS User Guide is split over 8? adoc files and there is one adoc file that references them all as a kind of spec I suppose.

Comment 2 Matthew Casperson 2014-06-09 22:25:11 UTC
Asciidoctor has a include test file: https://github.com/asciidoctor/asciidoctor/blob/master/test/fixtures/parent-include.adoc

Comment 3 Matthew Casperson 2014-06-09 23:15:28 UTC
Created attachment 906661 [details]
Asciidoc include test

Comment 4 Matthew Casperson 2014-06-09 23:17:00 UTC
Note that it is currently possible for Asciidoctor to generate invalid DocBook if the source Asciidoc doesn't have the correct structure. The parent-include file is an example of this, and it has been logged as a bug at https://github.com/asciidoctor/asciidoctor/issues/971.

The attached file has the correct structure to generate chapters.

Comment 5 Matthew Casperson 2014-06-10 00:19:58 UTC
Created attachment 906678 [details]
Asciidoc include test

Tests including files and images from the current and subdirectories. Also tests includes in comments and invalid includes.

Comment 6 Matthew Casperson 2014-06-10 02:12:48 UTC
Another asciidoctor bug: https://github.com/asciidoctor/asciidoctor/issues/972

Comment 7 Matthew Casperson 2014-06-10 22:23:34 UTC
Created attachment 907441 [details]
Asciidoc include test

Comment 8 Matthew Casperson 2014-06-10 22:31:05 UTC
https://github.com/jbosstools/jbosstools-documentation/blob/master/userguide/src/main/asciidoc/readme.adoc is a good test for this, as it pulls in a number of images and external files.

Note that the :imagesdir: ./images setting at the top of readme.adoc needs to be removed, as the images already reference the images directory. Also the <div> text in the image alt text in mobile_web_tools.adoc (line 259) will have to be removed because of https://github.com/asciidoctor/asciidoctor/issues/972.

Comment 9 Matthew Casperson 2014-06-10 22:32:24 UTC
Fixed in Build 1.7-SNAPSHOT 201406110831

Comment 10 Lee Newson 2014-06-16 04:49:59 UTC
The file list shows files it shouldn't. See:

https://bugzilla.redhat.com/show_bug.cgi?id=1091570#c7
https://bugzilla.redhat.com/show_bug.cgi?id=1091570#c8

Comment 11 Lee Newson 2014-06-16 05:38:56 UTC
The file list should probably be sorted as well, so that it's easier to find the file you are looking for.

Verified for everything else I could think to test, taking into account the points Matt has noted.

Comment 12 Matthew Casperson 2014-06-17 00:07:40 UTC
Sorting added in Build 1.7-SNAPSHOT 201406171006

Comment 13 Matthew Casperson 2014-06-17 00:28:06 UTC
Common image files are filtered out in Build 1.7-SNAPSHOT 201406171026

Comment 14 Lee Newson 2014-06-17 02:05:20 UTC
Verified that images and directories are no longer included in the list and that it is alphabetically sorted.


Note You need to log in before you can comment on or make changes to this bug.