diff --git a/eos_midi/__init__.py b/eos_midi/__init__.py index fd0f33d..982f0bf 100644 --- a/eos_midi/__init__.py +++ b/eos_midi/__init__.py @@ -2,7 +2,7 @@ __author__ = """soyouzpanda""" __email__ = 'soyouzpanda@soyouzpanda.fr' -__version__ = '0.1.0' +__version__ = '0.1.2' from .eos_object import * from .eos import * diff --git a/eos_midi/__main__.py b/eos_midi/__main__.py index 21f031e..afc9a98 100644 --- a/eos_midi/__main__.py +++ b/eos_midi/__main__.py @@ -1,4 +1,5 @@ """Main module.""" +import argparse from .eos import EOSConnection from .pad import Pad, EventHandler from .eos_object import FaderBank, Fader, Macro @@ -142,13 +143,22 @@ class SelectEventHandler(EventHandler): def main(): """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.mode = Mode.PROG launchpad.panel.reset() launchpad.clear_event_queue() - eos = EOSConnection("192.168.50.36", 8000) + eos = EOSConnection(args.ip, args.port) faderbank = eos.fader_bank() pad = Pad(launchpad) diff --git a/pyproject.toml b/pyproject.toml index 5b89fcd..9c9419f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool] [tool.poetry] name = "eos_midi" -version = "0.1.0" +version = "0.1.2" homepage = "https://git.soyouzpanda.com/soyouzpanda/kfet_launchpad_controller" description = "Controller to control EOS with Launchpad Mini Mk3 for ENS" authors = ["soyouzpanda "] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index d9aaa1f..0000000 --- a/setup.cfg +++ /dev/null @@ -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 diff --git a/setup.py b/setup.py deleted file mode 100644 index 2592aaf..0000000 --- a/setup.py +++ /dev/null @@ -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, -)