Skip to content

Commit 24b2a25

Browse files
committed
get_dmrmarc_json.py: clarify python-requests requirment
1 parent 8146c85 commit 24b2a25

File tree

6 files changed

+17
-7
lines changed

6 files changed

+17
-7
lines changed

README.de.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,19 @@ Ebenso sind zur Nutzung folgende Pakete erforderlich:
3636
* Python 2.7 or newer: http://www.python.org
3737
* PyUSB 1.0: (0.4 does not work.) http://sourceforge.net/apps/mediawiki/pyusb/
3838
* libusb 1.0: (0.4 does not work.) http://www.libusb.org/
39+
* python-requests: http://python-requests.org/
3940

4041
#### Automatische Installation der benötigten Pakete
4142

4243
Debian Stretch:
4344

4445
apt-get install gcc-arm-none-eabi binutils-arm-none-eabi \
45-
libnewlib-arm-none-eabi libusb-1.0 python-usb
46+
libnewlib-arm-none-eabi libusb-1.0 python-usb python-requests
4647

4748
Debian Jessie / Ubuntu 16.04 LTS:
4849

4950
apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 git \
50-
libnewlib-arm-none-eabi make curl python-pip unzip
51+
libnewlib-arm-none-eabi make curl python-pip python-requests unzip
5152
pip install pyusb -U # update PyUSB to 1.0
5253

5354

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ repository. We use a heap-less printf library under the BSD license.
113113
* libusb 1.0: (0.4 does not work.)
114114
http://www.libusb.org/
115115

116+
* python-requests
117+
http://python-requests.org/
118+
116119
This project should work across Linux, Mac OS, and Windows, but has
117120
not been tested on all platforms. A separate client, MD380Tool,
118121
is under development for Android.

db/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dmrmarc2.tmp: dmrmarc.tmp
3232
awk -F, -f insert_nick.awk <$< >$@
3333

3434
dmrmarc.tmp:
35-
python2 get_dmrmarc_json.py >$@ 2>get_dmrmarc.errors
35+
python2 get_dmrmarc_json.py >$@
3636

3737
reflector.tmp:
3838
curl $(CURL_FLAGS) 'http://registry.dstar.su/reflector.db' | perl -pe '$$_ = "" if ( $$. == 1 ); s#@#,#; s#@.*#,,,,,,#' >$@

db/get_dmrmarc_json.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
# KD4Z
44
# dmr-marc decided to stop offering CSV output format, so json here we come
55

6-
import requests
76
import sys
87

8+
try:
9+
import requests
10+
except ImportError as e:
11+
sys.stderr.write('\n' + str(e) + '\n')
12+
sys.stderr.write('\nERROR: please install python-requests\n\n')
13+
exit(127)
14+
915
def noCommas(field):
1016
try:
1117

docs/debian.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#### Debian Stretch: ####
66

77
apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \
8-
libusb-1.0 python-usb make curl
8+
libusb-1.0 python-usb python-requests make curl
99

1010
#### Debian Jessie (using backports.debian.org): ####
1111

@@ -23,7 +23,7 @@ Install python-usb from backports, the rest from Jessie
2323

2424
apt -t jessie-backports install python-usb
2525
apt install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \
26-
libusb-1.0 make curl
26+
libusb-1.0 make curl python-requests
2727

2828
#### Debian Jessie (using python-pip): ####
2929

docs/raspi.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Tested on 2016-05-10-raspbian-jessie by IZ2XBZ
88
```
99
sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 \
10-
libnewlib-arm-none-eabi make curl
10+
libnewlib-arm-none-eabi make curl python-requests
1111
1212
Tested on 2017-03-02-raspbian-jessie by YT5ZEC (dragstor):
1313
In addition to the notes above, install the following pip package, in order to get cable to work.

0 commit comments

Comments
 (0)