radboy 0.0.623__py3-none-any.whl → 0.0.624__py3-none-any.whl

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 radboy might be problematic. Click here for more details.

radboy/FB/FormBuilder.py CHANGED
@@ -11,7 +11,57 @@ import json
11
11
  from pathlib import Path
12
12
  from datetime import date,time,datetime
13
13
  from radboy.FB.FBMTXT import *
14
+ from copy import copy
15
+ from radboy.DB import db as DB
14
16
 
17
+ def findAndSelectKey(options=None):
18
+ if options is None:
19
+ options=[]
20
+ with Session(ENGINE) as session:
21
+ cmd=Prompt.__init2__(None,func=FormBuilderMkText,ptext=f"{Fore.light_red}[FindAndUse2]{Fore.light_yellow}what cmd are your looking for?",helpText="type the cmd",data="string")
22
+ if cmd in ['d',None]:
23
+ return
24
+ else:
25
+ options=copy(options)
26
+
27
+ session.query(DB.db.FindCmd).delete()
28
+ session.commit()
29
+ for num,k in enumerate(options):
30
+ stage=0
31
+ if isinstance(options,dict):
32
+ cmds=options[k]['cmds']
33
+ l=[]
34
+ l.extend(cmds)
35
+ l.append(options[k]['desc'])
36
+ else:
37
+ l=[]
38
+ l.extend(options)
39
+ cmdStr=' '.join(l)
40
+ cmd_string=DB.db.FindCmd(CmdString=cmdStr,CmdKey=k)
41
+ session.add(cmd_string)
42
+ if num % 50 == 0:
43
+ session.commit()
44
+ session.commit()
45
+ session.flush()
46
+
47
+ results=session.query(DB.db.FindCmd).filter(DB.db.FindCmd.CmdString.icontains(cmd)).all()
48
+
49
+
50
+ ct=len(results)
51
+ if ct == 0:
52
+ print(f"No Cmd was found by {Fore.light_red}{cmd}{Style.reset}")
53
+ return
54
+ for num,x in enumerate(results):
55
+ msg=DB.db.std_colorize(x.CmdKey,num,ct)
56
+ print(msg)
57
+ select=Prompt.__init2__(None,func=FormBuilderMkText,ptext="which index?",helpText="the number farthest to the left before the /",data="integer")
58
+ if select in [None,'d']:
59
+ return
60
+ try:
61
+ if select in list(i for i in range(len(options))):
62
+ return results[select].CmdKey
63
+ except Exception as e:
64
+ print(e)
15
65
 
16
66
  def FormBuilder(data,extra_tooling=False,passThruText=None):
17
67
  if passThruText != None:
@@ -96,6 +146,7 @@ def FormBuilder(data,extra_tooling=False,passThruText=None):
96
146
  {Fore.grey_70}*{Fore.light_yellow}goto {Fore.light_cyan}i{Fore.light_yellow}/goto{Fore.light_cyan}i{Fore.light_green} - go to {Fore.light_cyan}index{Style.reset}
97
147
  {Fore.grey_70}*{Fore.light_yellow}goto{Fore.light_cyan}k{Fore.light_yellow},goto {Fore.light_cyan}k{Fore.light_green} goto {Fore.light_cyan}key{Fore.light_green} for field in Form {Style.reset}
98
148
  {Fore.grey_70}*{Fore.light_yellow}showkeys{Fore.light_green} to see indexes refering to form keys{Style.reset}
149
+ {Fore.grey_70}*{Fore.light_yellow}'schk','search keys','sch ky{Fore.light_green} to search select and goto key{Style.reset}
99
150
  {Fore.grey_70}* {Fore.grey_50}These cmds only work with fields that return str/VARCHAR/TEXT/str+/list of str's, i.e. [str,]{Style.reset}"""
100
151
  print(ht2)
101
152
  FormBuilderHelpText()
@@ -151,6 +202,17 @@ def FormBuilder(data,extra_tooling=False,passThruText=None):
151
202
  finalize=True
152
203
  skip_review=True
153
204
  break
205
+ elif isinstance(line,str) and line.lower() in ['schk','search keys','sch ky']:
206
+ DATA={str(i):{'cmds':[i,],'desc':''} for i in data}
207
+ GOTOK=findAndSelectKey(options=DATA)
208
+ while GOTOK not in list(data.keys()):
209
+ GOTOK=setGOTOK_str(GOTOK)
210
+ if GOTOK in [None,]:
211
+ return
212
+ done=True
213
+ finalize=True
214
+ skip_review=True
215
+ break
154
216
  elif isinstance(line,str) and line.lower() in ['showkeys','show keys']:
155
217
  keys_index(data)
156
218
  '''
@@ -185,7 +247,7 @@ def FormBuilder(data,extra_tooling=False,passThruText=None):
185
247
  else:
186
248
  if_continue=False
187
249
  while True:
188
- passThru=['gotoi','goto i','gotok','goto k','showkeys','show keys','ff','finalize','finish']
250
+ passThru=['gotoi','goto i','gotok','goto k','showkeys','show keys','ff','finalize','finish','schk','search keys','sch ky']
189
251
  cmd=Prompt.__init2__(None,func=lambda text,data:FormBuilderMkText(text,data,passThru=passThru,PassThru=True),ptext=f"{passThruText} You(m):{item.get(k)}|Default(d):{data[k]['default']} Field:{str(k)}",helpText=f'{ht}',data=data[k]['type'])
190
252
  if cmd in [None,]:
191
253
  return
@@ -216,7 +278,16 @@ def FormBuilder(data,extra_tooling=False,passThruText=None):
216
278
  GOTOK=setGOTOK_str(data)
217
279
  if_continue=True
218
280
  break
219
-
281
+ elif isinstance(cmd,str) and cmd.lower() in ['schk','search keys','sch ky']:
282
+ DATA={str(i):{'cmds':[i,],'desc':''} for i in data}
283
+ GOTOK=findAndSelectKey(options=DATA)
284
+ print(GOTOK)
285
+ while GOTOK not in list(data.keys()):
286
+ GOTOK=setGOTOK_str(GOTOK)
287
+ if GOTOK in [None,]:
288
+ return
289
+ if_continue=True
290
+ break
220
291
  elif isinstance(cmd,str) and cmd.lower() in ['showkeys','show keys']:
221
292
  keys_index(data)
222
293
  continue
radboy/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION='0.0.623'
1
+ VERSION='0.0.624'
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: radboy
3
- Version: 0.0.623
3
+ Version: 0.0.624
4
4
  Summary: A Retail Calculator for Android/Linux
5
5
  Author: Carl Joseph Hirner III
6
6
  Author-email: Carl Hirner III <k.j.hirner.wisdom@gmail.com>
@@ -5,7 +5,7 @@ radboy/Holidays.txt,sha256=y-JZPihh5iaWKxMIHNXD39yVuVmf1vMs4FdNDcg0f1Y,3114
5
5
  radboy/InventoryGlossary.txt,sha256=018-Yqca6DFb10jPdkUY-5qhkRlQN1k3rxoTaERQ-LA,91008
6
6
  radboy/RecordMyCodes.py,sha256=Lt2reA6xchq3U7Y08DvkrHboZ25i1ts7X2E9gSIwcVg,41101
7
7
  radboy/Run.py,sha256=JUoCTHnzQBv7n8PB2_i93ANdAC_iW__RkAge8esCnk4,76
8
- radboy/__init__.py,sha256=fBZ5VGRL7hGrbcfp01JvZHd8YCLR3k9xUFxN2sEGXK8,17
8
+ radboy/__init__.py,sha256=zsaFEMBLbBD9s1uLpdqx4u15pKazpCbSGLadHmQMhTA,17
9
9
  radboy/api_key,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  radboy/case-export-2024-05-14-13-10-00.672971.xlsx,sha256=Wd592d_VLFmfUI9KKKSVjNwjV91euc1T7ATyvwvUhlg,5431
11
11
  radboy/case-export-2024-05-14-13-13-22.540614.xlsx,sha256=OnGrhmScHfGp_mVaWW-LNMsqrQgyZDpiU3wV-2s3U5Q,5556
@@ -196,12 +196,12 @@ radboy/ExtractPkg/__pycache__/__init__.cpython-311.pyc,sha256=62yPgrgPZffZFLr6Fs
196
196
  radboy/ExtractPkg/__pycache__/__init__.cpython-312.pyc,sha256=Ll1iKcG0MDtoCIloQ_frcihvCSe1HPtyERzcAoXwQT0,273
197
197
  radboy/ExtractPkg/__pycache__/__init__.cpython-313.pyc,sha256=kL3Y3KxCTaGNg3aq5fhf2fsnQHZolGfvniEUfsx2bwY,152
198
198
  radboy/FB/FBMTXT.py,sha256=AVD6TV4b4D9OZN7ePZBIiSDnlWIe2a7kYvnhPTpVNiI,42121
199
- radboy/FB/FormBuilder.py,sha256=aa-Yrvnq1Qjw3mJFhA1me8dvbKLdSxnjfe4QhpGD3vQ,15141
199
+ radboy/FB/FormBuilder.py,sha256=v9Ax07LvOwpLlHqEXENO4HGvEyuQfoO-sJm7o8AhKj0,18516
200
200
  radboy/FB/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
201
201
  radboy/FB/__pycache__/FBMTXT.cpython-312.pyc,sha256=XCVFa7Mo83LGIdRrTvcK73siUpcVIEQfXKCH2QHeViw,9626
202
202
  radboy/FB/__pycache__/FBMTXT.cpython-313.pyc,sha256=nmunRZkKeCef8OqvHVjcC6Mc2eD6sNf-O61jaycHrKM,56467
203
203
  radboy/FB/__pycache__/FormBuilder.cpython-312.pyc,sha256=lNQdB-zApsXM7OQF9MIi0zRZD1SAL6stKEN-AyQiIKg,18873
204
- radboy/FB/__pycache__/FormBuilder.cpython-313.pyc,sha256=r1ZKoACDl-tgPwuGxGixzX-bgcdhDZUAnyG0HVSa6cY,19962
204
+ radboy/FB/__pycache__/FormBuilder.cpython-313.pyc,sha256=nJP30kg8NFod4fTA9cZdAdnz8osjrfNJuXK9QVnHOtI,24775
205
205
  radboy/FB/__pycache__/__init__.cpython-312.pyc,sha256=ULEL8Au_CxcYpNAcSoSbI65M7-av1W6Zuy6kQJUu-Mw,265
206
206
  radboy/FB/__pycache__/__init__.cpython-313.pyc,sha256=Mp4kqFJa86-gyUu1vr9rubcUHUDr-O75hevV5IQdSFw,144
207
207
  radboy/GDOWN/GDOWN.py,sha256=Z5q6TR92I4eQpxhsJpOwhH__f1tK2IcGctPRw8OAEr8,798
@@ -401,7 +401,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
401
401
  radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
402
402
  radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
403
403
  radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
404
- radboy/__pycache__/__init__.cpython-313.pyc,sha256=62bEorwVobvtSzIXeivag39_t3Hl1wdbUU_18Z3vLbI,165
404
+ radboy/__pycache__/__init__.cpython-313.pyc,sha256=XjG6Qxfo2bHdj0vNthHIleAvFa_xcrEFqDO9aFUs-Oo,165
405
405
  radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
406
406
  radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
407
407
  radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
@@ -429,7 +429,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
429
429
  radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
430
430
  radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
431
431
  radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
432
- radboy-0.0.623.dist-info/METADATA,sha256=_vlo7_QC_gHlGQg2EFnpXT7aVW_X5wZD4aZHySUIgA8,1662
433
- radboy-0.0.623.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
434
- radboy-0.0.623.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
435
- radboy-0.0.623.dist-info/RECORD,,
432
+ radboy-0.0.624.dist-info/METADATA,sha256=2qMfXoCVvw_dfSXrwBsTReyiJ9dlrCMO7Q3G2WIhg2w,1662
433
+ radboy-0.0.624.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
434
+ radboy-0.0.624.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
435
+ radboy-0.0.624.dist-info/RECORD,,