Added argument to program
This commit is contained in:
parent
58f1086ca7
commit
fb4f334821
5 changed files with 14 additions and 66 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
__author__ = """soyouzpanda"""
|
__author__ = """soyouzpanda"""
|
||||||
__email__ = 'soyouzpanda@soyouzpanda.fr'
|
__email__ = 'soyouzpanda@soyouzpanda.fr'
|
||||||
__version__ = '0.1.0'
|
__version__ = '0.1.2'
|
||||||
|
|
||||||
from .eos_object import *
|
from .eos_object import *
|
||||||
from .eos import *
|
from .eos import *
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
"""Main module."""
|
"""Main module."""
|
||||||
|
import argparse
|
||||||
from .eos import EOSConnection
|
from .eos import EOSConnection
|
||||||
from .pad import Pad, EventHandler
|
from .pad import Pad, EventHandler
|
||||||
from .eos_object import FaderBank, Fader, Macro
|
from .eos_object import FaderBank, Fader, Macro
|
||||||
|
@ -142,13 +143,22 @@ class SelectEventHandler(EventHandler):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""main function"""
|
"""main function"""
|
||||||
launchpad = find_launchpads()[0]
|
parser = argparse.ArgumentParser(
|
||||||
|
prog='EOS Launchpad Connector',
|
||||||
|
description='Connector to use launchpad for KFet Config')
|
||||||
|
parser.add_argument('ip')
|
||||||
|
parser.add_argument('-p', '--port', default=8000)
|
||||||
|
parser.add_argument('-l', '--launchpad', default=0)
|
||||||
|
args = parser.parse_args()
|
||||||
|
print(args)
|
||||||
|
|
||||||
|
launchpad = find_launchpads()[args.launchpad]
|
||||||
launchpad.open()
|
launchpad.open()
|
||||||
launchpad.mode = Mode.PROG
|
launchpad.mode = Mode.PROG
|
||||||
launchpad.panel.reset()
|
launchpad.panel.reset()
|
||||||
launchpad.clear_event_queue()
|
launchpad.clear_event_queue()
|
||||||
|
|
||||||
eos = EOSConnection("192.168.50.36", 8000)
|
eos = EOSConnection(args.ip, args.port)
|
||||||
faderbank = eos.fader_bank()
|
faderbank = eos.fader_bank()
|
||||||
|
|
||||||
pad = Pad(launchpad)
|
pad = Pad(launchpad)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[tool]
|
[tool]
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "eos_midi"
|
name = "eos_midi"
|
||||||
version = "0.1.0"
|
version = "0.1.2"
|
||||||
homepage = "https://git.soyouzpanda.com/soyouzpanda/kfet_launchpad_controller"
|
homepage = "https://git.soyouzpanda.com/soyouzpanda/kfet_launchpad_controller"
|
||||||
description = "Controller to control EOS with Launchpad Mini Mk3 for ENS"
|
description = "Controller to control EOS with Launchpad Mini Mk3 for ENS"
|
||||||
authors = ["soyouzpanda <soyouzpanda@soyouzpanda.fr>"]
|
authors = ["soyouzpanda <soyouzpanda@soyouzpanda.fr>"]
|
||||||
|
|
18
setup.cfg
18
setup.cfg
|
@ -1,18 +0,0 @@
|
||||||
[bumpversion]
|
|
||||||
current_version = 0.1.0
|
|
||||||
commit = True
|
|
||||||
tag = True
|
|
||||||
|
|
||||||
[bumpversion:file:setup.py]
|
|
||||||
search = version='{current_version}'
|
|
||||||
replace = version='{new_version}'
|
|
||||||
|
|
||||||
[bumpversion:file:eos_midi/__init__.py]
|
|
||||||
search = __version__ = '{current_version}'
|
|
||||||
replace = __version__ = '{new_version}'
|
|
||||||
|
|
||||||
[bdist_wheel]
|
|
||||||
universal = 1
|
|
||||||
|
|
||||||
[flake8]
|
|
||||||
exclude = docs
|
|
44
setup.py
44
setup.py
|
@ -1,44 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
"""The setup script."""
|
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
|
||||||
with open('README.rst') as readme_file:
|
|
||||||
readme = readme_file.read()
|
|
||||||
|
|
||||||
with open('HISTORY.rst') as history_file:
|
|
||||||
history = history_file.read()
|
|
||||||
|
|
||||||
requirements = [ ]
|
|
||||||
|
|
||||||
test_requirements = [ ]
|
|
||||||
|
|
||||||
setup(
|
|
||||||
author="soyouzpanda",
|
|
||||||
author_email='soyouzpanda@soyouzpanda.fr',
|
|
||||||
python_requires='>=3.6',
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 2 - Pre-Alpha',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'License :: OSI Approved :: MIT License',
|
|
||||||
'Natural Language :: English',
|
|
||||||
'Programming Language :: Python :: 3',
|
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7',
|
|
||||||
'Programming Language :: Python :: 3.8',
|
|
||||||
],
|
|
||||||
description="EOS interface to use midi keyboard",
|
|
||||||
install_requires=requirements,
|
|
||||||
license="MIT license",
|
|
||||||
long_description=readme + '\n\n' + history,
|
|
||||||
include_package_data=True,
|
|
||||||
keywords='eos_midi',
|
|
||||||
name='eos_midi',
|
|
||||||
packages=find_packages(include=['eos_midi', 'eos_midi.*']),
|
|
||||||
test_suite='tests',
|
|
||||||
tests_require=test_requirements,
|
|
||||||
url='https://github.com/soyouzpanda/eos_midi',
|
|
||||||
version='0.1.0',
|
|
||||||
zip_safe=False,
|
|
||||||
)
|
|
Loading…
Reference in a new issue