radboy 0.0.545__py3-none-any.whl → 0.0.546__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/TasksMode/Tasks.py +67 -8
- radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc +0 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- {radboy-0.0.545.dist-info → radboy-0.0.546.dist-info}/METADATA +1 -1
- {radboy-0.0.545.dist-info → radboy-0.0.546.dist-info}/RECORD +8 -8
- {radboy-0.0.545.dist-info → radboy-0.0.546.dist-info}/WHEEL +0 -0
- {radboy-0.0.545.dist-info → radboy-0.0.546.dist-info}/top_level.txt +0 -0
radboy/TasksMode/Tasks.py
CHANGED
|
@@ -289,6 +289,52 @@ def save(value):
|
|
|
289
289
|
detectGetOrSet("InLineResult",value,setValue=True,literal=True)
|
|
290
290
|
|
|
291
291
|
class Formulae:
|
|
292
|
+
def findAndUse2(self,options=None):
|
|
293
|
+
if options is None:
|
|
294
|
+
options=self.options
|
|
295
|
+
with Session(ENGINE) as session:
|
|
296
|
+
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")
|
|
297
|
+
if cmd in ['d',None]:
|
|
298
|
+
return
|
|
299
|
+
else:
|
|
300
|
+
options=copy(options)
|
|
301
|
+
|
|
302
|
+
session.query(FindCmd).delete()
|
|
303
|
+
session.commit()
|
|
304
|
+
for num,k in enumerate(options):
|
|
305
|
+
stage=0
|
|
306
|
+
cmds=options[k]['cmds']
|
|
307
|
+
l=[]
|
|
308
|
+
l.extend(cmds)
|
|
309
|
+
l.append(options[k]['desc'])
|
|
310
|
+
cmdStr=' '.join(l)
|
|
311
|
+
cmd_string=FindCmd(CmdString=cmdStr,CmdKey=k)
|
|
312
|
+
session.add(cmd_string)
|
|
313
|
+
if num % 50 == 0:
|
|
314
|
+
session.commit()
|
|
315
|
+
session.commit()
|
|
316
|
+
session.flush()
|
|
317
|
+
|
|
318
|
+
results=session.query(FindCmd).filter(FindCmd.CmdString.icontains(cmd)).all()
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
ct=len(results)
|
|
322
|
+
if ct == 0:
|
|
323
|
+
print(f"No Cmd was found by {Fore.light_red}{cmd}{Style.reset}")
|
|
324
|
+
return
|
|
325
|
+
for num,x in enumerate(results):
|
|
326
|
+
msg=f"{Fore.light_yellow}{num}/{Fore.light_steel_blue}{num+1} of {Fore.light_red}{ct} -> {Fore.turquoise_4}{f'{Fore.light_yellow},{Style.reset}{Fore.turquoise_4}'.join(options[x.CmdKey]['cmds'])} - {Fore.green_yellow}{options[x.CmdKey]['desc']}"
|
|
327
|
+
print(msg)
|
|
328
|
+
select=Prompt.__init2__(None,func=FormBuilderMkText,ptext="which index?",helpText="the number farthest to the left before the /",data="integer")
|
|
329
|
+
if select in [None,'d']:
|
|
330
|
+
return
|
|
331
|
+
try:
|
|
332
|
+
ee=options[results[select].CmdKey]['exec']
|
|
333
|
+
if callable(ee):
|
|
334
|
+
return ee()
|
|
335
|
+
except Exception as e:
|
|
336
|
+
print(e)
|
|
337
|
+
|
|
292
338
|
def __init__(self):
|
|
293
339
|
pass
|
|
294
340
|
def formulaeu(self):
|
|
@@ -337,7 +383,9 @@ class Formulae:
|
|
|
337
383
|
result=value*-1
|
|
338
384
|
return result
|
|
339
385
|
|
|
340
|
-
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
self.options={
|
|
341
389
|
f'{uuid1()}':{
|
|
342
390
|
'cmds':['invert','-value','iv-val'],
|
|
343
391
|
'desc':f'{Fore.light_yellow}value{Fore.medium_violet_red}is multiplied by -1 to make inverse{Style.reset}',
|
|
@@ -348,11 +396,17 @@ class Formulae:
|
|
|
348
396
|
'desc':f'{Fore.light_yellow}value{Fore.medium_violet_red}convert decimal time to clock time{Style.reset}',
|
|
349
397
|
'exec':timedecimal_to_ampm
|
|
350
398
|
},
|
|
399
|
+
f'{uuid1()}':{
|
|
400
|
+
'cmds':['fcmd','findcmd','find cmd'],
|
|
401
|
+
'desc':f'Find {Fore.light_yellow}cmd{Fore.medium_violet_red}and excute for return{Style.reset}',
|
|
402
|
+
'exec':self.findAndUse2
|
|
403
|
+
},
|
|
351
404
|
}
|
|
352
405
|
defaults_msg=f'''
|
|
353
406
|
'''
|
|
354
|
-
for num,i in enumerate(options):
|
|
355
|
-
options[i]['cmds'].append(str(num))
|
|
407
|
+
for num,i in enumerate(self.options):
|
|
408
|
+
self.options[i]['cmds'].append(str(num))
|
|
409
|
+
options=copy(self.options)
|
|
356
410
|
|
|
357
411
|
while True:
|
|
358
412
|
helpText=[]
|
|
@@ -511,7 +565,7 @@ class Formulae:
|
|
|
511
565
|
tax=price*Decimal(tax_rate)
|
|
512
566
|
|
|
513
567
|
|
|
514
|
-
result=
|
|
568
|
+
result=(Decimal(price)+tax).quantize(Decimal('0.0000'))
|
|
515
569
|
return result
|
|
516
570
|
|
|
517
571
|
def tax_with_crv():
|
|
@@ -698,7 +752,7 @@ class Formulae:
|
|
|
698
752
|
return result
|
|
699
753
|
|
|
700
754
|
|
|
701
|
-
options={
|
|
755
|
+
self.options={
|
|
702
756
|
f'{uuid1()}':{
|
|
703
757
|
'cmds':['beverage price+tax+CRV','b-ptcrv',],
|
|
704
758
|
'desc':f'{Fore.light_yellow}beverage Price+Tax+CRV{Fore.medium_violet_red} asking for base questions like bottle size and qty to get total cost with tax{Style.reset}',
|
|
@@ -739,10 +793,15 @@ class Formulae:
|
|
|
739
793
|
'desc':f'{Fore.light_yellow}tax rate decimal{Fore.medium_violet_red} from percent{Style.reset}',
|
|
740
794
|
'exec':tax_rate_decimal
|
|
741
795
|
},
|
|
796
|
+
f'{uuid1()}':{
|
|
797
|
+
'cmds':['fcmd','findcmd','find cmd'],
|
|
798
|
+
'desc':f'Find {Fore.light_yellow}cmd{Fore.medium_violet_red}and excute for return{Style.reset}',
|
|
799
|
+
'exec':self.findAndUse2
|
|
800
|
+
},
|
|
742
801
|
}
|
|
743
|
-
for num,i in enumerate(options):
|
|
744
|
-
options[i]['cmds'].append(str(num))
|
|
745
|
-
|
|
802
|
+
for num,i in enumerate(self.options):
|
|
803
|
+
self.options[i]['cmds'].append(str(num))
|
|
804
|
+
options=copy(self.options)
|
|
746
805
|
while True:
|
|
747
806
|
helpText=[]
|
|
748
807
|
for i in options:
|
|
Binary file
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.546'
|
|
Binary file
|
|
@@ -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=
|
|
8
|
+
radboy/__init__.py,sha256=M4GNJjPNUq8u7e8Sqq14tiWOGezP5HtZePM-xgWZTlk,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
|
|
@@ -341,7 +341,7 @@ radboy/SystemSettings/__pycache__/__init__.cpython-312.pyc,sha256=aIzp4Po0t8EhSA
|
|
|
341
341
|
radboy/SystemSettings/__pycache__/__init__.cpython-313.pyc,sha256=QFDuoidxMWsGVLsy5lN-rDs6TP8nKJ4yyCyiamNOhwo,156
|
|
342
342
|
radboy/TasksMode/ReFormula.py,sha256=REDRJYub-OEOE6g14oRQOLOQwv8pHqVJy4NQk3CCM90,2255
|
|
343
343
|
radboy/TasksMode/SetEntryNEU.py,sha256=Gu0Z677tjpc7-9AQtLbIr7yzPx6ZJXGK33lOIgU0IRM,17432
|
|
344
|
-
radboy/TasksMode/Tasks.py,sha256=
|
|
344
|
+
radboy/TasksMode/Tasks.py,sha256=za4WwmXUtucq1kUjF3ncgFTHuQDtUns7ZAOShhsaUqs,340152
|
|
345
345
|
radboy/TasksMode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
346
346
|
radboy/TasksMode/__pycache__/ReFormula.cpython-311.pyc,sha256=QEG3PwVw-8HTd_Mf9XbVcxU56F1fC9yBqWXYPLC39DU,4865
|
|
347
347
|
radboy/TasksMode/__pycache__/ReFormula.cpython-312.pyc,sha256=aX7BWm2PPjCTnxsbGUitR-2h9hq4AjaBiHMrUXvIl0Y,3967
|
|
@@ -350,7 +350,7 @@ radboy/TasksMode/__pycache__/SetEntryNEU.cpython-312.pyc,sha256=pCdFj61aPKkHL6Sv
|
|
|
350
350
|
radboy/TasksMode/__pycache__/SetEntryNEU.cpython-313.pyc,sha256=UExwr8dN2STFEDE5t_YnQFMUX-wGv7JH10I1OyBDRtM,20212
|
|
351
351
|
radboy/TasksMode/__pycache__/Tasks.cpython-311.pyc,sha256=6QOTJnLiXSKdF81hkhy3vyrz49PPhS20s5_0X52g3Hw,131120
|
|
352
352
|
radboy/TasksMode/__pycache__/Tasks.cpython-312.pyc,sha256=hyJwdaYaaRLdcrNxgg36diJ5iijX5_3I0UAORsj-6LU,310295
|
|
353
|
-
radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=
|
|
353
|
+
radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc,sha256=CqZ6fIaMnYj1chMZy1PjxJr_r0ERk3FkRjQipyujVCw,412318
|
|
354
354
|
radboy/TasksMode/__pycache__/__init__.cpython-311.pyc,sha256=PKV1JbihEacm639b53bZozRQvcllSkjGP3q8STVMxF4,234
|
|
355
355
|
radboy/TasksMode/__pycache__/__init__.cpython-312.pyc,sha256=ERgnEvRMiGSecWp1BpNzLdSq_SdKw7GvFWUvUM7bLVw,272
|
|
356
356
|
radboy/TasksMode/__pycache__/__init__.cpython-313.pyc,sha256=lvsTxukyvGKB3C0rdF9dQi_bvVh6ceDVINfwcuIsd0s,151
|
|
@@ -397,7 +397,7 @@ radboy/__pycache__/Run.cpython-311.pyc,sha256=G_UEfMtkLRjR6ZpGA_BJzGenuaCcP469Y9
|
|
|
397
397
|
radboy/__pycache__/Run.cpython-312.pyc,sha256=v4xolc3mHyla991XhpYBUbBHYT0bnJ1gE-lkFoQ4GFA,241
|
|
398
398
|
radboy/__pycache__/__init__.cpython-311.pyc,sha256=R-DVbUioMOW-Fnaq7FpT5F1a5p0q3b_RW-HpLRArCAY,242
|
|
399
399
|
radboy/__pycache__/__init__.cpython-312.pyc,sha256=FsFzLXOlTK8_7ixoPZzakkR8Wibt-DvXLFh-oG2QlPw,164
|
|
400
|
-
radboy/__pycache__/__init__.cpython-313.pyc,sha256=
|
|
400
|
+
radboy/__pycache__/__init__.cpython-313.pyc,sha256=iSo13-BDByUwtyCmbDxnkbRvJ2jF6rJo8uCn2ZP6gbE,165
|
|
401
401
|
radboy/__pycache__/__init__.cpython-39.pyc,sha256=D48T6x6FUeKPfubo0sdS_ZUut3FmBvPMP7qT6rYBZzU,275
|
|
402
402
|
radboy/__pycache__/possibleCode.cpython-311.pyc,sha256=zFiHyzqD8gUnIWu4vtyMYIBposiRQqaRXfcT_fOl4rU,20882
|
|
403
403
|
radboy/__pycache__/possibleCode.cpython-312.pyc,sha256=tk_CO-AcsO3YZj5j6vEsw3g37UmEzWc5YgeWEoJEUg4,27922
|
|
@@ -422,7 +422,7 @@ radboy/tkGui/Images/__pycache__/__init__.cpython-311.pyc,sha256=tXBYpqbOlZ24B1BI
|
|
|
422
422
|
radboy/tkGui/__pycache__/BeginnersLuck.cpython-311.pyc,sha256=xLQOnV1wuqHGaub16mPX0dDMGU9ryCeLtNz5e517_GE,3004
|
|
423
423
|
radboy/tkGui/__pycache__/Review.cpython-311.pyc,sha256=wKq24iM6Xe2OampgZ7-8U6Nvmgs2y-qWOrGwtWhc75k,4047
|
|
424
424
|
radboy/tkGui/__pycache__/__init__.cpython-311.pyc,sha256=BX7DBn5qbvKTvlrKOP5gzTBPBTeTgSMjBW6EMl7N8e0,230
|
|
425
|
-
radboy-0.0.
|
|
426
|
-
radboy-0.0.
|
|
427
|
-
radboy-0.0.
|
|
428
|
-
radboy-0.0.
|
|
425
|
+
radboy-0.0.546.dist-info/METADATA,sha256=DrC6-7KyNXi-L76na-7dnPTq1T0VgxGE5slIVhNi_us,1615
|
|
426
|
+
radboy-0.0.546.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
427
|
+
radboy-0.0.546.dist-info/top_level.txt,sha256=mlM0RWMUxGo1YHnlLmYrHOgGdK4XNRpr7nMFD5lR56c,7
|
|
428
|
+
radboy-0.0.546.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|