Skip Menu |

This queue is for tickets about the WWW-Google-Images CPAN distribution.

Report information
The Basics
Id: 66803
Status: open
Priority: 0/
Queue: WWW-Google-Images

People
Owner: Nobody in particular
Requestors: kevin.keraudren10 [...] imperial.ac.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: "g1053007-group [...] doc.ic.ac.uk" <g1053007-group [...] doc.ic.ac.uk>
Subject: Patch to enable Google Image refinement search options
Date: Wed, 23 Mar 2011 08:08:55 +0000
To: <bug-WWW-Google-Images [...] rt.cpan.org>
From: Kevin Keraudren <kevin.keraudren10 [...] imperial.ac.uk>
Hi, here are the modifications I did to WWW-Google-Images-0.6.5/lib/WWW/Google/Images.pm to enable Google Image refinement search options. 153a154,193 Show quoted text
> my $refine = 'ift:jpg,'; # only JPEG > if ( $arg{large} ) { > $refine .= 'isz:l,' > } > if ( $arg{medium} ) { > $refine .= 'isz:m,' > } > if ( $arg{icon} ) { > $refine .= 'isz:i,' > } > if ( $arg{face} ) { > $refine .= 'itp:face,' > } > if ( $arg{photo} ) { > $refine .= 'itp:photo,' > } > if ( $arg{clipart} ) { > $refine .= 'itp:clipart,' > } > if ( $arg{lineart} ) { > $refine .= 'itp:lineart,' > } > if ( $arg{color} ) { > $refine .= 'ic:color,' > } > if ( $arg{gray} ) { > $refine .= 'ic:gray,' > } > > my $fields = { > q => $query, > tbs => 'isch:1,' . $refine, > }; > if ($arg{nosafe}){ > $fields->{safe} = 'off'; > } > if ($arg{strict}){ > $fields->{safe} = 'active'; > } >
156,158c196 < fields => { < q => $query < } --- Show quoted text
> fields => $fields,
Kind regards, Kevin Keraudren
Le Mer 23 Mar 2011 04:10:52, kevin.keraudren10@imperial.ac.uk a écrit : Show quoted text
> Hi, > > here are the modifications I did to > WWW-Google-Images-0.6.5/lib/WWW/Google/Images.pm > to enable Google Image refinement search options.
Hello, sorry for the delay. The patch looks interesting, but it lacks documentation and tests to be included directly. Could you add them also, and resubmit the patch in unified format (diff -Naur) ? I just pushed the code to github, if it can make work easier for you: https://github.com/guillomovitch/WWW-Google-Images
Subject: Re: [rt.cpan.org #66803] Patch to enable Google Image refinement search options
Date: Wed, 20 Apr 2011 02:02:21 +0100
To: "bug-WWW-Google-Images [...] rt.cpan.org" <bug-WWW-Google-Images [...] rt.cpan.org>
From: Kevin Keraudren <kevin.keraudren10 [...] imperial.ac.uk>
I attach to this mail the diff made using: diff -Naur git.untouched/WWW-Google-Images WWW-Google-Images.new > www_google_images.diff-Naur.patch as well as the whole source code. Here is what I added to the ChangeLog: 2011-04-20 0.6.6 * added fixes from https://rt.cpan.org/Public/Bug/Display.html?id=66803 to add the Google Refined Search options (image type, color, format, size and safe search) (from kevin.keraudren AT googlemail.com) * added fix from https://rt.cpan.org/Public/Bug/Display.html?id=57026 to adapt to Google's HTML code related to image size (from menewenem AT gmail.com) * removed duplicated code from tests * added new script bin/refined-image-search I hope you will like those changes. Don't hesitate to ask if needed. Kind regards, Kevin Keraudren

Message body is not shown because sender requested not to inline it.

Download WWW-Google-Images.new.zip
application/x-zip-compressed 13.9k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #66803] Patch to enable Google Image refinement search options
Date: Wed, 20 Apr 2011 09:48:12 +0100
To: "bug-WWW-Google-Images [...] rt.cpan.org" <bug-WWW-Google-Images [...] rt.cpan.org>
From: Kevin Keraudren <kevin.keraudren10 [...] imperial.ac.uk>
I attach to this mail the diff made using: diff -Naur git.untouched/WWW-Google-Images WWW-Google-Images.new > www_google_images.diff-Naur.patch as well as the whole source code. Here is what I added to the ChangeLog: 2011-04-20 0.6.6 * added fixes from https://rt.cpan.org/Public/Bug/Display.html?id=66803 to add the Google Refined Search options (image type, color, format, size and safe search) (from kevin.keraudren AT googlemail.com) * added fix from https://rt.cpan.org/Public/Bug/Display.html?id=57026 to adapt to Google's HTML code related to image size (from menewenem AT gmail.com) * removed duplicated code from tests * added new script bin/refined-image-search I hope you will like those changes, especially the simplifications I made to your tests. Don't hesitate to ask if needed. Regards, Kevin Keraudren

Message body is not shown because sender requested not to inline it.

Download WWW-Google-Images.new.zip
application/x-zip-compressed 13.9k

Message body not shown because it is not plain text.

Le Mer 20 Avr 2011 04:48:26, kevin.keraudren10@imperial.ac.uk a écrit : Show quoted text
> I attach to this mail the diff made using: > diff -Naur git.untouched/WWW-Google-Images WWW-Google-Images.new > > www_google_images.diff-Naur.patch > > as well as the whole source code.
Wow, that's quite impressive. As I'm more and more relunctant to maintain this piece of code, given the difficulties linked to service usage enfringement, would you be interested to take over maintainership ?