kitbash 1.8.2__tar.gz → 1.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {kitbash-1.8.2 → kitbash-1.10.0}/PKG-INFO +2 -2
  2. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/__init__.py +1 -1
  3. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/__main__.py +36 -9
  4. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/gui/main_window.py +4 -3
  5. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/install.py +14 -12
  6. kitbash-1.10.0/kitbash/res/save-sfz-icon.svg +92 -0
  7. {kitbash-1.8.2 → kitbash-1.10.0}/pyproject.toml +2 -2
  8. {kitbash-1.8.2 → kitbash-1.10.0}/.gitignore +0 -0
  9. {kitbash-1.8.2 → kitbash-1.10.0}/LICENSE +0 -0
  10. {kitbash-1.8.2 → kitbash-1.10.0}/README.md +0 -0
  11. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/gui/__init__.py +0 -0
  12. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/gui/drumkit_widget.py +0 -0
  13. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/gui/kit_save_dialog.py +0 -0
  14. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/gui/main_window.ui +0 -0
  15. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/jack_audio.py +0 -0
  16. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/res/empty.sfz +0 -0
  17. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/res/group_expanded.svg +0 -0
  18. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/res/group_hidden.svg +0 -0
  19. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/res/kitbash-icon.png +0 -0
  20. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/res/kitbash-icon.svg +0 -0
  21. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/scripts/bash_project.py +0 -0
  22. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/styles/light.css +0 -0
  23. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/styles/system.css +0 -0
  24. {kitbash-1.8.2 → kitbash-1.10.0}/kitbash/worker_threads.py +0 -0
  25. {kitbash-1.8.2 → kitbash-1.10.0}/tests/file_save_dialog.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kitbash
3
- Version: 1.8.2
3
+ Version: 1.10.0
4
4
  Summary: Provides universal settings, styles, cached icons, and pixmaps, and the base
5
5
  Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
6
6
  Description-Content-Type: text/markdown
@@ -11,7 +11,7 @@ Requires-Dist: qt_liquid_pool >= 1.2.0
11
11
  Requires-Dist: recent_items_list >= 1.1.2
12
12
  Requires-Dist: sfzen >= 2.3.2
13
13
  Requires-Dist: soso_qt_extras >= 1.7.0
14
- Requires-Dist: xdg_soso >= 0.2.0
14
+ Requires-Dist: xdg_soso >= 1.0.2
15
15
  Project-URL: Home, https://github.com/Zen-Master-SoSo/kitbash
16
16
 
17
17
  # KitBash
@@ -29,7 +29,7 @@ from PyQt5.QtCore import QSettings
29
29
  from PyQt5.QtWidgets import QApplication, QSplitter
30
30
  from qt_extras import DevilBox
31
31
 
32
- __version__ = "1.8.2"
32
+ __version__ = "1.10.0"
33
33
 
34
34
  APPLICATION_NAME = "kitbash"
35
35
  PACKAGE_DIR = dirname(__file__)
@@ -21,19 +21,36 @@
21
21
  kitbash is a program you can use to combine parts of various SFZ files into a
22
22
  new SFZ with instruments "borrowed" from the originals.
23
23
  """
24
- import sys, os, argparse, logging
25
- from PyQt5.QtWidgets import QApplication, QErrorMessage
24
+ import sys, logging
25
+ from os import environ, getlogin
26
+ from argparse import ArgumentParser
27
+ from PyQt5.QtWidgets import QApplication
26
28
  from qt_extras import exceptions_hook
29
+ from xdg_soso import is_xdg
30
+ from kitbash.install import KitbashSetup
27
31
  from kitbash.gui.main_window import MainWindow
28
32
 
29
33
 
30
34
  def main():
31
- p = argparse.ArgumentParser()
32
- p.epilog = __doc__
33
- p.add_argument('Filename', type=str, nargs='?', help='SFZ file[s] to include at startup')
34
- p.add_argument("--log-file", "-l", type=str, help="Log to this file")
35
- p.add_argument("--verbose", "-v", action="store_true", help="Show more detailed debug information")
36
- options = p.parse_args()
35
+ parser = ArgumentParser()
36
+ parser.epilog = __doc__
37
+ parser.add_argument('Filename', type=str, nargs='?',
38
+ help='SFZ file[s] to include at startup')
39
+ parser.add_argument("--log-file", "-l", type=str,
40
+ help="Log to this file")
41
+ if is_xdg():
42
+ parser.add_argument('--install', '-i', action = 'store_true',
43
+ help = """Install this application into your desktop
44
+ environment. This will create a desktop launcher so you can start KitBash from
45
+ your menu or Dash, and associate KitBash with SFZ files.""")
46
+ parser.add_argument('--uninstall', '-u', action = 'store_true',
47
+ help = """Remove KitBash from your desktop environment.
48
+ The program will still be on your computer, and can be called from the command
49
+ line as "kitbash", but you won't be able to see it in your desktop applications
50
+ menu.""")
51
+ parser.add_argument("--verbose", "-v", action="store_true",
52
+ help="Show more detailed debug information")
53
+ options = parser.parse_args()
37
54
 
38
55
  log_level = logging.DEBUG if options.verbose else logging.ERROR
39
56
  log_format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s"
@@ -50,11 +67,21 @@ def main():
50
67
  format = log_format
51
68
  )
52
69
 
70
+ if is_xdg() and (options.install or options.uninstall):
71
+ installer = KitbashSetup()
72
+ if options.install:
73
+ installer.install()
74
+ print(f'Successfully installed KitBash for {getlogin()} on this machine.')
75
+ else:
76
+ installer.uninstall()
77
+ print(f'Successfully uninstalled KitBash for {getlogin()} on this machine.')
78
+ return 0
79
+
53
80
  #-----------------------------------------------------------------------
54
81
  # Annoyance fix per:
55
82
  # https://stackoverflow.com/questions/986964/qt-session-management-error
56
83
  try:
57
- del os.environ['SESSION_MANAGER']
84
+ del environ['SESSION_MANAGER']
58
85
  except KeyError:
59
86
  pass
60
87
  #-----------------------------------------------------------------------
@@ -27,7 +27,8 @@ from os.path import dirname, realpath, exists, join, splitext
27
27
  from functools import partial
28
28
  from signal import signal, SIGINT, SIGTERM
29
29
  from PyQt5 import uic
30
- from PyQt5.QtCore import Qt, QObject, pyqtSlot, QTimer, QThreadPool, QPoint, QCoreApplication
30
+ from PyQt5.QtCore import (
31
+ Qt, QObject, pyqtSlot, QTimer, QThreadPool, QPoint, QSize, QCoreApplication)
31
32
  from PyQt5.QtWidgets import (
32
33
  QApplication, QMainWindow, QMessageBox, QFileDialog, QAction, QActionGroup, QMenu)
33
34
  from PyQt5.QtGui import QIcon
@@ -45,7 +46,6 @@ from kitbash import (
45
46
  from kitbash.worker_threads import KitLoader, KitBasher
46
47
  from kitbash.gui.drumkit_widget import DrumkitWidget
47
48
  from kitbash.gui.kit_save_dialog import KitSaveDialog
48
- from kitbash.install import install
49
49
 
50
50
 
51
51
  UPDATES_DEBOUNCE = 680
@@ -72,6 +72,8 @@ class MainWindow(QMainWindow, GeometrySaver):
72
72
  with ShutUpQT():
73
73
  uic.loadUi(join(PACKAGE_DIR, 'gui', 'main_window.ui'), self)
74
74
  self.setWindowIcon(QIcon(join(PACKAGE_DIR, 'res', 'kitbash-icon.png')))
75
+ self.b_save_kit.setIcon(QIcon(join(PACKAGE_DIR, 'res', 'save-sfz-icon.svg')))
76
+ self.b_save_kit.setIconSize(QSize(20, 20))
75
77
  # Setup signals
76
78
  signal(SIGINT, self.system_signal)
77
79
  signal(SIGTERM, self.system_signal)
@@ -120,7 +122,6 @@ class MainWindow(QMainWindow, GeometrySaver):
120
122
  self.audio.connect()
121
123
  if self.options.Filename:
122
124
  self.load_project(self.options.Filename)
123
- install()
124
125
 
125
126
  def setup_kits_area(self):
126
127
  self.drumkit_widgets = VListLayout(end_space = 10)
@@ -22,21 +22,23 @@ Install phoney-dictate as an application on XDG-compliant systems (like gnome).
22
22
  """
23
23
  import logging
24
24
  from os.path import dirname, join
25
- from xdg_soso import XDGSetup, is_xdg
25
+ from xdg_soso import XDGSetup
26
26
 
27
- def install():
28
- if is_xdg():
29
- xdg = XDGSetup('kitbash', 'Kitbash')
30
- xdg.comment = "Bash together new .SFZ drumkits from pieces of existing ones."
31
- xdg.application_icon = join(dirname(__file__), 'res', 'kitbash-icon.svg')
32
- xdg.categories = ['AudioVideo', 'Audio']
33
- xdg.keywords = ['Audio', 'Sound', 'midi', 'SFZ', 'Drumkit']
34
- xdg.install()
27
+ class KitbashSetup(XDGSetup):
28
+
29
+ def __init__(self):
30
+ super().__init__('kitbash', 'Kitbash')
31
+ self._comment = "Bash together new .SFZ drumkits from pieces of existing ones."
32
+ self._vendor_name = 'zen_soso'
33
+ self._application_icon = join(dirname(__file__), 'res', 'kitbash-icon.svg')
34
+ self._categories = ['AudioVideo', 'Audio']
35
+ self._keywords = ['Audio', 'Sound', 'midi', 'SFZ', 'Drumkit']
35
36
 
36
37
  if __name__ == '__main__':
37
- log_format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s"
38
- logging.basicConfig(level = logging.DEBUG, format = log_format)
39
- install()
38
+ logging.basicConfig(level = logging.DEBUG,
39
+ format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s")
40
+ installer = KitbashSetup()
41
+ installer.install()
40
42
 
41
43
 
42
44
  # end kitbash/kitbash/install.py
@@ -0,0 +1,92 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ width="600"
6
+ height="600"
7
+ viewBox="0 0 600 600"
8
+ id="svg2"
9
+ version="1.1"
10
+ xmlns:xlink="http://www.w3.org/1999/xlink"
11
+ xmlns="http://www.w3.org/2000/svg"
12
+ xmlns:svg="http://www.w3.org/2000/svg"
13
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
14
+ xmlns:cc="http://creativecommons.org/ns#"
15
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
16
+ <defs
17
+ id="defs4">
18
+ <linearGradient
19
+ id="linearGradient3772">
20
+ <stop
21
+ style="stop-color:#999999;stop-opacity:1;"
22
+ offset="0.375784"
23
+ id="stop3768" />
24
+ <stop
25
+ style="stop-color:#cdd4df;stop-opacity:1;"
26
+ offset="1"
27
+ id="stop3770" />
28
+ </linearGradient>
29
+ <linearGradient
30
+ xlink:href="#linearGradient3772"
31
+ id="linearGradient3774"
32
+ x1="109.431"
33
+ y1="549.968"
34
+ x2="220.251"
35
+ y2="18.7833"
36
+ gradientUnits="userSpaceOnUse" />
37
+ </defs>
38
+ <metadata
39
+ id="metadata7">
40
+ <rdf:RDF>
41
+ <cc:Work
42
+ rdf:about="">
43
+ <dc:format>image/svg+xml</dc:format>
44
+ <dc:type
45
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
46
+ </cc:Work>
47
+ </rdf:RDF>
48
+ </metadata>
49
+ <g
50
+ id="layer1"
51
+ transform="translate(0,-452.36)">
52
+ <g
53
+ id="g1078"
54
+ transform="translate(-262.858,485.714)">
55
+ <g
56
+ id="g3430"
57
+ transform="matrix(1.02414,0,0,1.02414,-13.2997,0.475953)"
58
+ style="stroke-width:0.976431">
59
+ <path
60
+ id="rect864"
61
+ style="overflow:visible;fill:url(#linearGradient3774);fill-opacity:1;fill-rule:evenodd;stroke-width:0.585858"
62
+ transform="translate(262.858,-33.354)"
63
+ d="M 75.2027,4.34041 409.518,4.34 530.095,124.917 V 589.699 H 75.2027 Z" />
64
+ <path
65
+ id="path2357"
66
+ style="overflow:visible;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke-width:0.585858"
67
+ d="m 97.2031,567.699 c 136.9639,0 273.9289,0 410.8929,0 0,-144.557 0,-289.114 0,-433.672 C 472.2,98.1315 436.304,62.2357 400.408,26.3398 c -101.068,0 -202.137,0 -303.2049,0 0,180.4532 0,360.9062 0,541.3592 z"
68
+ transform="translate(262.858,-33.354)" />
69
+ </g>
70
+ <path
71
+ id="path6081"
72
+ style="font-size:14.6667px;line-height:100%;font-family:Z003;-inkscape-font-specification:Z003;text-align:center;letter-spacing:-0.99px;text-anchor:middle;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0127256;stroke-miterlimit:3"
73
+ d="m 184.994,352.959 c -1.502,0.211 -2.55,1.622 -2.707,3.07 -0.243,0.575 -0.819,-0.01 -1.085,-0.261 -1.23,-1.12 -3.704,-0.65 -4.14,1.052 -0.291,1.219 0.858,2.064 1.764,2.608 0.878,0.307 0.743,1.658 -0.133,1.853 -0.488,0.161 -1.471,0.06 -1.396,-0.635 0.302,-0.441 1.102,-0.281 1.281,-0.816 -0.487,-1.005 -2.163,-1.14 -2.782,-0.181 -0.716,0.87 -0.54,2.364 0.533,2.868 0.536,0.45 1.479,0.589 2.001,0.629 -0.55,0.315 -0.89,1.217 -0.23,1.606 1.221,0.987 3.303,0.437 3.804,-1.082 0.903,-1.771 1.173,-3.766 1.75,-5.65 0.842,-0.268 2.019,0.4 2.606,-0.516 0.04,-0.298 0.526,-0.312 0.693,-0.145 -1.623,1.263 -3.139,2.744 -4.215,4.493 0.08,0.58 0.731,1.184 1.315,0.916 0.259,-0.616 1.035,-0.334 1.415,0 1.506,0.731 3.8,0.263 4.326,-1.495 0.321,-0.958 0.193,-2.216 -0.649,-2.859 -0.782,-0.04 -1.677,0.511 -1.768,1.319 0.249,0.399 1.126,0.88 0.545,1.369 -0.631,0.485 -1.486,0.203 -2.1,-0.16 1.087,-1.707 2.699,-2.977 4.211,-4.28 0.348,-0.687 -0.786,-1.364 -1.24,-0.756 -0.669,0.313 -1.408,0 -2.07,-0.17 0.571,-0.149 1.428,-0.72 1.019,-1.394 -0.549,-0.924 -1.589,-1.603 -2.691,-1.382 z m 0.477,1.502 c 0.626,0 0.638,0.707 0.602,1.125 -0.648,0.01 -1.361,0.334 -1.975,0.639 0.113,-0.751 0.455,-1.763 1.373,-1.764 z m -5.746,2.391 c 0.669,0.07 -0.344,0.692 0.115,0.982 0.567,0.356 1.298,-0.107 1.894,0.127 0.271,0.499 -0.204,1.046 -0.213,1.588 -0.106,0.359 -0.125,1.124 -0.278,0.406 -0.358,-0.944 -1.396,-1.305 -2.014,-2.006 -0.384,-0.379 -0.227,-1.2 0.412,-1.096 h 0.08 z m 1.189,5.287 c -0.207,0.541 -0.502,1.264 -1.137,1.392 -0.456,-0.201 -0.483,-0.674 0.05,-0.715 0.501,-0.228 0.937,-0.614 1.214,-1.091 -0.04,0.138 -0.09,0.276 -0.129,0.414 z"
74
+ transform="matrix(39.2909,0,0,39.2909,-6616.21,-13836.7)" />
75
+ <path
76
+ d="m 175.591,360.898 c -0.01,1.204 1.433,1.971 2.831,1.98 1.163,0 2.053,-0.543 2.488,-1.447 0.717,-1.49 -0.471,-2.162 -1.382,-2.854 -0.351,-0.249 -1.032,-0.864 -0.715,-1.529 0.136,-0.482 0.647,-0.497 1.164,-0.391 0.434,0.09 0.7,0.674 0.63,1.03 l 0.932,-0.848 c 0,0 0.03,-0.57 -0.518,-0.964 -0.398,-0.289 -1.12,-0.418 -1.519,-0.441 -0.813,-0.05 -2.075,0.355 -2.258,1.785 0.07,1.018 1.047,1.549 1.744,2.009 0.861,0.43 1.015,1.667 0.08,2.158 -0.902,0.473 -1.988,0.09 -2.097,-0.488 -0.116,-0.621 0.89,-0.842 1.318,-1 0.416,-0.154 -1.172,-0.772 -1.443,-0.695 -0.797,0.349 -1.247,1.036 -1.255,1.695 z"
77
+ style="font-size:14.6667px;line-height:100%;font-family:Z003;-inkscape-font-specification:Z003;text-align:center;letter-spacing:-0.99px;text-anchor:middle;fill:#3a6973;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0127256;stroke-miterlimit:3"
78
+ id="path2715"
79
+ transform="matrix(39.2909,0,0,39.2909,-6616.21,-13836.7)" />
80
+ <path
81
+ d="m 178.058,364.076 c -0.03,0.28 0.364,0.979 1.951,0.945 2.107,-0.05 2.62,-3.953 3.578,-7.291 l 2.26,0.05 0.877,-1.282 -2.902,0.169 c 0.339,-1.447 0.626,-2.352 1.684,-2.405 0.951,-0.05 1.069,0.843 0.856,1.363 0.306,-0.02 1.284,-0.393 1.394,-0.86 -0.623,-1.01 -0.974,-1.518 -2.134,-1.513 -2.17,-0.06 -2.666,1.494 -3.111,3.288 l -1.591,-0.05 -0.917,1.185 2.348,0.05 c -0.626,1.92 -0.878,5.9 -2.311,6.083 -0.896,0.08 -0.583,-0.675 -0.804,-0.743 -0.524,0.183 -1.16,0.702 -1.178,1.008 z"
82
+ style="font-size:14.6667px;line-height:100%;font-family:Z003;-inkscape-font-specification:Z003;text-align:center;letter-spacing:-0.99px;text-anchor:middle;fill:#438561;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0127256;stroke-miterlimit:3"
83
+ id="path2717"
84
+ transform="matrix(39.2909,0,0,39.2909,-6620.37,-13837.6)" />
85
+ <path
86
+ d="m 184.183,362.603 c 0.129,-0.01 0.232,-0.275 0.369,-0.399 0.148,-0.133 0.464,-0.231 0.618,-0.125 0.734,0.401 1.423,0.801 2.411,0.709 1.863,-0.173 2.469,-1.121 2.498,-2.593 0.01,-0.743 -0.408,-1.493 -0.557,-1.568 -0.529,-0.162 -1.484,0.604 -1.546,0.93 0.04,0.296 0.989,0.648 0.815,1.287 -0.522,1.046 -1.79,0.88 -2.943,0.151 0.268,-0.674 1.474,-1.932 2.313,-2.776 0.631,-0.635 1.94,-1.544 2.081,-1.789 0.1,-0.171 -0.405,-0.715 -0.657,-0.519 -0.302,0.228 -0.651,0.39 -1.031,0.373 -0.841,0.01 -0.938,-0.41 -2.164,-0.427 -0.929,-0.01 -1.967,0.667 -1.967,0.667 0,0 -0.218,1.079 -0.03,1.059 1.372,-1.047 2.383,-0.648 3.555,-0.39 -1.535,0.997 -3.105,2.706 -3.895,3.698 -0.198,0.248 -0.528,0.614 -0.692,0.886 -0.04,0.36 0.645,0.856 0.82,0.83 z"
87
+ style="font-size:14.6667px;line-height:100%;font-family:Z003;-inkscape-font-specification:Z003;text-align:center;letter-spacing:-0.99px;text-anchor:middle;fill:#574f4b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.0127256;stroke-miterlimit:3"
88
+ id="path2719"
89
+ transform="matrix(39.2909,0,0,39.2909,-6631.07,-13834.7)" />
90
+ </g>
91
+ </g>
92
+ </svg>
@@ -12,7 +12,7 @@ dependencies = [
12
12
  "recent_items_list >= 1.1.2",
13
13
  "sfzen >= 2.3.2",
14
14
  "soso_qt_extras >= 1.7.0",
15
- "xdg_soso >= 0.2.0"
15
+ "xdg_soso >= 1.0.2"
16
16
  ]
17
17
 
18
18
  [project.urls]
@@ -27,7 +27,7 @@ requires = ["flit_core >=3.2,<4"]
27
27
  build-backend = "flit_core.buildapi"
28
28
 
29
29
  [bumpver]
30
- current_version = "1.8.2"
30
+ current_version = "1.10.0"
31
31
  version_pattern = "MAJOR.MINOR.PATCH"
32
32
  commit_message = "Bump version {old_version} -> {new_version}"
33
33
  commit = true
File without changes
File without changes
File without changes
File without changes
File without changes