|  01-02-2013, 08:21 AM | #1 | 
| Junior Member  Posts: 8 Karma: 12 Join Date: Jun 2009 Device: Sony PRS-T1 | 
				
				Recipe for Le Monde Diplomatique, edición Cono Sur (Argentina)
			 
			
			Greets, all. I've taken my first shot at writing a recipe. It's for fetching Le Monde Diplomatique edición Cono Sur (Argentina), which is in Spanish. It requires a subscription. You can find the recipe here. I'd welcome any feedback if anyone finds it useful. Cheers! Last edited by tdido; 01-02-2013 at 08:21 AM. Reason: typo | 
|   |   | 
|  01-02-2013, 01:10 PM | #2 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			You've got some linux specific code in there for getting covers, that should be removed.
		 | 
|   |   | 
| Advert | |
|  | 
|  01-02-2013, 03:36 PM | #3 | |
| Junior Member  Posts: 8 Karma: 12 Join Date: Jun 2009 Device: Sony PRS-T1 | Quote: 
 I'll try to test the recipe in a Windows machine as soon as I get access to one. Cheers! Last edited by tdido; 01-02-2013 at 04:21 PM. | |
|   |   | 
|  01-02-2013, 10:53 PM | #4 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Couple of things: 1) Dont use NamedTemporaryFile, use one of the functions from calibre.ptempfile instead as they handle temp file locations in a consistent manner. 2) Dont use PIL, use the save_cover_data_to function from calibre/utils/magick/draw.py it is more robust (PIL is unmaintained, that function uses ImageMagick). | 
|   |   | 
|  01-03-2013, 07:50 AM | #5 | ||
| Junior Member  Posts: 8 Karma: 12 Join Date: Jun 2009 Device: Sony PRS-T1 | Quote: 
 Quote: 
 Thanks! | ||
|   |   | 
| Advert | |
|  | 
|  01-03-2013, 10:42 PM | #6 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Use minify_image and apss the resulting image object to save_cover_data
		 | 
|   |   | 
|  01-05-2013, 11:10 AM | #7 | 
| Junior Member  Posts: 8 Karma: 12 Join Date: Jun 2009 Device: Sony PRS-T1 | 
			
			In the end I used your "Image" wrapper class, which provides a "crop" and a "save" methods, exactly what I needed. No optional Python modules used anymore   Thanks for the help, and let me know if there's anything else that could be improved. Cheers! | 
|   |   | 
|  01-05-2013, 12:59 PM | #8 | 
| creator of calibre            Posts: 45,604 Karma: 28548974 Join Date: Oct 2006 Location: Mumbai, India Device: Various | 
			
			Merged.
		 | 
|   |   | 
|  | 
| Tags | 
| calibre, calibre recipes, news | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Le Monde Diplomatique en Esperanto | btab | Recipes | 0 | 01-02-2013 04:07 AM | 
| Recipe for Le Monde subscribers? | Thomas92 | Recipes | 0 | 12-27-2011 04:50 AM | 
| recipe doesn't read my Le Monde Diplomatique subscription! | dolcem | Recipes | 1 | 10-16-2011 07:25 PM | 
| Improved recipe for Le Monde | veezh | Recipes | 0 | 02-25-2011 04:14 AM | 
| E-Books Le monde du 6 Novembre sur les livres numériques | aceflor | Forum Français | 5 | 11-15-2010 06:46 AM |