I am glad that it finally works for you, I will add the ubuntu dependencies 
to the install guide.
If you have problems with shaape, you may consider positing them on the 
github page of shaape as an issue, it's much simpler to track problems 
there (https://github.com/christiangoltz/shaape)
To your problems:

2) This sounds like it is already solved in the latest development version 
of shaape. This has to do with the way the filter plugin works. I didn't 
write the filter plugin on my own, but copied it at the first try. I 
updated it again now, so the data-uri stuff should work on the development 
branch on github, but nobody really tried that feature yet I guess. The 
development branch can be found 
here https://github.com/christiangoltz/shaape/tree/develop.

1) Shaape can take quite long to process an image depending on the text 
input, your machine power and the rendering target format. Generally I can 
tell you that:
 - a lot of crossings and stacked cycles take longer to process (shaape 
matches all simple cycles and all paths found)
 - rendering to a png will eat a lot of cpu for the shadows (these are 
blurred via gaussian blur pixel wise)... even if there are now shadows 
present in a picture, all shadow layers would be blurred.

If you want to help finding out what could take that long, you can either 
provide me your ascii source image or run shaape without asciidoc as a 
standalone script on your ascii source image and use instrumental 
(https://pypi.python.org/pypi/instrumental) or some other instrumentation 
tool to for python to see which functions eat up most of the time.

Regards
Christian

Am Sonntag, 28. April 2013 22:38:28 UTC+2 schrieb ping:
>
>  hi christian (or asciidoc authors if this looks an asciidoc config 
> issue):
> please help!
>
> my quick test shows it works and looks really nice!
>
> but just some annoying issues : 
>
> 1) cpu high and take about 1 or 2 minutes to generate the graph:
>
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
> 22315 ping      20   0  159m  43m 5236 R  100  0.6   1:42.73 shaape
>
> 2) where will the graph be generated? 
>
> test1:
> :w !asciidoc -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
> sh: /mnt/public_html/webdata/vim-jtac-work/vim-jtac-work__1.png: No such 
> file or directory
> asciidoc: WARNING: <stdin>: line 2429: {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"}: non-zero 
> exit status
>
> here with imagedir, it look for the correct place 
> (/mnt/public_html/webdata/vim-jtac-work) , but nothing can be found, 
> because it put the generated graph in:
>
> /mnt/public_html/webdata/vim-jtac-work$ tree mnt/
> mnt/
> └── public_html
>     └── webdata
>         └── vim-jtac-work
>             ├── vim-jtac-work__1.png
>             └── vim-jtac-work__1.png.md5
>
> making it 
> /mnt/public_html/webdata/vim-jtac-work/mnt/public_html/webdata/vim-jtac-work/vim-jtac-work__1.png
>
> so asciidoc couldn't find it.
>
> test2: without imagesdir
> :w !asciidoc -a numbered -a toc2 -a toclevels=4 -a 
> iconsdir=/home/ping/bin/asciidoc-8.6.8/images/icons -a icons -a data-uri -o 
> /mnt/smbwf-sam/home/public_html/webdata/vim-jtac-work/vim-jtac-work.html  
> -b html5 -
> sh: /usr/local/etc/asciidoc/vim-jtac-work__1.png: No such file or directory
> asciidoc: WARNING: <stdin>: line 2429: {sys:"/usr/bin/python" -u -c 
> "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < 
> "/usr/local/etc/asciidoc/vim-jtac-work__1.png"}: non-zero exit status
> sh: /usr/local/etc/asciidoc/editor-learning-curve.png: No such file or 
> directory
> asciidoc: WARNING: <stdin>: line 3220: {sys:"/usr/bin/python" -u -c 
> "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < 
> "/usr/local/etc/asciidoc/editor-learning-curve.png"}: non-zero exit status
>
> now it looks into somewhere else (/usr/local/etc/asciidoc/) for the 
> generated image, still couldn't find it...
>
> test3: without data-uri
>
> :w !asciidoc -a numbered -a toc2 -a toclevels=4 -o 
> /mnt/smbwf-sam/home/public_html/webdata/vim-jtac-work/vim-jtac-work.html  
> -b html5 -
>
> so if I remove the data-uri, then I got the picture generated as 
> /mnt/public_html/webdata/vim-jtac-work$vim-jtac-work__1.png, and the 
> generated page looks fine with the picture, but I do need the data-uri , so 
> the webpage will have embed graphs...
>
> how to make it support data-uri better ?
> why asciidoc try to look at /usr/local/etc/asciidoc/ for the generated 
> images?
> these are pretty annoying...
>
> thanks!
>
> regards
> ping
>
> On 4/28/2013 3:30 PM, ping wrote:
>  
> I finally got it installed..
> it's just as easy as :
> sudo apt-get install python-numpy python-scipy
>
> b.t.w I'm currently seeking for a better text-to-image solution -- I feel 
> this is really handy as a "keeping as pure text but converting to graph" 
> philosophy...
> will abandon aafigure and try shaape for now...
>
> thanks!
>
> regards
> ping
>
> On 3/19/2013 2:13 PM, Christian Goltz wrote:
>  
> Did you manage to solve the dependency problem? It seems like scipy 
> depends on some heavy stuff (ATLAS and Blas). As I currently only use one 
> function from the library(gaussian_filter), it may be reasonable enough to 
> implement the filter myself and get rid of scipy. 
>
>  To solve the problem right now, you most probably have to install the 
> ATLAS and Blas libraries that come with your distribution. There are some 
> hints at http://www.scipy.org/Installing_SciPy/BuildingGeneral
>
>  Gruß
> Christian
>
> Am Samstag, 16. März 2013 05:34:24 UTC+1 schrieb ping: 
>>
>> On 3/16/2013 12:20 AM, ping wrote: 
>> > On 3/14/2013 6:25 PM, Christian Goltz wrote: 
>> >> Hey Stuart, 
>> >> did you already add shaape to the plugins page of asciidoc? I didn't 
>> >> find it there yet. Would be cool to see it there as I currently need 
>> >> some more input from people using the tool to find some more bugs. I 
>> >> appended the current readme with some examples as a little appetizer 
>> >> that shows the features of the last release, including, transparency 
>> >> and multiple layers of polygons. 
>> > 
>> > hi, 
>> > I'm testing it and ran into some issues: 
>> > 
>> > 
>> > ping@640g-laptop:~$ git clone 
>> > https://github.com/christiangoltz/shaape.git 
>> > Cloning into 'shaape'... 
>> > remote: Counting objects: 1412, done. 
>> > remote: Compressing objects: 100% (626/626), done. 
>> > remote: Total 1412 (delta 908), reused 1268 (delta 764) 
>> > Receiving objects: 100% (1412/1412), 6.81 MiB | 4.69 MiB/s, done. 
>> > Resolving deltas: 100% (908/908), done. 
>> > 
>> > ping@640g-laptop:~/shaape$ asciidoc --filter install build/shaape.zip 
>> > asciidoc: filter is already installed: 
>> > /home/ping/.asciidoc/filters/shaape 
>> > 
>> > 
>> > file: temp.txt 
>> > 
>> > = shaape 
>> > 
>> > ping@640g-laptop:~/shaape$ asciidoc --filter install build/shaape.zip 
>> > asciidoc: filter is already installed: 
>> > /home/ping/.asciidoc/filters/shaape 
>> > 
>> > 
>> > [shaape] 
>> > --------------------------------------------------------------------- 
>> >     +---+   v      <     v 
>> >  -->|   |    \    /     >+< 
>> >  -->+   |     \  /       ^ 
>> >     |   |     ^ > 
>> >     +---+ 
>> > --------------------------------------------------------------------- 
>> > 
>> > 
>> > asciidoc temp.txt 
>> > 
>> > Traceback (most recent call last): 
>> >   File "/usr/local/bin/shaape", line 5, in <module> 
>> >     pkg_resources.run_script('shaape==1.0.0', 'shaape') 
>> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, 
>> > in run_script 
>> >     self.require(requires)[0].run_script(script_name, ns) 
>> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, 
>> > in run_script 
>> >     execfile(script_filename, namespace, namespace) 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/EGG-INFO/scripts/shaape",
>>  
>>
>> > line 3, in <module> 
>> >     import shaape.run 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/run.py",
>>  
>>
>> > line 3, in <module> 
>> >     from nameparser import NameParser 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/nameparser.py",
>>  
>>
>> > line 1, in <module> 
>> >     from parser import Parser 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/parser.py",
>>  
>>
>> > line 1, in <module> 
>> >     from drawable import Drawable 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/drawable.py",
>>  
>>
>> > line 3, in <module> 
>> >     import networkx as nx 
>> > ImportError: No module named networkx 
>> > asciidoc: WARNING: <stdin>: line 13: filter non-zero exit code: shaape 
>> > -o "/home/ping/Dropbox/temp-transfer/temp__1.png" --hash   -: returned 
>> 1 
>> > asciidoc: WARNING: <stdin>: line 13: no output from filter: shaape -o 
>> > "/home/ping/Dropbox/temp-transfer/temp__1.png" --hash - 
>> > sh: /usr/local/etc/asciidoc/temp__1.png: No such file or directory 
>> > asciidoc: WARNING: <stdin>: line 13: {sys:"/usr/bin/python" -u -c 
>> > "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < 
>> > "/usr/local/etc/asciidoc/temp__1.png"}: non-zero exit statu 
>> > s 
>> > 
>> > 
>> > 
>> > 
>> > 
>> > ping@640g-laptop:~$ sudo easy_install shaape 
>> > [sudo] password for ping: 
>> > Searching for shaape 
>> > Reading http://pypi.python.org/simple/shaape/ 
>> > Reading http://github.com/christiangoltz/shaape 
>> > Best match: shaape 1.0.0 
>> > Downloading 
>> > 
>> http://pypi.python.org/packages/source/s/shaape/shaape-1.0.0.tar.gz#md5=afa9234128c733c7551f8b694ccbd0d3
>>  
>> > Processing shaape-1.0.0.tar.gz 
>> > Running shaape-1.0.0/setup.py -q bdist_egg --dist-dir 
>> > /tmp/easy_install-zXbbEW/shaape-1.0.0/egg-dist-tmp-FONfI_ 
>> > zip_safe flag not set; analyzing archive contents... 
>> > Adding shaape 1.0.0 to easy-install.pth file 
>> > Installing shaape script to /usr/local/bin 
>> > 
>> > Installed /usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg 
>> > Processing dependencies for shaape 
>> > Finished processing dependencies for shaape 
>> > ping@640g-laptop:~$ 
>> > ping@640g-laptop:~$ 
>> > ping@640g-laptop:~$ shaape 
>> > Traceback (most recent call last): 
>> >   File "/usr/local/bin/shaape", line 5, in <module> 
>> >     pkg_resources.run_script('shaape==1.0.0', 'shaape') 
>> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, 
>> > in run_script 
>> >     self.require(requires)[0].run_script(script_name, ns) 
>> >   File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, 
>> > in run_script 
>> >     execfile(script_filename, namespace, namespace) 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/EGG-INFO/scripts/shaape",
>>  
>>
>> > line 3, in <module> 
>> >     import shaape.run 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/run.py",
>>  
>>
>> > line 3, in <module> 
>> >     from nameparser import NameParser 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/nameparser.py",
>>  
>>
>> > line 1, in <module> 
>> >     from parser import Parser 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/parser.py",
>>  
>>
>> > line 1, in <module> 
>> >     from drawable import Drawable 
>> >   File 
>> > 
>> "/usr/local/lib/python2.7/dist-packages/shaape-1.0.0-py2.7.egg/shaape/drawable.py",
>>  
>>
>> > line 3, in <module> 
>> >     import networkx as nx 
>> > ImportError: No module named networkx 
>> > ping@640g-laptop:~$ 
>> > ping@640g-laptop:~$ 
>>
>> looks I ran into endless python dependency hole ... 
>>
>> ping@640g-laptop:~$ sudo easy_install scipy 
>> Searching for scipy 
>> Reading http://pypi.python.org/simple/scipy/ 
>> Reading http://www.scipy.org 
>> Reading 
>>
>> http://sourceforge.net/project/showfiles.php?grohttp://ubuntuforums.org/showthread.php?t=1904134up_id=27747&package_id=19531<http://sourceforge.net/project/showfiles.php?group_id=27747&package_id=19531>
>>  
>> Reading http://new.scipy.org/Wiki/Download 
>> Best match: scipy 0.11.0 
>> Downloading 
>>
>> http://pypi.python.org/packages/source/s/scipy/scipy-0.11.0.zip#md5=40b700ddde9ddab643b640fff7a9d753
>>  
>> Processing scipy-0.11.0.zip 
>> Running scipy-0.11.0/setup.py -q bdist_egg --dist-dir 
>> /tmp/easy_install-muwhDM/scipy-0.11.0/egg-dist-tmp-HFpw2A 
>> Running from scipy source directory. 
>> /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1423: 
>> UserWarning: 
>>      Atlas (http://math-atlas.sourceforge.net/) libraries not found. 
>>      Directories to search for the libraries can be specified in the 
>>      numpy/distutils/site.cfg file (section [atlas]) or by setting 
>>      the ATLAS environment variable. 
>>    warnings.warn(AtlasNotFoundError.__doc__) 
>> /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1432: 
>> UserWarning: 
>>      Blas (http://www.netlib.org/blas/) libraries not found. 
>>      Directories to search for the libraries can be specified in the 
>>      numpy/distutils/site.cfg file (section [blas]) or by setting 
>>      the BLAS environment variable. 
>>    warnings.warn(BlasNotFoundError.__doc__) 
>> /usr/lib/python2.7/dist-packages/numpy/distutils/system_info.py:1435: 
>> UserWarning: 
>>      Blas (http://www.netlib.org/blas/) sources not found. 
>>      Directories to search for the sources can be specified in the 
>>      numpy/distutils/site.cfg file (section [blas_src]) or by setting 
>>      the BLAS_SRC environment variable. 
>>    warnings.warn(BlasSrcNotFoundError.__doc__) 
>> error: 
>>      Blas (http://www.netlib.org/blas/) libraries not found. 
>>      Directories to search for the libraries can be specified in the 
>>      numpy/distutils/site.cfg file (section [blas]) or by setting 
>>      the BLAS environment variable. 
>>
>  -- 
> 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] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/asciidoc?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>  
> 

-- 
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.


Reply via email to