head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.52 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.50 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.48 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.46 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.44 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.42 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.40 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.38 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.36 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.34 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.32 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.30 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.28 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.26 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.24 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.22 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.20 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.18 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.16 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.14 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.12 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.10 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.8 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.6 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.4 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.2 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2; locks; strict; comment @# @; 1.4 date 2004.03.03.10.27.17; author recht; state dead; branches; next 1.3; 1.3 date 2003.12.24.11.44.08; author recht; state Exp; branches; next 1.2; 1.2 date 2003.08.11.22.08.34; author recht; state Exp; branches; next 1.1; 1.1 date 2003.03.19.11.55.11; author drochner; state Exp; branches; next ; desc @@ 1.4 log @update to 0.6 - use tar.gz instead of zip to avoid extra dependency - use new project homepage - enable install of fallback SOAP library 0.6 of 02/24/2004 - support the latest SOAPpy release, fallback to included version if it's not found, or is a version that's known to be buggy. - epydoc API documentation - quite a bit of refactoring - make some functions and classes that SHOULD be private, actually private - formatting cleanup @ text @$NetBSD: patch-aa,v 1.3 2003/12/24 11:44:08 recht Exp $ --- google.py.orig 2003-06-18 11:17:06.000000000 +0200 +++ google.py 2003-12-24 12:38:27.000000000 +0100 @@@@ -43,7 +43,8 @@@@ Erik Max Francis, for the command line interface Michael Twomey, for HTTP proxy support""" -import SOAP +from SOAPpy import SOAPProxy +from SOAPpy import Types import os, sys, getopt LICENSE_KEY = None @@@@ -53,8 +54,8 @@@@ class NoLicenseKey(Exception): pass _url = 'http://api.google.com/search/beta2' _namespace = 'urn:GoogleSearch' -_false = SOAP.booleanType(0) -_true = SOAP.booleanType(1) +_false = Types.booleanType(0) +_true = Types.booleanType(1) _googlefile1 = ".googlekey" _googlefile2 = "googlekey.txt" _licenseLocations = ( @@@@ -201,11 +202,11 @@@@ class _SearchBase: def __init__(self, params): for k, v in params.items(): - if isinstance(v, SOAP.structType): - v = v._asdict + if isinstance(v, Types.structType): + v = v._asdict() try: - if isinstance(v[0], SOAP.structType): - v = [node._asdict for node in v] + if isinstance(v[0], Types.structType): + v = [node._asdict() for node in v] except: pass self.__dict__[str(k)] = v @@@@ -303,16 +304,16 @@@@ See documentation of these individual classes for list of available attributes """ http_proxy = getProxy(http_proxy) - remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) + remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) license_key = getLicense(license_key) filter = _marshalBoolean(filter) safeSearch = _marshalBoolean(safeSearch) data = remoteserver.doGoogleSearch(license_key, q, start, maxResults, filter, restrict, safeSearch, language, inputencoding, outputencoding) - metadata = data._asdict + metadata = data._asdict() del metadata["resultElements"] metadata = SearchResultsMetaData(metadata) - results = [SearchResult(node._asdict) for node in data.resultElements] + results = [SearchResult(node._asdict()) for node in data.resultElements] return SearchReturnValue(metadata, results) def doGetCachedPage(url, license_key = None, http_proxy = None): @@@@ -330,7 +331,7 @@@@ Returns: string, text of cached page """ http_proxy = getProxy(http_proxy) - remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) + remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) license_key = getLicense(license_key) return remoteserver.doGetCachedPage(license_key, url) @@@@ -348,7 +349,7 @@@@ Returns: text of suggested replacement, or None """ http_proxy = getProxy(http_proxy) - remoteserver = SOAP.SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) + remoteserver = SOAPProxy(_url, namespace=_namespace, http_proxy=http_proxy) license_key = getLicense(license_key) return remoteserver.doSpellingSuggestion(license_key, phrase) @ 1.3 log @update to 0.53 and patched to work with the current SOAPpy the only change in this releas: - fixed small typo in documentation @ text @d1 1 a1 1 $NetBSD$ @ 1.2 log @Fix this for the SOAPpy 0.10.1 update. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1 2003/03/19 11:55:11 drochner Exp $ d3 2 a4 2 --- google.py.orig 2002-04-18 22:11:18.000000000 +0200 +++ google.py 2003-05-31 12:17:35.000000000 +0200 d26 1 a26 1 @@@@ -201,10 +202,10 @@@@ d31 1 d33 1 a33 1 v = v._asdict d36 1 d38 1 a38 1 v = [node._asdict for node in v] d41 2 a42 1 @@@@ -303,7 +304,7 @@@@ d51 11 @ 1.1 log @make this work with SOAPpy-0.9.8 and bumb PKGREVISION because it only works with 0.9.8 now @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 3 --- google.py.orig 2003-03-19 10:53:37.000000000 +0100 +++ google.py 2003-03-19 10:54:00.000000000 +0100 @@@@ -43,7 +43,7 @@@@ d10 2 a11 1 +from SOAPpy import SOAP d15 51 @