From nuvem-commits-return-84-apmail-incubator-nuvem-commits-archive=incubator.apache.org@incubator.apache.org Sun Apr 17 18:18:57 2011 Return-Path: Delivered-To: apmail-incubator-nuvem-commits-archive@minotaur.apache.org Received: (qmail 37205 invoked from network); 17 Apr 2011 18:18:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2011 18:18:57 -0000 Received: (qmail 34941 invoked by uid 500); 17 Apr 2011 18:18:57 -0000 Delivered-To: apmail-incubator-nuvem-commits-archive@incubator.apache.org Received: (qmail 34906 invoked by uid 500); 17 Apr 2011 18:18:57 -0000 Mailing-List: contact nuvem-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: nuvem-dev@incubator.apache.org Delivered-To: mailing list nuvem-commits@incubator.apache.org Received: (qmail 34899 invoked by uid 99); 17 Apr 2011 18:18:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 18:18:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Apr 2011 18:18:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 777B023889F7; Sun, 17 Apr 2011 18:18:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1094178 - in /incubator/nuvem/trunk/nuvem-parallel/nuvem: bsearch.py bzprofile.py flkalbum.py gimages.py gmap.py picalbum.py ysearch.py Date: Sun, 17 Apr 2011 18:18:32 -0000 To: nuvem-commits@incubator.apache.org From: jsdelfino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110417181832.777B023889F7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Sun Apr 17 18:18:31 2011 New Revision: 1094178 URL: http://svn.apache.org/viewvc?rev=1094178&view=rev Log: Add a few search components. Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py - copied, changed from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py?rev=1094178&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/bsearch.py Sun Apr 17 18:18:31 2011 @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, q, s): + return s.get((("'q", q.get(r)), ("'format", 'rss'))) + Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py?rev=1094178&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/bzprofile.py Sun Apr 17 18:18:31 2011 @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, bzid, bz): + bid = bzid.get(r) + return bz.get((bid, '@self', ("'alt", 'json'))) + Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py) URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/flkalbum.py Sun Apr 17 18:18:31 2011 @@ -15,21 +15,7 @@ # specific language governing permissions and limitations # under the License. -import string - -def get(r, markers, s): - - def ismarker(m): - from sys import stderr - print >> stderr, "####", m - return m[1] is not None - - def marker(m): - # expecting (label, (color, loc)) - label = m[0][1:] - color = m[1][0] - loc = string.join(map(str, m[1][1:3]), ',') - return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc)) - - return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) + tuple(map(marker, filter(ismarker, markers.get(r))))) +def get(r, id, flk): + idv = id.get(r) + return flk.get((("'id", idv), ("'lang", 'en-us'), ("'format", 'json'))) Added: incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py?rev=1094178&view=auto ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py (added) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/gimages.py Sun Apr 17 18:18:31 2011 @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +def get(r, q, s): + return s.get((("'v", '1.0'), ("'rsz", 8), ("'q", q.get(r)))) + Modified: incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py?rev=1094178&r1=1094177&r2=1094178&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py Sun Apr 17 18:18:31 2011 @@ -31,5 +31,6 @@ def get(r, markers, s): loc = string.join(map(str, m[1][1:3]), ',') return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc)) - return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) + tuple(map(marker, filter(ismarker, markers.get(r))))) + mv = markers.get(r) + return s.get((("'size", '320x320'), ("'maptype", 'roadmap'), ("'sensor", 'false')) + tuple(map(marker, filter(ismarker, () if mv is None else mv)))) Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py) URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/picalbum.py Sun Apr 17 18:18:31 2011 @@ -15,21 +15,7 @@ # specific language governing permissions and limitations # under the License. -import string - -def get(r, markers, s): - - def ismarker(m): - from sys import stderr - print >> stderr, "####", m - return m[1] is not None - - def marker(m): - # expecting (label, (color, loc)) - label = m[0][1:] - color = m[1][0] - loc = string.join(map(str, m[1][1:3]), ',') - return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc)) - - return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) + tuple(map(marker, filter(ismarker, markers.get(r))))) +def get(r, id, pic): + idv = id.get(r) + return pic.get((idv, ("'kind", 'photo'), ("'max-results", 20))) Copied: incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py (from r1094177, incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py) URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py?p2=incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py&p1=incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py&r1=1094177&r2=1094178&rev=1094178&view=diff ============================================================================== --- incubator/nuvem/trunk/nuvem-parallel/nuvem/gmap.py (original) +++ incubator/nuvem/trunk/nuvem-parallel/nuvem/ysearch.py Sun Apr 17 18:18:31 2011 @@ -15,21 +15,6 @@ # specific language governing permissions and limitations # under the License. -import string - -def get(r, markers, s): - - def ismarker(m): - from sys import stderr - print >> stderr, "####", m - return m[1] is not None - - def marker(m): - # expecting (label, (color, loc)) - label = m[0][1:] - color = m[1][0] - loc = string.join(map(str, m[1][1:3]), ',') - return ("'markers", 'color:{0}|label:{1}|{2}'.format(color, label, loc)) - - return s.get((("'size", '480x480'), ("'maptype", 'roadmap'), ("'sensor", 'false')) + tuple(map(marker, filter(ismarker, markers.get(r))))) +def get(r, q, s): + return s.get((("'appid", 'YahooDemo'), ("'query", q.get(r)), ("'output", 'json')))