update installation instructions
This commit is contained in:
parent
8f36560d69
commit
6e52b42f56
2 changed files with 29 additions and 21 deletions
29
README.md
29
README.md
|
@ -1,5 +1,34 @@
|
|||
# pandora_client - python client and libary to access a pan.do/ra instances
|
||||
|
||||
Documentation at: https://code.0x2620.org/0x2620/pandora_client/wiki
|
||||
|
||||
## Installation
|
||||
|
||||
### Linux
|
||||
|
||||
- install dependencies
|
||||
|
||||
sudo apt install python3 python3-pip git ffmpeg ffmpeg2theora
|
||||
|
||||
- install pandora_client
|
||||
|
||||
sudo pip3 install pandora_client
|
||||
|
||||
|
||||
### macOS
|
||||
|
||||
- install brew (https://brew.sh/)
|
||||
- install dependencies
|
||||
|
||||
brew instlal python3
|
||||
brew instlal git
|
||||
brew install libvpx libvorbis
|
||||
brew install ffmpeg --with-libvpx --with-libvorbis --with-libopus
|
||||
|
||||
- install pandora_client
|
||||
|
||||
pip3 install pandora_client
|
||||
|
||||
|
||||
## pandora client example:
|
||||
|
||||
|
|
|
@ -470,27 +470,6 @@ class Client(object):
|
|||
self._config['url'] = url
|
||||
self.save_config()
|
||||
print("\nconfiguration updated.")
|
||||
self.install_programs()
|
||||
|
||||
def install_programs(self, args=[]):
|
||||
update = 'update' in args
|
||||
# install required programs
|
||||
if sys.platform == 'darwin':
|
||||
osext = 'macosx'
|
||||
elif sys.platform.startswith('win'):
|
||||
osext = 'exe'
|
||||
else:
|
||||
osext = 'linux'
|
||||
bindir = os.path.join(utils.basedir(), 'bin')
|
||||
ox.makedirs(bindir)
|
||||
for p in ('ffmpeg', 'ffmpeg2theora'):
|
||||
path = os.path.join(bindir, p)
|
||||
if sys.platform.startswith('win'):
|
||||
p += '.exe'
|
||||
if not os.path.exists(path) or update:
|
||||
print("installing %s in %s" % (p, bindir))
|
||||
ox.net.save_url('http://firefogg.org/bin/%s.%s' % (p, osext), path, True)
|
||||
os.chmod(path, 0o755)
|
||||
|
||||
def add_volume(self, args):
|
||||
usage = "Usage: %s add_volume name path" % sys.argv[0]
|
||||
|
|
Loading…
Reference in a new issue