feat: added grum cli
This commit is contained in:
20
grum.py
Executable file → Normal file
20
grum.py
Executable file → Normal file
@ -1,19 +1,3 @@
|
|||||||
#!/usr/bin/env python
|
from grum.cli import main
|
||||||
|
|
||||||
import sys
|
|
||||||
from PyQt5.QtWidgets import QApplication
|
|
||||||
|
|
||||||
from grum import ctrl_c
|
|
||||||
from grum import theme
|
|
||||||
from grum.mainwin import MainWindow
|
|
||||||
|
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
|
||||||
theme.apply(app)
|
|
||||||
ctrl_c.setup(app)
|
|
||||||
mw = MainWindow()
|
|
||||||
mw.show()
|
|
||||||
sys.exit(app.exec())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
||||||
|
1
grum/cli/__init__.py
Normal file
1
grum/cli/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from .grum import main
|
20
grum/cli/grum.py
Executable file
20
grum/cli/grum.py
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from PyQt5.QtWidgets import QApplication
|
||||||
|
|
||||||
|
from grum import ctrl_c, theme
|
||||||
|
from grum.mainwin import MainWindow
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
theme.apply(app)
|
||||||
|
ctrl_c.setup(app)
|
||||||
|
mw = MainWindow()
|
||||||
|
mw.show()
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|
||||||
|
|
5
setup.py
5
setup.py
@ -1,4 +1,7 @@
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
setup(install_requires=["pyqt5", "pyqtgraph"])
|
setup(
|
||||||
|
install_requires=["pyqt5", "pyqtgraph"],
|
||||||
|
entry_points={"console_scripts": ["grum=grum.cli:main"]},
|
||||||
|
)
|
||||||
|
Reference in New Issue
Block a user