q2rad 0.1.149__tar.gz → 0.1.151__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.

Potentially problematic release.


This version of q2rad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q2rad
3
- Version: 0.1.149
3
+ Version: 0.1.151
4
4
  Summary: RAD - database, GUI, reports
5
5
  Author: Andrei Puchko
6
6
  Author-email: andrei.puchko@gmx.de
@@ -34,23 +34,36 @@ sudo apt install python3-pip python3-virtualenv
34
34
  ```
35
35
 
36
36
  ## Install & run - Launcher (https://github.com/AndreiPuchko/q2radlauncher)
37
- **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
38
-
39
37
  **Windows**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/windows/q2radlauncher.exe
40
38
 
39
+ **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
40
+
41
41
  **macOS**: run from terminal or ```git clone https://github.com/AndreiPuchko/q2radlauncher``` and build executable with ```build_executable.zsh```
42
42
 
43
43
        https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/macos/q2radlauncher
44
44
  ## Install & run - Python script
45
- **Linux, macOS**
45
+ **Windows**
46
+ ```bash
47
+ wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
48
+ ```
49
+ **Linux**
46
50
  ```bash
47
51
  wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O - | python3
48
52
  ```
49
- **Windows**
53
+ **macOS**
50
54
  ```bash
51
- wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
55
+ curl https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py | python3
52
56
  ```
53
57
  ## Install & run - terminal
58
+ **Windows (Powershell)**
59
+ ```bash
60
+ mkdir q2rad ;`
61
+ cd q2rad ;`
62
+ py -m pip install --upgrade pip ;`
63
+ py -m venv q2rad;q2rad/scripts/activate ;`
64
+ py -m pip install --upgrade q2rad ;`
65
+ q2rad
66
+ ```
54
67
  **Linux**
55
68
  ```bash
56
69
  sudo apt install python3-venv python3-pip -y &&\
@@ -62,15 +75,6 @@ sudo apt install python3-venv python3-pip -y &&\
62
75
  python3 -m pip install --upgrade q2rad && \
63
76
  q2rad
64
77
  ```
65
- **Windows (Powershell)**
66
- ```bash
67
- mkdir q2rad ;`
68
- cd q2rad ;`
69
- py -m pip install --upgrade pip ;`
70
- py -m venv q2rad;q2rad/scripts/activate ;`
71
- py -m pip install --upgrade q2rad ;`
72
- q2rad
73
- ```
74
78
  **macOS**
75
79
  ```bash
76
80
  mkdir -p q2rad && \
@@ -17,23 +17,36 @@ sudo apt install python3-pip python3-virtualenv
17
17
  ```
18
18
 
19
19
  ## Install & run - Launcher (https://github.com/AndreiPuchko/q2radlauncher)
20
- **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
21
-
22
20
  **Windows**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/windows/q2radlauncher.exe
23
21
 
22
+ **Linux**: https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/linux/q2radlauncher
23
+
24
24
  **macOS**: run from terminal or ```git clone https://github.com/AndreiPuchko/q2radlauncher``` and build executable with ```build_executable.zsh```
25
25
 
26
26
        https://github.com/AndreiPuchko/q2radlauncher/blob/main/bin/macos/q2radlauncher
27
27
  ## Install & run - Python script
28
- **Linux, macOS**
28
+ **Windows**
29
+ ```bash
30
+ wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
31
+ ```
32
+ **Linux**
29
33
  ```bash
30
34
  wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O - | python3
31
35
  ```
32
- **Windows**
36
+ **macOS**
33
37
  ```bash
34
- wget https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py -O get-q2rad.py | py get-q2rad.py; del get-q2rad.py
38
+ curl https://raw.githubusercontent.com/AndreiPuchko/q2rad/main/install/get-q2rad.py | python3
35
39
  ```
36
40
  ## Install & run - terminal
41
+ **Windows (Powershell)**
42
+ ```bash
43
+ mkdir q2rad ;`
44
+ cd q2rad ;`
45
+ py -m pip install --upgrade pip ;`
46
+ py -m venv q2rad;q2rad/scripts/activate ;`
47
+ py -m pip install --upgrade q2rad ;`
48
+ q2rad
49
+ ```
37
50
  **Linux**
38
51
  ```bash
39
52
  sudo apt install python3-venv python3-pip -y &&\
@@ -45,15 +58,6 @@ sudo apt install python3-venv python3-pip -y &&\
45
58
  python3 -m pip install --upgrade q2rad && \
46
59
  q2rad
47
60
  ```
48
- **Windows (Powershell)**
49
- ```bash
50
- mkdir q2rad ;`
51
- cd q2rad ;`
52
- py -m pip install --upgrade pip ;`
53
- py -m venv q2rad;q2rad/scripts/activate ;`
54
- py -m pip install --upgrade q2rad ;`
55
- q2rad
56
- ```
57
61
  **macOS**
58
62
  ```bash
59
63
  mkdir -p q2rad && \
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "q2rad"
3
- version = "0.1.149"
3
+ version = "0.1.151"
4
4
  description = "RAD - database, GUI, reports"
5
5
  authors = ["Andrei Puchko <andrei.puchko@gmx.de>"]
6
6
  readme = "README.md"
@@ -51,7 +51,7 @@ from q2rad.q2raddb import q2cursor
51
51
  from q2rad.q2appmanager import AppManager
52
52
  from q2rad.q2stylesettings import AppStyleSettings
53
53
  from q2rad.q2utils import set_logging
54
-
54
+ from q2terminal.q2terminal import Q2Terminal
55
55
  from q2rad.q2appselector import Q2AppSelect
56
56
  from q2rad.q2modules import Q2Modules
57
57
  from q2rad.q2forms import Q2Forms
@@ -633,8 +633,6 @@ class Q2RadApp(Q2App):
633
633
  self.process_events()
634
634
 
635
635
  def get_package_versions(self, package):
636
- import time
637
- time.sleep(1)
638
636
  response = open_url(f"https://pypi.python.org/pypi/{package}/json") # noqa F405
639
637
  if response:
640
638
  latest_version = json.load(response)["info"]["version"]
@@ -674,11 +672,35 @@ class Q2RadApp(Q2App):
674
672
  mess = "Updates not found!<p>"
675
673
  q2Mess(mess)
676
674
  if upgraded:
677
- if "win32" in sys.platform:
678
- subprocess.Popen([sys.executable, "-m", "q2rad"], start_new_session=True)
679
- else:
680
- os.execv(sys.executable, [sys.executable, "-m", "q2rad"])
681
- self.close()
675
+ self.restart()
676
+
677
+ def update_from_git(self, package=""):
678
+ if os.path.isfile("poetry.lock"):
679
+ q2mess("poetry.lock presents - update from git is impossible!")
680
+ return
681
+
682
+ def callback(data):
683
+ print(data)
684
+
685
+ trm = Q2Terminal(callback=callback)
686
+ executable = sys.executable.replace("w.exe", ".exe")
687
+ for x in q2_modules:
688
+ if not x.startswith("q2"):
689
+ continue
690
+ if package and x != package:
691
+ continue
692
+ trm.run(
693
+ f"{executable} -m pip install --upgrade --force-reinstall "
694
+ f" git+https://github.com/AndreiPuchko/{x}.git"
695
+ )
696
+ print("Done")
697
+
698
+ def restart(self):
699
+ if "win32" in sys.platform:
700
+ subprocess.Popen([sys.executable, "-m", "q2rad"], start_new_session=True)
701
+ else:
702
+ os.execv(sys.executable, [sys.executable, "-m", "q2rad"])
703
+ self.close()
682
704
 
683
705
  def pip_install(self, package, latest_version):
684
706
  q2working(
@@ -32,6 +32,7 @@ class AppStyleSettings(Q2Form):
32
32
  super().__init__("Style Settings")
33
33
 
34
34
  def on_init(self):
35
+ self.color_modes = {"dark": "Dark", "light": "Light", "clean": "Clean"}
35
36
  self.last_font_size = self.q2_app.q2style.font_size
36
37
  # print("==", self.last_font_size)
37
38
  self.last_color_mode = self.q2_app.q2style.color_mode
@@ -43,35 +44,36 @@ class AppStyleSettings(Q2Form):
43
44
  control="radio",
44
45
  datalen=10,
45
46
  valid=self.style_valid,
46
- data=2,
47
+ data=self.color_modes.get(
48
+ self.q2_app.q2style.color_mode, self.q2_app.q2style.get_system_color_mode()
49
+ ),
47
50
  )
48
51
 
49
- self.add_control("/h")
52
+ self.add_control("/h", "Font size")
53
+ self.add_control("minus", "-", datalen=1, datatype="int", control="button", valid=self._font_minus)
54
+
50
55
  self.add_control(
51
56
  "font_size",
52
- "Font size",
57
+ "",
53
58
  datalen=6,
54
59
  datatype="int",
55
- control="spin",
60
+ control="line",
56
61
  data=self.q2_app.q2style.font_size,
57
- )
58
- self.add_control(
59
- "apply",
60
- "Apply",
61
- datalen=10,
62
- datatype="int",
63
- control="button",
64
62
  valid=self.style_valid,
65
63
  )
64
+ self.add_control("plus", "+", datalen=1, datatype="int", control="button", valid=self._font_plus)
66
65
  self.add_control("/")
67
66
 
68
67
  self.ok_button = 1
69
68
  self.cancel_button = 1
70
69
 
71
- def after_form_show(self):
72
- self.s.color_mode = {"dark": "Dark", "light": "Light", "clean": "Clean"}.get(
73
- self.q2_app.q2style.color_mode, self.q2_app.q2style.get_system_color_mode()
74
- )
70
+ def _font_plus(self):
71
+ self.s.font_size = int_(self.s.font_size) + 1
72
+ self.style_valid()
73
+
74
+ def _font_minus(self):
75
+ self.s.font_size = int_(self.s.font_size) - 1
76
+ self.style_valid()
75
77
 
76
78
  def get_color_mode(self):
77
79
  color_mode = self.s.color_mode.lower()
@@ -89,6 +91,9 @@ class AppStyleSettings(Q2Form):
89
91
 
90
92
  def style_valid(self):
91
93
  self.q2_app.q2style.font_size = int_(self.s.font_size)
94
+ if self.q2_app.q2style.font_size < 8:
95
+ self.s.font_size = 8
96
+ self.style_valid()
92
97
  self.q2_app.set_color_mode(self.get_color_mode())
93
98
  self.q2_app.set_color_mode(self.get_color_mode())
94
99
 
@@ -0,0 +1 @@
1
+ __version__ = "0.1.151"
@@ -1 +0,0 @@
1
- __version__ = "0.1.149"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes