![]() |
#16 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
I released a new version (0.0.6) which adds a lot of stuff :
Please download it from the project page ; I hope you'll enjoy it, remember to report if you find any bugs. Also, feel free to register an account at Sourceforge and submit bug reports, and support or feature requests, I'll be happy to implement them ! PS : I'd like to warmly thank Jane and Ian for their patience, their support, and their help ! |
![]() |
![]() |
![]() |
#17 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I tried the latest version against my library which has about 8000 books in it and got the following
Code:
11:06:53,521 INFO [Catalog] Generating tags catalog Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac e at java.awt.image.DataBufferInt.<init>(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknow n Source) at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source) at sun.awt.image.ImageRepresentation.setPixels(Unknown Source) at sun.awt.image.ImageDecoder.setPixels(Unknown Source) at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source) at sun.awt.image.JPEGImageDecoder.readImage(Native Method) at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source) Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac e at java.awt.image.DataBufferInt.<init>(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknow n Source) at sun.awt.image.ImageRepresentation.createBufferedImage(Unknown Source) at sun.awt.image.ImageRepresentation.setPixels(Unknown Source) at sun.awt.image.ImageDecoder.setPixels(Unknown Source) at sun.awt.image.JPEGImageDecoder.sendPixels(Unknown Source) at sun.awt.image.JPEGImageDecoder.readImage(Native Method) at sun.awt.image.JPEGImageDecoder.produceImage(Unknown Source) at sun.awt.image.InputStreamImageSource.doFetch(Unknown Source) at sun.awt.image.ImageFetcher.fetchloop(Unknown Source) at sun.awt.image.ImageFetcher.run(Unknown Source) Note that as well as being 8000 books, there will normally be about 4 formats for each books plus the cover so there are lot of files and folders in the library (total size on disk is ~12GB). The system I was running on was using Window 7 Pro and has 2GB RAM. Last edited by itimpi; 12-14-2009 at 10:44 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
The problem is that Java, by default, only reserves 64Mb of RAM for its processes.
In your case (a very, very large library), this is not enough. I made a correction, which will be included in the next release. In the meantime, you should be able to run the tool if you edit the calibredbxtract.bat file, inside the bin subfolder of the directory where you installed the tool : replace the line showing set EXTRA_JVM_ARGUMENTS= with set EXTRA_JVM_ARGUMENTS=-Xmx256m |
![]() |
![]() |
![]() |
#19 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Quote:
Quote:
Maybe you should add soething about the RAM requirements v Library size to the README file? You do not want to make the tool grab a lot of RAM for those who have much smaller libraries so simply telling people what to do if the error requires might be the way forward? |
|||
![]() |
![]() |
![]() |
#20 | |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
Quote:
I think that 256 Mb of RAM is a very small chunk of most modern computers, especially with virtual memory ; also, the tool is meant to run a few times every hour or day, and will be running for 5 to 20 seconds on most computers. So, IMHO, leaving this as the default value is perfectly acceptable, and the advanced users who know they don't need as much and want to minimize the tool's impact on their computer can edit the script... Anyway, thanks for pointing out the problem, I have such a small library (176 books) that it would never have happened to me ![]() Regards, David. PS: I took for granted that you used Windows, but the edit I mentionned works also in the Unix shell script that resides in the same directory, of course... |
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
With the RAM set to 256MB the tool completed without an issue (it looked a though peak RAm was about 110MB). However it took a LONG time, and generated 15314 files totalling 260MB in size!
Some comment on the output:
I have (finally) started getting seriously into the Python version that will be able to handle large libraries as the pages will be generated dynamically on demand directly from the metadata database. If you do not mind I will "borrow" some of the ideas from your implementation. One big advantage that dynamic pages give is the ability to support search functions as well as avoiding the time overhead of generating the static catalogs. I am trying to write the Python is such a way that it can either be integrated into Calibre, or alternatively run as a free-standing piece of code under a web server such as Apache (so that calibre itself does not need to be running). Whether I can actually achieve that I am not yet sure. It may as a by-product also be able to output the static catalog files - do you have any objection to it possibly superseding your tool? |
![]() |
![]() |
![]() |
#22 |
Connoisseur
![]() ![]() Posts: 91
Karma: 108
Join Date: Jan 2008
Device: Palm Treo 680, Sony Reader
|
Of course, one advantage of a thoroughly free-standing web-database such as this is that we Apple users can dump the output into our "Sites" folder on our iDisk and access it anywhere without running a server at all!
Calibre doesn't take much resource when it's just running the online library. What's the advantage of your Python code? Better customization? Or are you just trying to avoid having to run 2 servers? Since it's in Python, I wonder if there are some features that would be useful if rolled into Calibre. - Jim |
![]() |
![]() |
![]() |
#23 | ||||||||
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
You know what ? When I read and answered your first post about memory requirements, I didn't realize that it was you
![]() If I had, I'd have started a conversation about the project ! Quote:
I found out that Stanza did not support this feature of the OPDS standard, and then I rewrote everything to include the full book entry in the books lists. This, of courses, makes for a much bigger output than the first solution... And then, the thumbnail generated are, of course, a huge part in this big space... Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
![]() That's great (having news about the Python version at last), I can't hide that I began this project because I thought that your Python script development was cancelled ! And of course I don't mind you borrowing, I even would like to help if I can... Maybe I can explain the pitfalls I managed to avoid, and if I can upgrade my Python-fu to second dan, I may even be able to help you code ? To be honest, I coded this in Java to be quick, because I know this language very well. But I know a bit of Python, and I'd love to learn more, if you're patient enough ![]() Quote:
Feel free to contact me (dpierron at gmail dot com) about this, whatever your opinion about merging is ; in any case, I'll be more than happy to help and to share ! Cheers, David. |
||||||||
![]() |
![]() |
![]() |
#24 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#25 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
Quote:
The thought was that the Python version would follow quite quickly, but the Calibre2Web script worked well enough that there was not enough personal pressure to get on with the Python version. There was also the overhead of learning one's way around the exisitng Calibre code. Now that my library size is growing I find that the static catalog approach is becoming a bit unwieldy in terms of the time required to generate the catalogs. Quote:
![]() Quote:
Cheers, Dave |
||||
![]() |
![]() |
![]() |
#26 |
Member
![]() Posts: 20
Karma: 10
Join Date: Dec 2009
Device: iphone
|
Thank for useful tool, I have question, how can I edit or set text which is generated to html / xml pages, for example this text: "Alphabetical index of the single author - very useful indeed
![]() |
![]() |
![]() |
![]() |
#27 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
Hi cistehovado, you're welcome !
There are two parts in my answer... First, the tool is not internationalized yet (although it's on my todo list, and if I've got enough time before XMas, I'll make it in the next release). When it will be internationalized, the texts will still not be user-editable, but if you want to translate the tool in your language, you'll be more than welcome ! At this point, all that will be needed will be to translate an english text file into whatever language you like, and send it back to me... Piece of cake, when you speak both english and that other language ![]() Secondly, this cheesy sentence is there because there is only one author in your authors list ; this should not happen often, but maybe I could enhance the tool by skipping the authors list altogether when there is only one (and maybe, also extend this concept to other items ?)... I'll see what I can do. Regards, David. |
![]() |
![]() |
![]() |
#28 |
Member
![]() Posts: 20
Karma: 10
Join Date: Dec 2009
Device: iphone
|
I can translate it of course, but I need all text used in program.
I really do have only 1 author ;-) I thought that that message there will be always, but its kinda programmer joke I see ;-) |
![]() |
![]() |
![]() |
#29 | ||
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
Quote:
Quote:
![]() |
||
![]() |
![]() |
![]() |
#30 |
calibre2opds guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 8792
Join Date: Aug 2005
Location: Metz, France
Device: iPhone, iPad, PRS-650
|
new release 0.0.7
I released a new version (0.0.7) which adds and corrects a lot of stuff :
Please download it from the project page ; I hope you'll enjoy it, remember to report if you find any bugs. Also, feel free to register an account at Sourceforge and submit bug reports, and support or feature requests, I'll be happy to implement them ! Beginning in this release, it is possible to translate the tool in other languages than english. I already contributed a french translation, and I count on you guys to help me get really international ![]() The translation files are attached to this post ; they should be self-explanatory, if not, feel free to contact me. When a translation is finished, send the files to me and I'll include them in the next release. In these files, lines starting with a dash (#) are comments, and you have to escape (by doubling them) single quotes (i.e. ' becomes '') |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre->Calibre2Opds->Fbreader Network Library - No Download Icon | boredsysadmin | Calibre | 2 | 01-16-2011 08:00 PM |
Your personal online OPDS-library | wdonne | Self-Promotions by Authors and Publishers | 9 | 01-04-2011 03:34 AM |
Calibre, calibre2opds,and NOOK - best way to keep catalog up to date? | rubyv | Calibre | 8 | 09-01-2010 12:16 AM |
Call for comments: OPDS Catalogs 0.9 draft (open catalog standard ebooks) | zelda_pinwheel | News | 4 | 05-14-2010 01:02 PM |