On 05/08/2013 08:20 PM, Lex Trotman wrote:
As you can see imagesdir is interpolated into the middle of a path, so
it can't be absolute.
some tests shows that conclusion...
but I just did one more test:
I changed this,
ifdef::data-uri[]
#shaape-style=template="shaape-block",subs=(),posattrs=("style","target"),filter='shaape
-o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" --hash {scaling?
--scale {scaling}} {width? --width {width}} {height? --height {height}}-'
to this:
#ping:
shaape-style=template="shaape-block",subs=(),posattrs=("style","target"),filter='shaape
-o "{outdir={indir}}/{target}" --hash {scaling? --scale {scaling}}
{width? --width {width}} {height? --height {height}}-'
endif::data-uri[]
and now with this command:
asciidoc -v -a numbered -a toc2 -a toclevels=4 -a
iconsdir=/home/ping/bin/asciidoc-8.6.8/images/icons -a icons -a
imagesdir=/mnt/public_html/webdata/vim-jtac-
work -a data-uri -o
/mnt/smbwf-sam/home/public_html/webdata/vim-jtac-work/vim-jtac-work.html
-a leveloffset=0@ -b html5 vim-jtac-work.txt
I got the desired result, and turning on verbose I'm now seeing:
asciidoc: <stdin>: line 2553: filtering: shaape -o
"/mnt/smbwf-sam/home/public_html/webdata/vim-jtac-work/vim-jtac-work__1.png"
--hash --scale 0.5 -
asciidoc: <stdin>: line 2553: evaluating:
{eval:os.path.splitext(r'vim-jtac-work__1.png')[1][1:]}
asciidoc: <stdin>: line 2553: evaluating:
{eval:os.path.join(r"/usr/local/etc/asciidoc",r"/mnt/public_html/webdata/vim-jtac-work",r"vim-jtac-work__1.png")}
asciidoc: <stdin>: line 2553: evaluating: {sys:"/usr/bin/python" -u -c
"import base64,sys; base64.encode(sys.stdin,sys.stdout)" <
"/mnt/public_html/webdata/vim-jtac-work/vim-jtac-work__1.png"}
asciidoc: <stdin>: line 2553: shelling: "/usr/bin/python" -u -c "import
base64,sys; base64.encode(sys.stdin,sys.stdout)" <
"/mnt/public_html/webdata/vim-jtac-work/vim-jtac-work__1.png" >
"/tmp/tmpiLyjg5"
so now the imagesdir seems become "absolute" path?
1) when filter shaape generate the image, it put into the folder as same
as the asciidoc output doc folder (-o xxx)
2) then when asciidoc work on data-uri, it use absolute path defined by
"imagesdir" to find the image, and found it.
is my understanding correct? or I still miss sth?
man, this one is taking me long time to understand.. killing me...
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.