-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsciiDoc filters generate images on disk (even when embedded) #29
Comments
On 14 February 2012 23:43, Dag Wieërs
Asciidoc does not know what a filter does or when its output may be
|
Welcome back ! Yes, I don't want to get rid of support for files on disk, but currently when you have inline ascii-diagrams, resulting in embedded diagrams. Your directory is full of unwanted images, and I think we should find a way to fix that. |
On 15 February 2012 01:14, Dag Wieërs
Well, to delete "unwanted" images we need to know the definition of an Since the filter's images go in the same directory as user supplied Somehow a2x has to find out:
If a file meets both requirements then they are no longer needed and Filters can probably be made to write a list of files they generate Note that you can put images in a subdirectory so they don't clutter Cheers
|
You are now specifically discussing a2x, while I was referring to asciidoc. But regardless of how it is implemented today, let's think about how it would look if we would implement it with the requirement to support embedded images. I can imagine a mechanism where asciidoc instructs the filter to get base64, or the image binary data, rather than a reference to a file. So if uri-data is enabled, the filters behave differently in that respect. Of course asciidoc would also need to make a clear distinction between embedded image blocks and normal image blocks. The current way of doing that really clutters up the backend file. If only I could reclaim the hours spent ;-) |
On 15 February 2012 19:40, Dag Wieërs
Well asciidoc actually expects filters to pass the output directly to "All" you have to do is re-write all filters to return base64 encoded But since filters are external plugins they are going to do what they Hence my suggestion that you may have to use a2x to clean up the mess
|
The mechanism I was talking about was more a standard interface plugins should adhere to by the AsciiDoc project. Do you think it is worthwhile to discuss on the AsciiDoc mailinglist ? Also, the a2x currently has a problem slightly related to this, when parsing README.odt:
|
[...] On 16 February 2012 06:21, Dag Wieërs
Can't hurt, but remember that filters are external programs and Currently filters don't know if their output is going to be linked or
The proper path wasn't being recorded, should be fixed in git Cheers
|
Currently AsciiDoc filters generate images on disk, but for flat XML files and HTML files that use embedded images, this is unneeded and undesirable. It would be nice if AsciiDoc could either prevent any files to be written on disk, but instead use base64 immediately, or instead clean up the files on disk after embedding.
The text was updated successfully, but these errors were encountered: