From 45eb36168a647690b8b5f5eef8bc0e4c5c609384 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 8 Dec 2014 03:30:57 +0100 Subject: use curl instead of wget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- DEPENDENCIES | 2 +- dist/archlinux/stable/PKGBUILD | 6 +++--- src/plugins/chase.py | 2 +- src/plugins/ipaddress.py | 18 +++++++++--------- src/plugins/leapsec.py | 2 +- src/plugins/weather.py | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 31835c2..13bef6c 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -9,7 +9,7 @@ RUNTIME DEPENDENCIES: OPTIONAL RUNTIME DEPENDENCIES: linux: most of the monitors require Linux's procfs or sysfs - wget: for Internet services + curl: for Internet services python-pyalsaaudio: for ALSA volume control hdparm: for hdparm support python-pytz: for timezone support diff --git a/dist/archlinux/stable/PKGBUILD b/dist/archlinux/stable/PKGBUILD index eecd7a5..5fb8453 100644 --- a/dist/archlinux/stable/PKGBUILD +++ b/dist/archlinux/stable/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org> pkgname=xpybar -pkgver=1.4.1 +pkgver=1.5 pkgrel=1 pkgdesc="A highly extensible minimalistic dock panel written in Python 3" arch=(any) @@ -9,13 +9,13 @@ url="https://github.com/maandree/xpybar" license=('GPL3' 'AGPL3') depends=(python3 argparser python3-xlib xorg-xrandr) optdepends=("linux: most of the monitors require Linux's procfs or sysfs" - "wget: for Internet services" + "curl: for Internet services" "python-pyalsaaudio: for ALSA volume control" "hdparm: hdparm: for hdparm support" "python-pytz: for timezone support") makedepends=(make coreutils sed zip) source=($url/archive/$pkgver.tar.gz) -sha256sums=(e50a6cc1022f01608195193deb73a704efa8bdd7a33ed89643a0e9390b5bf33f) +sha256sums=(xxx) build() { diff --git a/src/plugins/chase.py b/src/plugins/chase.py index 290ef6b..e94497b 100644 --- a/src/plugins/chase.py +++ b/src/plugins/chase.py @@ -42,7 +42,7 @@ class Chase: @return :bool Whether information could be fetched ''' - command = ['wget', 'http://www.doeschasehaveajobyet.com', '-O', '-'] + command = ['curl', 'http://www.doeschasehaveajobyet.com'] proc = subprocess.Popen(command, stderr = sys.stderr, stdout = subprocess.PIPE) page = proc.stdout.read() proc.wait() diff --git a/src/plugins/ipaddress.py b/src/plugins/ipaddress.py index e150ecc..7f370d6 100644 --- a/src/plugins/ipaddress.py +++ b/src/plugins/ipaddress.py @@ -111,7 +111,7 @@ class IPAddress: def __site_0(self): try: - data = spawn_read('wget', 'http://checkip.dyndns.org', '-O', '-') + data = spawn_read('curl', 'http://checkip.dyndns.org') if not data == '': self.__isolated = False return data.split('')[1].split('')[0].split(': ')[1] @@ -120,7 +120,7 @@ class IPAddress: def __site_1(self): try: - data = spawn_read('wget', 'http://ipecho.net/plain', '-O', '-') + data = spawn_read('curl', 'http://ipecho.net/plain') if not data == '': self.__isolated = False data = data.strip() @@ -130,7 +130,7 @@ class IPAddress: def __site_2(self): try: - data = spawn_read('wget', 'http://www.checkmyipaddress.org', '-O', '-') + data = spawn_read('curl', 'http://www.checkmyipaddress.org') if not data == '': self.__isolated = False data = [line.strip() for line in data.replace('\r\n', '\n').split('\n') if '' in line] @@ -142,7 +142,7 @@ class IPAddress: def __site_3(self): try: - data = spawn_read('wget', 'http://www.ip-address.org', '-O', '-') + data = spawn_read('curl', 'http://www.ip-address.org') if not data == '': self.__isolated = False data = [line.strip(' \t') for line in data.replace('\r\n', '\n').split('\n') if 'ip += ' in line] @@ -161,7 +161,7 @@ class IPAddress: def __site_4(self): try: - data = spawn_read('wget', 'http://www.myipnumber.com/my-ip-address.asp', '-O', '-') + data = spawn_read('curl', 'http://www.myipnumber.com/my-ip-address.asp') if not data == '': self.__isolated = False data = data.replace('\r\n', '\n').split('\nThe IP Address of this machine is:\n')[1] @@ -171,7 +171,7 @@ class IPAddress: def __site_5(self): try: - data = spawn_read('wget', 'http://www.findipinfo.com', '-O', '-') + data = spawn_read('curl', 'http://www.findipinfo.com') if not data == '': self.__isolated = False return data.split('Your IP Address Is: ')[1].split('<')[0] @@ -180,7 +180,7 @@ class IPAddress: def __site_6(self): try: - data = spawn_read('wget', 'http://what-ip.net', '-O', '-') + data = spawn_read('curl', 'http://what-ip.net') if not data == '': self.__isolated = False return data.split('Your IP Address is : ')[1].split('')[1].split('')[0] @@ -189,7 +189,7 @@ class IPAddress: def __site_7(self): try: - data = spawn_read('wget', 'http://my-ip-address.com', '-O', '-') + data = spawn_read('curl', 'http://my-ip-address.com') if not data == '': self.__isolated = False return data.split('')[0].split('value=')[1].split('"')[1] @@ -198,7 +198,7 @@ class IPAddress: def __site_8(self): try: - data = spawn_read('wget', 'https://duckduckgo.com?q=what is my ip address', '-O', '-') + data = spawn_read('curl', 'https://duckduckgo.com?q=what is my ip address') if not data == '': self.__isolated = False return data.split('"Answer":"Your IP address is ')[1].split(' ')[0] diff --git a/src/plugins/leapsec.py b/src/plugins/leapsec.py index f04ad8d..ec8cfa1 100644 --- a/src/plugins/leapsec.py +++ b/src/plugins/leapsec.py @@ -49,7 +49,7 @@ class LeapSeconds: Constructor ''' url = 'http://maia.usno.navy.mil/ser7/leapsec.dat' - announcements = spawn_read('wget', url, '-O', '-') + announcements = spawn_read('curl', url) while ' ' in announcements: announcements = announcements.replace(' ', ' ') announcements = announcements.replace('= ', '=').replace('=JD ', '=JD') diff --git a/src/plugins/weather.py b/src/plugins/weather.py index a02bf85..f04fe9d 100644 --- a/src/plugins/weather.py +++ b/src/plugins/weather.py @@ -55,7 +55,7 @@ class Weather: ''' self.icao = station url = 'http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT' % station - decoded = spawn_read('wget', url, '-O', '-').split('\n') + decoded = spawn_read('curl', url).split('\n') # How to parse: http://www.wunderground.com/metarFAQ.asp station_header, self.headers, decoded = decoded[0].split(', '), decoded[:2], decoded[2:] -- cgit v1.2.3-70-g09d2