radboy 0.0.715__py3-none-any.whl → 0.0.721__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/DB/Prompt.py +34 -6
- radboy/DB/__pycache__/Prompt.cpython-313.pyc +0 -0
- radboy/DB/__pycache__/db.cpython-313.pyc +0 -0
- radboy/DB/db.py +2 -2
- radboy/DB/rad_types.py +2 -0
- radboy/TasksMode/Tasks.py +37 -1
- radboy/TasksMode/__pycache__/Tasks.cpython-313.pyc +0 -0
- radboy/__init__.py +1 -1
- radboy/__pycache__/__init__.cpython-313.pyc +0 -0
- radboy/preloader/preloader.py +10 -0
- radboy/preloader/preloader_func.py +1267 -957
- {radboy-0.0.715.dist-info → radboy-0.0.721.dist-info}/METADATA +1 -1
- {radboy-0.0.715.dist-info → radboy-0.0.721.dist-info}/RECORD +15 -15
- {radboy-0.0.715.dist-info → radboy-0.0.721.dist-info}/WHEEL +0 -0
- {radboy-0.0.715.dist-info → radboy-0.0.721.dist-info}/top_level.txt +0 -0
radboy/DB/Prompt.py
CHANGED
|
@@ -954,7 +954,7 @@ class Prompt(object):
|
|
|
954
954
|
|
|
955
955
|
def __init2__(self,func,ptext='do what',helpText='',data={},noHistory=False,qc=None,replace_ptext=None,alt_input=None):
|
|
956
956
|
with localcontext() as PROMPT_CONTEXT:
|
|
957
|
-
ROUNDTO=int(db.detectGetOrSet("
|
|
957
|
+
ROUNDTO=int(db.detectGetOrSet("lsbld ROUNDTO default",4,setValue=False,literal=True))
|
|
958
958
|
PROMPT_CONTEXT.prec=ROUNDTO
|
|
959
959
|
'''
|
|
960
960
|
lsbld - bldls()
|
|
@@ -1464,11 +1464,11 @@ class Prompt(object):
|
|
|
1464
1464
|
ptext=ptext
|
|
1465
1465
|
holidate=f'{Fore.light_cyan}CWD:{cwd}\n{msg_holidate}\n{Fore.light_magenta}Holiday: {Fore.dark_goldenrod}{isit} | {Fore.light_sea_green}{holiname}{Style.reset}'
|
|
1466
1466
|
m=f"{holidate}|{Fore.light_blue}DUR="+str(datetime.now()-datetime.fromtimestamp(lastTime)).split(".")[0]
|
|
1467
|
-
CHEAT=f'''{Fore.light_sea_green+((os.get_terminal_size().columns)-len(m))*'*'}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1467
|
+
CHEAT=f'''{Fore.light_green}Stored Precision={Fore.light_red}{PROMPT_CONTEXT.prec}\n{Fore.light_sea_green+((os.get_terminal_size().columns)-len(m))*'*'}
|
|
1468
|
+
{Fore.light_steel_blue+os.get_terminal_size().columns*'*'}
|
|
1469
|
+
{m}{Fore.black}{Back.grey_70} P_CMDS SncLstCmd:{str(duration).split(".")[0]} {Style.reset}|{Fore.black}{Back.grey_50} TmInShl:{str(InShellElapsed).split(".")[0]}|DT:{now.ctime()}| {Fore.dark_blue}{Style.bold}{Style.underline}Week {datetime.now().strftime("%W")} {Style.reset}|{Fore.light_magenta}#RPLC#={Fore.tan}rplc {Fore.light_magenta}#RPLC#{Fore.tan} frm {Fore.light_red}CB{Fore.orange_3}.{Fore.light_green}default={Fore.light_yellow}True{Fore.light_steel_blue} or by {Fore.light_red}CB{Fore.orange_3}.{Fore.light_green}doe={Fore.light_yellow}Newest{Style.reset}|{Fore.light_salmon_1}c2c=calc2cmd={Fore.sky_blue_2}clctr rslt to inpt{Style.reset}|b={color2}back|{Fore.light_red}h={color3}help{color4}|{Fore.light_red}h+={color3}help+{color4}|{Fore.light_magenta}i={color3}info|{Fore.light_green}{Fore.light_steel_blue}CMD#c2cb[{Fore.light_red}e{Fore.light_steel_blue}]{Fore.light_green}{Fore.light_red}|{Fore.orange_3}c2cb[{Fore.light_red}e{Fore.orange_3}]#CMD{Fore.light_green} - copy CMD to cb and set default | Note: optional [{Fore.light_red}e{Fore.light_green}] executes after copy{Style.reset} {Fore.light_steel_blue}NTE: cmd ends/start-swith [{Fore.light_red}#clr|clr#{Fore.light_green}{Fore.light_steel_blue}] clrs crnt ln 4 a rtry{Style.reset} {Fore.orange_red_1}|c{Fore.light_steel_blue}=calc|{Fore.spring_green_3a}cb={Fore.light_blue}clipboard{Style.reset}|{Fore.light_salmon_1}cdp={Fore.green_yellow}paste cb dflt {Fore.green}|q={Fore.green_yellow}Quit Menu (qm)
|
|
1470
|
+
{Fore.light_red+os.get_terminal_size().columns*'.'}
|
|
1471
|
+
{Fore.rgb(55,191,78)}HFL:{Fore.rgb(55,130,191)}{lineTotal()}{Fore.light_red}{Fore.light_green}{Back.grey_15}'''
|
|
1472
1472
|
if alt_input is not None and callable(alt_input):
|
|
1473
1473
|
cmd=alt_input(f"{db.ROBS}{Fore.light_yellow}{db.ROBE}{'.'*os.get_terminal_size().columns}\n{db.ROBS}{Back.grey_15}{Fore.light_yellow}{db.ROBE}{ptext}{db.ROBS}{Fore.light_steel_blue}{db.ROBE}\n[{db.ROBS}{Fore.light_green}{db.ROBE}cheat/cht=brief cmd helpt{db.ROBS}{Fore.light_steel_blue}{db.ROBE}] ({db.ROBS}{Fore.orange_red_1}{db.ROBE}Exec{db.ROBS}{Fore.light_steel_blue}{db.ROBE})\n ->{db.ROBS}{Style.reset}{db.ROBE}")
|
|
1474
1474
|
else:
|
|
@@ -2833,6 +2833,34 @@ class Prompt(object):
|
|
|
2833
2833
|
{Fore.light_red}Total=(({Fore.cyan}CRV+{Fore.light_blue}Price)*{Fore.light_magenta}(Sales Tax Rate(0.0925)))+{Fore.light_blue}Price{Style.reset}
|
|
2834
2834
|
{Fore.light_red}Tax=(({Fore.cyan}CRV+{Fore.light_blue}Price)*{Fore.light_magenta}(Sales Tax Rate(0.0925))){Style.reset}
|
|
2835
2835
|
'''
|
|
2836
|
+
print(sales_tax_msg)
|
|
2837
|
+
n=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Next?",helpText="yes or no",data="boolean")
|
|
2838
|
+
if n in ['d',True]:
|
|
2839
|
+
pass
|
|
2840
|
+
elif n is None:
|
|
2841
|
+
fail=True
|
|
2842
|
+
break
|
|
2843
|
+
else:
|
|
2844
|
+
continue
|
|
2845
|
+
sales_tax_msg=f'''
|
|
2846
|
+
(UNITS_TOTAL/PRICE)=UNITS/1 of PRICE
|
|
2847
|
+
'PRICE*100' for 'UNITS/1 of PRICE in pennies' where PRICE is $1.00
|
|
2848
|
+
(PRICE/UNITS_TOTAL)*UNITS_CONSUMED=PRICE_CONSUMED
|
|
2849
|
+
When Charging for materials and I have to purchase an extra
|
|
2850
|
+
when I only need a fraction of the extra, provide the client
|
|
2851
|
+
with some options:
|
|
2852
|
+
1.) [MCKUM,Minimum Charge, Keep Unused Materials] Charge the lower price for the the labor and the used materials; keep the unused portion for another project.
|
|
2853
|
+
2.) [C4EG2C,Charge for Excess, give to client] Charge a higher price for the extra purchased, and give the unused materials to the customer.
|
|
2854
|
+
-508 pages are used from from 2 reems of 500 sheets of paper
|
|
2855
|
+
-give the customer the remaining paper at a lower cost
|
|
2856
|
+
-keep the 492 extra sheets of paper of and charge for 508 sheets of paper used at (500 sheets/PRICE)
|
|
2857
|
+
-if a barter offers a better sitch, opt for it
|
|
2858
|
+
-if money is the absolute, then this is a no go
|
|
2859
|
+
-if endangerment of other forms seems apparent, NO GO
|
|
2860
|
+
3.) [BRTR,Barter] Charge the better of the costs (Not Necessarily money being better) if something becomes present/apparent
|
|
2861
|
+
-Ensure You have a new ledger made to track their repayment
|
|
2862
|
+
-And for Future payments made in this manner should they be beneficial
|
|
2863
|
+
4.) [PBUC,PurchasedBaseUnitCharge] Charge by the Unit purchased 1 Reem of 500 Paper = 1, I need 1.001 of 1, then charge for 2, but don't give the remainder to the customer; ensure the customer is aware of the Purchased Base Unit Charge'''
|
|
2836
2864
|
print(sales_tax_msg)
|
|
2837
2865
|
n=Prompt.__init2__(None,func=FormBuilderMkText,ptext="Next?",helpText="yes or no",data="boolean")
|
|
2838
2866
|
if n in ['d',True]:
|
|
Binary file
|
|
Binary file
|
radboy/DB/db.py
CHANGED
|
@@ -211,7 +211,7 @@ class BOOLEAN_ANSWERS:
|
|
|
211
211
|
self.help='\n'.join(self.help)
|
|
212
212
|
self.timeout=5
|
|
213
213
|
self.long_boot_time=90
|
|
214
|
-
self.timeout_msg=f"{Fore.light_yellow}SessionOnly({Fore.light_red}lb|longboot = timeout of 90s;{Fore.light_cyan}fb|fastboot = timeout of 0s;to|timeout=set custom timeout in sec
|
|
214
|
+
self.timeout_msg=f"{Fore.light_yellow}SessionOnly({Fore.light_red}lb|longboot = timeout of 90s;{Fore.light_cyan}fb|fastboot = timeout of 0s;to|timeout=set custom timeout in sec.a||fba|fastboot-auto=fast boot and return 'autoboot'){Style.reset}\n"
|
|
215
215
|
self.math_operators={
|
|
216
216
|
'+':None,
|
|
217
217
|
'-':None,
|
|
@@ -346,7 +346,7 @@ str(uuid1()):{
|
|
|
346
346
|
user_input = timedout(f"Boot CMDS(timeout=autoboot from)",htext=htxt)
|
|
347
347
|
#user_input = inputimeout(prompt=f"{BooleanAnswers.timeout_msg}Boot CMDS({t} Seconds Passed=autoboot from {past.strftime("%I:%M:%S %p(12H)/%H:%M:%S(24H)")}):", timeout=t)
|
|
348
348
|
print(f"You entered: {user_input}")
|
|
349
|
-
if user_input in ['fb','fastboot','fba','fastboot-auto','timeout']:
|
|
349
|
+
if user_input in ['a','fb','fastboot','fba','fastboot-auto','timeout']:
|
|
350
350
|
BooleanAnswers.timeout=0
|
|
351
351
|
user_input="autoboot"
|
|
352
352
|
if user_input in ['longboot','lb']:
|
radboy/DB/rad_types.py
CHANGED
|
@@ -57,6 +57,8 @@ class dec1(TDecimal):
|
|
|
57
57
|
value=f"{value:.3f}"
|
|
58
58
|
return super().__new__(self,value)
|
|
59
59
|
|
|
60
|
+
def chunker(l,size):
|
|
61
|
+
return [l[i:i+size] for i in range(0,len(l),int(size))]
|
|
60
62
|
|
|
61
63
|
class stre(str):
|
|
62
64
|
'''String Extended to include operators for some useful functionality.'''
|
radboy/TasksMode/Tasks.py
CHANGED
|
@@ -1162,7 +1162,6 @@ def generateWhiteNoise():
|
|
|
1162
1162
|
except Exception as e:
|
|
1163
1163
|
print(e)
|
|
1164
1164
|
|
|
1165
|
-
|
|
1166
1165
|
class TasksMode:
|
|
1167
1166
|
def networth_ui(self):
|
|
1168
1167
|
NetWorthUi()
|
|
@@ -5677,6 +5676,12 @@ where:
|
|
|
5677
5676
|
'exec':lambda self=self: OAR.CountTo(),
|
|
5678
5677
|
}
|
|
5679
5678
|
count+=1
|
|
5679
|
+
self.options[str(uuid1())]={
|
|
5680
|
+
'cmds':["#"+str(count),*[i for i in generate_cmds(startcmd=["add"],endCmd=["recycle entries",'rec. entry',])]],
|
|
5681
|
+
'desc':f"add new default recycle entries",
|
|
5682
|
+
'exec':lambda self=self:self.addRecycleEntries(),
|
|
5683
|
+
}
|
|
5684
|
+
count+=1
|
|
5680
5685
|
#self.product_history=
|
|
5681
5686
|
|
|
5682
5687
|
'''
|
|
@@ -5754,7 +5759,38 @@ where:
|
|
|
5754
5759
|
except Exception as e:
|
|
5755
5760
|
print(e)
|
|
5756
5761
|
print(type(command),f"{command}")
|
|
5762
|
+
|
|
5757
5763
|
break
|
|
5764
|
+
def addRecycleEntries(self):
|
|
5765
|
+
defaultEntries='''Aluminum Beverage Can [http://www.kadealu.com/] Stubby Container Volume: 250ml Can Ht: 92mm Can Body Diam: 66mm Can End Diam. 52/58mm Net Wt: 9.3/10.g
|
|
5766
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 330ml Can Ht: 116mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 10.6g
|
|
5767
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 355ml Can Ht: 122mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 11.5g
|
|
5768
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 475ml Can Ht: 158mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 13g
|
|
5769
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Standard Container Volume: 500ml Can Ht: 168mm Can Body Diam: 66mm Can End Diam. 52mm Net Wt: 13.4g
|
|
5770
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 250ml Can Ht: 115mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 11.4g
|
|
5771
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 270ml Can Ht: 123mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 13.4g
|
|
5772
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 310ml Can Ht: 138.8mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 9.5g
|
|
5773
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 330ml Can Ht: 147mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 10.8g
|
|
5774
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 355ml Can Ht: 156mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 10.8g
|
|
5775
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Slim Container Volume: 180ml Can Ht: 104mm Can Body Diam: 53mm Can End Diam. 50mm Net Wt: 8.8g
|
|
5776
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Slim Container Volume: 250ml Can Ht: 134mm Can Body Diam: 53mm Can End Diam. 50mm Net Wt: 9.1g
|
|
5777
|
+
Aluminum Beverage Can [http://www.kadealu.com/] Sleek Container Volume: 200ml Can Ht: 96mm Can Body Diam: 57mm Can End Diam. 52mm Net Wt: 11.4g
|
|
5778
|
+
'''.split("\n")
|
|
5779
|
+
with Session(ENGINE) as session:
|
|
5780
|
+
for line in defaultEntries:
|
|
5781
|
+
check=session.query(Entry).filter(or_(
|
|
5782
|
+
Entry.Barcode.icontains(line),
|
|
5783
|
+
Entry.Code.icontains(line),
|
|
5784
|
+
Entry.Name.icontains(line),
|
|
5785
|
+
)).first()
|
|
5786
|
+
if check is None:
|
|
5787
|
+
e=Entry(Barcode=line.lower(),Code=line.upper(),Name=line)
|
|
5788
|
+
session.add(e)
|
|
5789
|
+
else:
|
|
5790
|
+
session.delete(check)
|
|
5791
|
+
#e=Entry(Barcode=line.lower(),Code=line.upper(),Name=line)
|
|
5792
|
+
#session.add(e)
|
|
5793
|
+
session.commit()
|
|
5758
5794
|
|
|
5759
5795
|
def promptForOp(self,n,total,entryIdList,barcode):
|
|
5760
5796
|
with Session(ENGINE) as session:
|
|
Binary file
|
radboy/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION='0.0.
|
|
1
|
+
VERSION='0.0.721'
|
|
Binary file
|
radboy/preloader/preloader.py
CHANGED
|
@@ -145,6 +145,16 @@ Here:
|
|
|
145
145
|
'desc':f'obtain the area of a circle using diameter',
|
|
146
146
|
'exec':lambda: areaCircleDiameter(),
|
|
147
147
|
},
|
|
148
|
+
f'{uuid1()}':{
|
|
149
|
+
'cmds':[i for i in generate_cmds(startcmd=['sudoku',],endCmd=['candidates','cd'])],
|
|
150
|
+
'desc':f'obtain candidates for sudoku cell',
|
|
151
|
+
'exec':lambda: sudokuCandidates(),
|
|
152
|
+
},
|
|
153
|
+
f'{uuid1()}':{
|
|
154
|
+
'cmds':[i for i in generate_cmds(startcmd=['sudoku',],endCmd=['candidates auto','cda'])],
|
|
155
|
+
'desc':f'obtain candidates for sudoku cell for the whole grid',
|
|
156
|
+
'exec':lambda: candidates(),
|
|
157
|
+
},
|
|
148
158
|
f'{uuid1()}':{
|
|
149
159
|
'cmds':['herons formula','hrns fmla'],
|
|
150
160
|
'desc':f'''
|