<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Public Mindimagegrabber</title>
	<atom:link href="http://publicmind.in/blog/tag/imagegrabber/feed/" rel="self" type="application/rss+xml" />
	<link>http://publicmind.in/blog</link>
	<description>Simple and Sophisticated</description>
	<lastBuildDate>Thu, 13 May 2010 23:32:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Drupal: Tutorial for Feeds Image Grabber</title>
		<link>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/</link>
		<comments>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 04:45:43 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[fig]]></category>
		<category><![CDATA[imagegrabber]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=529</guid>
		<description><![CDATA[Feeds Image Grabber (FIG) was released on 3rd March, and currently supports the following features: Automatically downloads and attaches image to the node created by Feeds module. Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class). Support for FileField Paths module. [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --><a href="http://drupal.org/project/feeds_imagegrabber">Feeds Image Grabber</a> (FIG) was released on 3rd March, and currently supports the following features:</p>
<ol>
<li>Automatically downloads and attaches image to the node created by Feeds module.</li>
<li>Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class).</li>
<li>Support for <a href="http://drupal.org/project/filefield_paths">FileField Paths</a> module.</li>
<li>Configurable maximum image size.</li>
<li>Configurable minimum and maximum image resolutions.</li>
</ol>
<p>In this post, I will briefly demonstrate how to configure the settings for FIG to efficiently grab images for feed items.<br />
<span id="more-529"></span><br />
<strong>Image Field Settings:</strong></p>
<p>Feeds module will create nodes from feed-items of content type as chosen in the FeedsNodeProcessor settings. FIG will store the image grabbed in an image field attached to the node of this content type. Therefore, you must add an image field to this content type. For example, if the content type of feed-items is <em>story</em>, you need to go to <em>admin &gt; content types &gt; story &gt; manage fields</em> and add a field of type <em>File</em> and widget <em>Image</em>. (<a href="http://drupal.org/node/609628">http://drupal.org/node/609628</a>)</p>
<p>Configure the settings of the image field, such as extensions, minimum and maximum resolution, maximum size, etc. While grabbing the image, FIG will automatically take into consideration the settings of the image field to which the downloaded image will be mapped.</p>
<p><strong>Mapping Settings:</strong></p>
<p>Now, you must go to the mapping settings for the <em>Node Processor</em> of the <em>Feed Importer </em>and map <em>Item URL (Link) </em>to one of the available imagefields which are appended by &#8220;<em>(FIG)</em>&#8220;.</p>
<div id="attachment_530" class="wp-caption aligncenter" style="width: 692px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/03/target-mappings.jpg"><img class="size-full wp-image-530" title="target-mappings" src="http://publicmind.in/blog/wp-content/uploads/2010/03/target-mappings.jpg" alt="Mapping Settings" width="682" height="427" /></a><p class="wp-caption-text">Mapping for Node Processor</p></div>
<p><strong>Feeds Image Grabber Settings:</strong></p>
<p>After enabling FIG and configuring the above settings, you will see the following additional form whenever you create or edit a feed.</p>
<div id="attachment_532" class="wp-caption aligncenter" style="width: 762px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/03/fig-form.jpg"><img class="size-full wp-image-532 " title="fig-form" src="http://publicmind.in/blog/wp-content/uploads/2010/03/fig-form.jpg" alt="fig-form" width="752" height="453" /></a><p class="wp-caption-text">FIG config form</p></div>
<p>Here is a brief explanation of the available fields:</p>
<ol>
<li>Enable Feeds Image Grabber: As the description says, check this box if you want FIG to download images of the feed items created by this feed.</li>
<li>Search for an image between the tag identified by: It has been explained before <a href="http://publicmind.in/blog/tutorial-for-feedapi-imagegrabber/#tag-options" target="_blank">here</a>.</li>
<li>Feeling Lucky: FIG will select the first image between the tag if the &#8220;yes&#8221; is selected, else will search for all the images to find the largest image between the tag.</li>
<li>Execution time: FIG will take the selected percentage of maximum PHP execution time to grab image for each feed item. If images are not grabbed for some feed, try increasing this percentage to decrease errors due to network timeouts.</li>
</ol>
<p>That is all. Once you click on import, you will get the feed item nodes along with the images. If images are not grabbed, here is a list of possible reasons,</p>
<ol>
<li>Timeout, try increasing the Execution time.</li>
<li>Malformed HTML source.</li>
<li>Validation failures (due to maximum size, minimum resolution, etc).</li>
</ol>
<p>I am working on better error logging and reporting, so that you can know the reasons for sure.</p>
<p>Enjoy.</p>
<p><strong>Related Posts:</strong></p>
<ul>
<li>Feeds Image Grabber:  <a href="http://publicmind.in/blog/drupal-feeds-image-grabber" target="_blank">http://publicmind.in/blog/drupal-feeds-image-grabber</a></li>
<li>FIG project page (Download): <a href="http://drupal.org/project/feeds_imagegrabber" target="_blank">http://drupal.org/project/feeds_imagegrabber</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/tutorial-for-feeds-image-grabber/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Drupal: Feeds Image Grabber</title>
		<link>http://publicmind.in/blog/drupal-feeds-image-grabber/</link>
		<comments>http://publicmind.in/blog/drupal-feeds-image-grabber/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 09:50:13 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[imagegrabber]]></category>
		<category><![CDATA[module]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=474</guid>
		<description><![CDATA[Feeds Image Grabber (FIG) is the successor project for FeedAPI ImageGrabber to support the Feeds module. FIG parses the Item URL of each feed-item, downloads the appropriate image from the post and maps it to an image field in the node created by Feeds module for that feed-item. [Google Reader (with thumbnails) can be imitated [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --><a href="http://drupal.org/project/feeds_imagegrabber">Feeds Image Grabber</a> (FIG) is the successor project for <a href="http://publicmind.in/blog/feedapi-imagegrabber">FeedAPI ImageGrabber</a> to support the <a href="http://drupal.org/project/feeds">Feeds</a> module. FIG parses the Item URL of each feed-item, downloads the appropriate image from the post and maps it to an image field in the node created by Feeds module for that feed-item.</p>
<p>[Google Reader (with thumbnails) can be imitated on a Drupal site by using Feeds, Feeds Image Grabber, FileField, ImageField, ImageCache, ImageAPI and Views module].</p>
<p><span id="more-474"></span> <strong>How it works</strong><br />
A classic method of mimicking the behavior of Feeds Image Grabber would be to do the same thing manually. Let us go through the procedure if you were to do it manually:</p>
<ol>
<li>Refresh the feed to create nodes for feed items (using FeedsNodeProcessor).</li>
<li>For each feed-item, go to their respective webpage and save the image to display.</li>
<li>Upload the image to CCK image field for each feed item.</li>
</ol>
<p>Feeds Image Grabber automates the last 2 steps of the three step process described. <a href="http://drupal.org/project/imagecache">Imagecache</a> module can be used to create thumbnail of the image retrieved which can be attached to the node.</p>
<p><strong>What&#8217;s in the box</strong><br />
On 3rd March, first version of FIG was released. As of today, FIG supports following features:</p>
<ol>
<li>Automatically downloads and attaches image to the node created by Feeds module.</li>
<li>Configurable XPath of the desired image location on the webpage of the feed item on per feed basis (using element&#8217;s id or CSS class).</li>
<li>Support for <a href="http://drupal.org/project/filefield_paths">FileField Paths</a> module.</li>
<li>Configurable maximum image size.</li>
<li>Configurable minimum and maximum image resolutions.</li>
</ol>
<p><strong>Get involved</strong><br />
You can get involved by doing any of the following:</p>
<ol>
<li>write about this module, so that other folks can find it.</li>
<li>report bugs in the <a href="http://drupal.org/node/add/project-issue/feeds_imagegrabber">issue queue</a>.</li>
<li>help in the <a href="http://drupal.org/project/issues/search/feeds_imagegrabber?categories[]=support">support forums</a> of the module.</li>
<li>buy me a Beer <img src='http://publicmind.in/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ol>
<p><strong>Resources: </strong></p>
<ul>
<li>Project Page (Download): <a href="http://drupal.org/project/feeds_imagegrabber">http://drupal.org/project/feeds_imagegrabber</a></li>
<li>Tutorials: <a href="http://publicmind.in/blog/tutorial-for-feeds-image-grabber">http://publicmind.in/blog/tutorial-for-feeds-image-grabber</a></li>
</ul>
<p><strong>Note</strong>: Feature and Support requests should be made through the <a href="http://drupal.org/project/feeds_imagegrabber" target="_blank">Feeds Image Grabber</a> Forum. I may not be able to answer them here.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/drupal-feeds-image-grabber/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tutorial for FeedAPI Image Grabber</title>
		<link>http://publicmind.in/blog/tutorial-for-feedapi-imagegrabber/</link>
		<comments>http://publicmind.in/blog/tutorial-for-feedapi-imagegrabber/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 10:39:59 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[feedapi]]></category>
		<category><![CDATA[imagegrabber]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=257</guid>
		<description><![CDATA[Updates: Feeds Image Grabber has been released to support the new Feeds module. (3 march 2010) Tutorial for Feeds Image Grabber (FIG) published. (6 march 2010) Demonstration Website is available here. (6 march 2010) I get a lot of requests for this, so here is a tutorial explaining the 3 W&#8217;s (What, Why and How) [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<div class="download"><strong>Updates:</strong></p>
<ul>
<li><a href="http://publicmind.in/blog/drupal-feeds-image-grabber">Feeds Image Grabber</a> has been released to support the new Feeds module. (3 march 2010)</li>
<li><a href="http://publicmind.in/blog/tutorial-for-feeds-image-grabber">Tutorial for Feeds Image Grabber</a> (FIG) published. (6 march 2010)</li>
<li><strong>Demonstration Website</strong> is available <a href="http://publicmind.in/feedapi_imagegrabber/demonstration">here</a>. (6 march 2010)</li>
</ul>
</div>
<p>I get a lot of requests for this, so here is a tutorial explaining the 3 W&#8217;s (What, Why and How) of FeedAPI ImageGrabber.</p>
<p><strong>Motivation</strong></p>
<div id="attachment_258" class="wp-caption aligncenter" style="width: 580px"><img class="size-full wp-image-258   " title="google_reader" src="http://publicmind.in/blog/wp-content/uploads/2009/09/google_reader.jpg" alt="a feed item from google reader" width="570" height="95" /><p class="wp-caption-text">a feed item from google reader</p></div>
<p>This is a screenshot of a news item from my Google Reader. Anyone who has a moderate knowledge about the feeds would know that the image on the left in the above news-item is actually not published with the feed.</p>
<p class="note">In other words, If you refresh any feed on your Drupal website using FeedAPI, you won&#8217;t get the image in the posts, unless they are published along with the feed which is quite rare.</p>
<p>The purpose of FeedAPI Imagegrabber is to make the feed more informative as well as interesting for the user. As, we all know that “comics are much better than novels”, this module appends the feed-item with an appropriate image from its content URL. The goal of the FeedAPI ImageGrabber is to mimic the thumbnail display of Google Reader for the feeds on your Drupal website.</p>
<p class="download">As soon as you refresh the feed, ImageGrabber automatically attaches an appropriate image from the original article to the feed-item node on your website. You don&#8217;t even have to press an extra button!!</p>
<p><span id="more-257"></span><br />
<strong>How it works</strong><br />
A classic method of mimicking the behavior of FeedAPI Imagegrabber will be to do the same thing manually. Let us go through the procedure if you were to do it manually:</p>
<ol>
<li>Refresh the feed.</li>
<li>For each feed-item, go to their respective original URL and save the image to display.</li>
<li>For each node, crop the image, convert it into a thumbnail and then upload it in an CCK imagefield.</li>
</ol>
<p>FeedAPI Imagegrabber automates the last 2 steps of the three step process described. You just need to refresh the feed and the ImageGrabber do the rest for you. The most difficult part which only humans can do is to select an appropriate image,  for which I am constantly improving on the heuristics.</p>
<p><strong>Download and Install</strong><br />
Download the latest release of FeedAPI ImageGrabber, compatible with your Drupal release, from the project page. Uncompress the folder in your site&#8217;s module directory and enable it from the admin/module page.</p>
<p class="download">You are now ready to create new feeds with ImageGrabber enabled.</p>
<p>Next, you must install the following modules to get going:</p>
<ul>
<li>Imagefield</li>
<li>Filefield</li>
<li>CCK</li>
</ul>
<p>You must then decide the content type for your feed-items for a particular feed and add CCK imagefields to that content type, before proceeding.</p>
<p><a name="tag-options"><strong>Form User Interface</strong></a><br />
You can enable the ImageGrabber for the feeds you want to download images for. When you add or edit any feed (i.e. feedapi enabled node), you will see the following additional settings for ImageGrabber:</p>
<div id="attachment_267" class="wp-caption aligncenter" style="width: 636px"><img class="size-full wp-image-267" title="feedapi_imagegrabber_interface" src="http://publicmind.in/blog/wp-content/uploads/2009/09/feedapi_imagegrabber_interface.jpg" alt="Form Interface for ImageGrabber" width="626" height="446" /><p class="wp-caption-text">Form Interface for ImageGrabber</p></div>
<p>Here is an detailed explanation of the input fields:</p>
<ol>
<li><strong>Enable ImageGrabber: </strong>Check this box if you want to enable ImageGrabber for this particular feed.</li>
<li><strong>Select image field: </strong>ImageGrabber stores the downloaded image in a cck imagefield. You must select one of the imagefield from the drop-down menu.</li>
<p class="warning alert">If you receive this message &#8220;There are no imagefields associated with the &#8216;abcd&#8217; content type.&#8221; , then you must add imagefield to the content type mentioned or change the content type of the feed-items to the one which has imagefields associated with it.</p>
<li><strong>Search for an image between the tag identified by: </strong><br />
To understand this, consider that the every feed-item associated with a particular feed has the following structure (HTML source code):</p>
<div id="attachment_282" class="wp-caption aligncenter" style="width: 518px"><a href="http://publicmind.in/blog/wp-content/uploads/2009/09/class-example1.jpg"><img class="size-full wp-image-282         " title="html source code" src="http://publicmind.in/blog/wp-content/uploads/2009/09/class-example1.jpg" alt="HTML source code of a feed-item webpage" width="508" height="292" /></a><p class="wp-caption-text">HTML source code of a feed-item webpage</p></div>
<p>For the above example, we know that the images associated with this particular post will always be within the</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>...<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
tag</div></td></tr></tbody></table></div>
<p>Therefore, for this feed you must select the &#8216;class&#8217; option here and enter &#8216;post&#8217; in the text-field.<br />
Similarly, you must find out one such tag from the feed-items of the feed you want to create, see if it is identified by an id or an class. Then, select the appropriate option and enter the class or id in the text-field below. If you select None, the default tag will be &#8216;body&#8217;.</p>
<p class="download">simple way to find the id or class: Just find out the title of your article in the source code, and start looking for its parent/grandparent tags. Select the nearest parent which has an id or class.</p>
<p>Now ImageGrabber will look for the images just between this tag, hence eliminating the download (and selection) of images in the sidebar or the header advertisement.</li>
<li>Enter the id or class (whatever you selected) in the text-field. Leave it empty if you selected the None option above.</li>
<li><strong>Feeling Lucky: </strong>This has definitely been borrowed from the big devil <strong><a href="http://google.com">Google</a></strong>. It will just select the first image it encounter between the tag specified, if &#8216;feeling lucky&#8217; option is selected. Otherwise, it will select the largest image between the tags. I would personally recommend you to try out the &#8216;feeling lucky&#8217; option as it helps saving a lot of bandwidth!! But if it doesn&#8217;t work for you, select the otherwise.</li>
</ol>
<p>When you are done, just refresh the feed and you will see the images attached to the feed-item nodes.</p>
<p class="download">Note: You can also modify your theme a little to get the Google Reader look in which the image floats on the left of the feed-item.</p>
<p>After refresh, you might get the following warning:</p>
<p class="warning alert">ImageGrabber: PHP execution time limit for system is 30 seconds, due to which images for some feed items couldn&#8217;t be downloaded. Please click on &#8216;Grab Images&#8217; to refresh those feed-items.</p>
<p>If you get such a warning, no need to get afraid, just click on &#8216;Grab Images&#8217; and the remaining feed-items will have their images as well. You may get multiple warnings depending upon your system&#8217;s execution time.</p>
<p>Enjoy grabbing images!!</p>
<p>Do leave a comment about this tutorial. Please make support and feature requests using <a href="http://drupal.org/project/feedapi_imagegrabber">support forums</a> only.</p>
<p><strong>Related Posts:</strong></p>
<ul>
<li><a href="http://publicmind.in/blog/feedapi-imagegrabber">FeedAPI ImageGrabber</a></li>
<li><a href="http://publicmind.in/blog/drupal-feeds-image-grabber">Feeds Image Grabber</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/tutorial-for-feedapi-imagegrabber/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
