Closed shimizukawa closed 9 years ago
From Anonymous on 2011-05-31 01:57:22+00:00
+1
Also:
From Anonymous on 2011-07-07 12:50:17+00:00
I have the same issue. I'm including one image, but it's creating 32(!!!) duplicates of it, and linking to the latest one in the html. Going to give your function a try, thanks.
From Vadi on 2011-07-07 13:02:02+00:00
The original fix didn't work for me though. I added the new method, changed the import in init and the call to it, yet it still duplicates files.
From adamgreenhall on 2011-08-09 19:22:34+00:00
Same problem as Vadi. Christophe what else did you do besides adding the no_duplicate_copyfile function?
From Alain Spineux on 2011-09-15 10:58:18+00:00
I suffer the same problem.
Here is what I do: I put my images \ in //_static// directory referenced by html_static_path**
and I have modified //post_process_images()// in builders/init.py to no handle images that are already in _static directory.
{{{
--- builders/init.py.orig 2011-09-15 12:35:50.502528977 +0200 +++ builders/init.py 2011-09-15 12:35:29.319501094 +0200 @@ -148,6 +148,13 @@ continue node['uri'] = candidate else:
}}}
This is part of the solution, but the final solution require more works :
Alain Spineux
From Georg Brandl on 2011-09-22 10:02:49+00:00
Fix #704: image file duplication bug.
→ <<cset 020daea23f09d445eb09607c6a6e0281c464ab9d>>
From Georg Brandl on 2011-09-22 10:14:35+00:00
Removing milestone: 1.0 (automated comment)
From Anonymous on 2012-07-22 06:00:47+00:00
Hi,
we are seeing the same problem on ubuntu 12.04 LTS, python-sphinx package version 1.1.3+dfsg-2ubuntu2.1, resulting in a duplicate set of images for each of our 8 language translations.. 45mb of docs balloon to 440mb!
files: http://trac.osgeo.org/osgeo/browser/livedvd/gisvm/trunk/doc
out ticket: https://trac.osgeo.org/osgeo/ticket/952
thanks, Hamish / The OSGeo Live DVD project http://live.osgeo.org
From Angelos Tzotsos on 2014-06-10 08:44:27+00:00
Hi,
We are still having the same problem in Ubuntu 14.04 and Sphinx 1.2.2 as Hamish mentioned above.
Thanks, Angelos / The OSGeo Live DVD project http://live.osgeo.org
From Takayuki Shimizukawa on 2014-06-11 11:17:31+00:00
Hamish, Angelos Tzotsos, I can't reproduce the behavior this issue mentioned.
If you mean that sphinx should share the image directory for each build output, I think it's a new proposal.
Please make another ticket. Or, your contribution is always welcome :)
Hello all,
I am making a website with plenty of figures, and I am very annoyed everytime I am running make html (or sphinx-build -b html -d _build/doctrees . _build/html MY_RST_FILES).
My figures are in a complete different folder (i.e. outside the website folder or tree).
When I run make html (or sphinx-build -b html -d _build/doctrees . _build/html MY_RST_FILES), and the images have never been copied in _images before, then they are copied in it and everything is fine.
But when I run make html (or sphinx-build -b html -d _build/doctrees . _build/html MY_RST_FILES), and the images have already been copied in _images before, then they are copied again and their name is change to fig_nameN.ext were N is an integer from 1 depending on how many duplicates are already there.
This was particularly annoying because of the time and storage waste.
In the module Sphinx-1.0.7-py2.5.egg/sphinx/util/osutil.py, I created a new function no_duplicate_copyfile:
My problem is solved and I hope that this solution may help someone else. If another solution already existed, I'd be interested in knowing.
Thanks Christophe.